TB 91.1.1 - CSS color changes not working

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
Post Reply
Ed1
Posts: 1059
Joined: January 30th, 2005, 2:33 pm

TB 91.1.1 - CSS color changes not working

Post by Ed1 »

I just updated TB to 91.1.1. I've noticed a few userchrome.CSS changes to the Calendar that were working in TB 78, but not in TB 91. Here is one:

Code: Select all

/* Change CALENDAR - Weekends column background color */
window {
  --viewMonthDayOffLabelBackground: lightblue !important;
  --viewWeekendBackground: lightcyan !important;
}
Is there any possibility of getting this working again?
morat
Posts: 6394
Joined: February 3rd, 2009, 6:29 pm

Re: TB 91.1.1 - CSS color changes not working

Post by morat »

I got the viewWeekendBackground property to work above the namespace line.

Code: Select all

/* Thunderbird userChrome.css */

:root {
  --viewWeekendBackground: pink !important;
}

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
Reference
http://searchfox.org/comm-esr78/search? ... Background
http://searchfox.org/comm-esr91/search? ... Background
http://searchfox.org/comm-esr78/search? ... Background
http://searchfox.org/comm-esr91/search? ... Background

Similar thread: http://forums.mozillazine.org/viewtopic ... &t=3043892
morat
Posts: 6394
Joined: February 3rd, 2009, 6:29 pm

Re: TB 91.1.1 - CSS color changes not working

Post by morat »

There is no header style on the Month view in TB 91, so that's why the viewMonthDayOffLabelBackground property doesn't work.

Try this:

Code: Select all

.calendar-month-day-box-day-off > .calendar-month-day-box-dates {
  background-color: lightblue !important;
}
.calendar-month-day-box-day-off {
  background-color: lightcyan !important;
}
Ed1
Posts: 1059
Joined: January 30th, 2005, 2:33 pm

Re: TB 91.1.1 - CSS color changes not working

Post by Ed1 »

Thanks, morat. The code in your last post just before this post works to color the weekend column backgrounds lightcyan, but does not work to make the current day lightblue or the selected day yellow (default color). (I tried that code both above and below the namespace line.)

What does work properly for me is to put this above the namespace line:

Code: Select all

:root {
  --viewMonthDayOffLabelBackground: lightblue !important;
  --viewWeekendBackground: lightcyan !important;
}
Ed1
Posts: 1059
Joined: January 30th, 2005, 2:33 pm

Re: TB 91.1.1 - CSS color changes not working

Post by Ed1 »

If you're willing to advise me further, I have a couple of other .css questions.

1. This code worked on TB78 but not on TB91 to suppress the display of the small colored event
category icon:

Code: Select all

/* Remove CALENDAR event category icons */
.calendar-category-box-gradient {
  width: 0 !important;
} 
2. I would like to add some very light gray background color and/or gradient to the rectangular header area of each day box on the Calendar month and multi-week views. Now it is the same white background as the entire day box. I am referring to the top of each day box, where the date digit appears on the right side. How can this be done? Can it be handled differently for weekdays and weekends, as I already have the weekends a light cyan background, so maybe need a very slightly darker cyan background color for the date header on the weekend days. (Please don't spend any time on finding particular color shades - I can adjust those.)
Last edited by Ed1 on September 25th, 2021, 8:00 am, edited 1 time in total.
morat
Posts: 6394
Joined: February 3rd, 2009, 6:29 pm

Re: TB 91.1.1 - CSS color changes not working

Post by morat »

1.

Code: Select all

/* Thunderbird userChrome.css */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

html|div.calendar-category-box {
  width: 0 !important;
}
2.

Post the code that works in TB 78.
Ed1
Posts: 1059
Joined: January 30th, 2005, 2:33 pm

Re: TB 91.1.1 - CSS color changes not working

Post by Ed1 »

For item #1, that code doesn't work, at least it doesn't on the category icons displayed for events from a downloaded holidays calendar.

The prior code that I listed above did suppress those icons in TB78 (but not in TB91). If you have any more suggestions, please let me know. If not, I guess I can change the color of those icons using the color picker in Preferences>Categories to try to match the background color.

For item #2, I'm not sure I had anything different from the default on either TB78 or TB91. And the more I think about it, it probably is not a good idea to go for a different look on that. So, thank you, morat, but I will leave that alone for now.
morat
Posts: 6394
Joined: February 3rd, 2009, 6:29 pm

Re: TB 91.1.1 - CSS color changes not working

Post by morat »

1.

The entry works above the namespace line as well.

Code: Select all

/* Thunderbird userChrome.css */

.calendar-category-box {
  width: 0 !important;
}

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
Ed1
Posts: 1059
Joined: January 30th, 2005, 2:33 pm

Re: TB 91.1.1 - CSS color changes not working

Post by Ed1 »

OK, morat, that works!

Thanks again.
Ed1
Posts: 1059
Joined: January 30th, 2005, 2:33 pm

Re: TB 91.1.1 - CSS color changes not working

Post by Ed1 »

For anyone interested, here is some code that addresses item #2 above (the header/label of each day box in the Monthly and MultiWeek views}. It works for me in TB91 when placed below the namespace line.

Code: Select all

.calendar-month-day-box-date-label {
   color: rgb(89,102,115) !important;
   font-weight: 700 !important;
   background-color: whitesmoke !important;
}
nym9
Posts: 262
Joined: May 26th, 2005, 1:44 am

Re: TB 91.1.1 - CSS color changes not working

Post by nym9 »

Ed1 wrote:I just updated TB to 91.1.1.
So did I and none of my calendars are showing, even after "enable"

edit: solved by disabling all calendar add ons except "provider for google calendar"
Post Reply