Possible .CSS changes instead of Calendar Tweaks?

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

Possible .CSS changes instead of Calendar Tweaks?

Post by Ed1 »

I have held off upgrading TB68 to TB78, in part because of the loss of the Calendar Tweaks addon in TB78. I am wondering if it would be possible to duplicate a few of the Calendar Tweaks functions with .css code changes incorporated into the userchrome.css file. Specifically,

1. Reducing the vertical height by 1px on the top and bottom of all events, tasks, reminders shown in the calendar Month display. Calendar Tweaks has a checkbox option that does this.

2. Removing (or making transparent) the dark 1px border around some events, tasks, reminders shown in the calendar Month display. Not sure if removing this border would also reduce the vertical height - see #1 above. (Some calendar entries seem to have the dark border, others don't. Can't figure out which types do and don't - at first thought it was only recurring items, but this does not seem correct.)

3. Changing the default yellow color of the selected day box background and its box label to user-selected colors.


Would there be available .css code to accomplish any/all of these things?
User avatar
Code Name
Posts: 205
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by Code Name »

I just wish another developer would adopt the Calendar Tweaks add-on and update it for use on v78+.

I really miss the calendar events bar colors being reversed - with the event bars colored primarily with the category color instead of the calendar color. I also miss the icon that represents a repeating event and the slash (/) through the icon if the repeating event has been changed since it was created.
Politicians and Diapers must be changed often for the exact same reason...
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by morat »

@Ed1

3.

Try changing the :root variables in the userChrome.css file.

Code: Select all

:root {
  --viewDayBoxSelectedBackground: pink !important;
  --viewMonthDayBoxSelectedBackground: orange !important;
}
Reference
http://searchfox.org/comm-esr78/source/ ... -views.css
Ed1
Posts: 1059
Joined: January 30th, 2005, 2:33 pm

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by Ed1 »

@Code Name, agreed!

@morat, thank you (again!) for pointing me to solutions for these items. You are so knowledgeable when it comes to these types of UI tweaks!
User avatar
WaltS48
Posts: 5141
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by WaltS48 »

Ed1 wrote:@Code Name, agreed!

@morat, thank you (again!) for pointing me to solutions for these items. You are so knowledgeable when it comes to these types of UI tweaks!
He/She should start creating extensions. :-"
Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by morat »

@Ed1

Try these:

1.

Code: Select all

calendar-month-day-box-item .calendar-event-box-container {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}
2.

Code: Select all

.calendar-color-box {
  border: none !important;
}
You can find the options dialog descriptions in the .dtd file and the corresponding styles in the .css file within the .xpi file.

* chrome\locale\en-US\calendartweaks.dtd
* chrome\skin\calendartweaks-calendar-views.css

I guess (1) is the "Reduce height of events" description in the .dtd file and the "eventreduceheight" style in the .css file.

Is (2) even a Calendar Tweaks style?

Some tweaks require JavaScript so there isn't a pure userChrome.css solution.

Calendar Tweaks
http://addons.thunderbird.net/thunderbird/addon/14384

Calendar Tweaks Options - General
http://addons.thunderbird.net/user-medi ... 128930.png

Calendar Tweaks Options - Day Colors
http://addons.thunderbird.net/user-medi ... 128932.png
Ed1
Posts: 1059
Joined: January 30th, 2005, 2:33 pm

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by Ed1 »

@morat. Your code suggestions for all 3 items are working! I was trying without success to figure out how to get #2 and #3 working. I did unzip the Calendar Tweaks addon, but still couldn't find my way to the solutions.

You are right, #2 (remove borders) is apparently not a Calendar Tweaks style. I thought it was.

My further looking at the event borders issue showed that the events with borders were coming from external subscribed calendars (U.S. holidays, etc.), with the exception of one of my own event entries on an iCloud calendar that had a border. I deleted the event and re-created it - no border.

Thanks very much for following up with the solutions to all of these items. I really appreciate it. Now, I will have to seriously consider moving to TB78. Just need to get over Duplicate Contacts Manager not working in TB78 - I really like that addon.

Following up on @WaltS48's comment, you seem like the perfect person to update Calendar Tweaks for TB78! Thousands of users would be pleased! Any interest?
User avatar
Code Name
Posts: 205
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by Code Name »

There are two things I really liked about the 'Calendar Tweaks' add-on:
• Coloring event backgrounds with the category colors.
• Adding icons for repeating events and exceptions.


I know virtually nothing about using CSS in userChrome, but from everything I've read about 'Coloring event backgrounds with the category colors' using css requires that each individual category must be listed in the css file and maintained. So, if I wanted to add a new category or change the color of an existing category, I must go into the css file and make those changes. I use 50 categories and 7 calendars in my Tb calendar. I don't feel comfortable (or confident) in my ability to come up with the correct coding and editing, and the necessity to maintain it. It's just more than I care to get involved with.

Then, there's the second add-on I really liked about 'Calendar Tweaks' that adds icons for repeating events and exceptions.

It has been suggested that I look into seeing if maybe another developer of a calendar-related add-on might be interested in either adopting the abandoned 'Calendar Tweaks' add-on, or incorporating some of the features of 'Calendar Tweaks' into his/her calendar-related add-on. However, I haven't found a developer that has an extensive add-on for the Tb calendar.

I'm still hoping that some experienced developer will adopt the abandoned 'Calendar Tweaks' add-on and make it compatible for Tb78+. I'd gladly make a hefty 3-digit donation.
Politicians and Diapers must be changed often for the exact same reason...
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by morat »

Code Name wrote:Coloring event backgrounds with the category colors.
Are you asking for the same tweak as riverstyx?

My solution: http://forums.mozillazine.org/viewtopic ... #p14879236

I'm using the error console to create riverstyx's userChrome.css code because I don't know his custom categories and colors.
Code Name wrote:Adding icons for repeating events and exceptions.
That tweak requires JavaScript. There isn't a pure userChrome.css solution.
User avatar
Code Name
Posts: 205
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by Code Name »

morat wrote:
Code Name wrote:Coloring event backgrounds with the category colors.
Are you asking for the same tweak as riverstyx?

My solution: http://forums.mozillazine.org/viewtopic ... #p14879236

I'm using the error console to create riverstyx's userChrome.css code because I don't know his custom categories and colors.
Code Name wrote:Adding icons for repeating events and exceptions.
That tweak requires JavaScript. There isn't a pure userChrome.css solution.
morat - Yeah, I think so - I want to color the calendar event backgrounds with the category colors instead of the calendar colors, but without having to list each of my 50 categories in the CSS coding and maintaining it.

I'd like a simple plug-'n-play method I guess. I'd love to have a zip file I open and bingo it's been added. And, all I need to do is change Thunderbird's config editor for preference toolkit.legacyUserProfileCustomizations.stylesheets=true (or something like that I think!) and I'm done. I wish! [-o<

I have no idea what your reference to the 'error console' is about. I guess you needing to use it means that I would need to use it too. That's far beyond my grasp of things.

I see that riverstyx never responded to you solution. I'd like to hear from him to know if your solution worked for him - and that all his calendar event backgrounds were successfully and automatically colored with his category colors. Or, maybe his Tb calendar crashed and burned! I dunno.

As you can tell I have no clue about using userChrome.css code. To be very honest, all that coding looks Greek to me. I don't understand it, therefore I'm very hesitant to even try to use it...afraid I'll mess something up.
Politicians and Diapers must be changed often for the exact same reason...
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by morat »

@Code Name

As of Firefox 69, Firefox ESR 68, Thunderbird 68, you must set the toolkit.legacyUserProfileCustomizations.stylesheets preference to true in about:config in order to load the userChrome.css file.

How to create a userChrome.css file (for Firefox)
http://www.userchrome.org/how-create-us ... e-css.html

...

In Thunderbird, the Browser Console is called the Error Console.

i.e. Tools > Developer Tools > Error Console (ctrl+shift+j)

Browser Console
http://developer.mozilla.org/docs/Tools/Browser_Console
User avatar
DanRaisch
Moderator
Posts: 127229
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Possible .CSS changes instead of Calendar Tweaks?

Post by DanRaisch »

Locking as the solution has already been posted in another thread -- http://forums.mozillazine.org/viewtopic ... #p14880937
Locked