Grid Hour Height CSS - Sunbird 0.2

From MozillaZine Knowledge Base
Jump to navigationJump to search

For Sunbird and Lightning 0.5 and later, the number of hours visible in Day View and Week View can be adjusted via

  • Sunbird: Tools / Options / Views / show [8] hours at a time
  • Lightning: Tools / Options / Lighting / Views / show [8] hours at a time

(implemented by bug 349520)

The CSS below is for Sunbird and Lightning 0.3.1 and earlier.


/* CalendarGridHourHeight.css

   To increase the minimum height of hour boxes in day view and week view
   (so short events become more legible, and long events show more text,
   but fewer hours are visible on screen before scrolling):
   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/CalendarGridHourHeight.css
   2. Add the following to profile file chrome/userChrome.css (create if none):
    @import url("CalendarGridHourHeight.css");

   The height is specified in "em"s (approximately the height of an M
   in a font [3]) so that it will change if the font size is changed.
   Change the value to suit your needs.

   The CSS is tested against Sunbird 0.2 - 0.3a1
    
   Warning: using userChrome.css can lead to errors developers can't reproduce.
   Before reporting Calendar errors, be sure to test with no userChrome.css.
*/

.day-view-hour-box-class {
  min-height: 8em ! important;
}
.week-row-class, .week-view-hour-box-class {
  min-height: 8em ! 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] CSS1: Length Units
   http://www.w3.org/TR/CSS1#length-units
    
   [4] CSS2: The Cascade: !Important Rules
   http://www.w3.org/TR/REC-CSS2/cascade.html#important-rules

   This file is
   http://kb.mozillazine.org/Grid_Hour_Height_CSS_-_Sunbird_0.2
*/