Grid Narrowing CSS, Week View - Sunbird 0.2

From MozillaZine Knowledge Base
Jump to navigationJump to search

Advanced Tip: Calendar Week View Narrow Grid

/* CalendarWeekViewNarrowGrid.css

   To reduce the minimum width of Calendar grid views to fit 800x600 screen,
   save this css in your profile [1] chrome directory,
   and import it in your userChrome.css [2].

   For Sunbird, the userChrome.css path may be something like the following
   w2k: c:\Documents and Settings\USER\Application Data\Mozilla\Sunbird\Profiles\NNNNN.default\chrome\userChrome.css
   gnu/linux: ~/.mozilla/sunbird/NNNNNN.default/chrome/userChrome.css

   1. Save this file in your profile as chrome/CalendarWeekViewNarrowGrid.css
   2. Add the following to profile file chrome/userChrome.css (create if none):
    @import url("CalendarWeekViewNarrowGrid.css");

   The CSS is tested against Sunbird 0.2rc1 - 0.3a1
   It should not be necessary in versions 0.3 or later (bug270915 [3]).

   Warning: using userChrome.css can lead to errors developers can't reproduce.
   Before reporting Calendar errors, be sure to test with no userChrome.css.
*/

/* Like patch for bug270915, reduce column widths from 80px to 60px (+/- 2).*/

#weekview-daynumber-spacer
{
  width: 60px ! important;
}

.week-view-hour-box-class
{
  width: 58px ! important;
}

.week-view-hours-only-box-class
{
  width: 62px ! important;
}

#weekview-daynumber-spacer-left
{
  width: 62px ! important;
}

.all-day-content-box-week
{
  width: 58px ! important;
}


/* References:

   [1] Where is my profile folder?
   http://kb.mozillazine.org/index.phtml?title=Profile_Folder#Where_is_my_profile_folder?

   [2] Customizing Mozilla: User CSS
   http://www.mozilla.org/unix/customizing.html

   [3] Bug 270915: 800x600 resolution not supported well
   https://bugzilla.mozilla.org/show_bug.cgi?id=270915

   [4] CSS2: The Cascade: !Important Rules
   http://www.w3.org/TR/REC-CSS2/cascade.html#important-rules
*/