MozillaZine


More on css for calendar

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
pete of ebor
 
Posts: 136
Joined: February 18th, 2012, 8:41 am

Post Posted June 25th, 2021, 8:31 am

Hi.
Following on from Code Name's post on making dates bolder, I managed to successfully add a CSS file and make those changes. There are a few other changes I would like to make, such as adding the month onto the date in every day box, having a darker colour for the other month days and a brighter - i.e more obvious header for the today box. I would like a pointer as to how to add these to the CSS file.
I suppose what I'm also wanting to ask is where can I find this information in the first place ? Is there some sort of list of what these commands refer to.. ? I do have to say I'm not really a coder. I have used TB for many years without looking 'under the bonnet'.. I suppose you could say I'm really a newbie with just enough knowledge to be dangerous - I'll probably break something and have to reinstall from scratch... ](*,)

morat
 
Posts: 4839
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 25th, 2021, 10:41 am

You can't add the month onto the date in every day box with a style.

pete of ebor wrote:colour for the other month days

Try these:

Code: Select all
:root {
  --viewMonthOtherBackground: orange !important;
}

Code: Select all
.calendar-month-day-box-other-month {
  background-color: orange !important;
}

Reference
http://searchfox.org/comm-esr78/source/calendar/base/themes/common/calendar-views.css

You would need to learn how to use the Inspector and Rules tabs in the Developer Toolbox utility.

Screenshot
http://imgur.com/iPye5yI

How to get DOM info
http://forums.mozillazine.org/viewtopic.php?p=14866214#p14866214

CSS Reference
http://developer.mozilla.org/docs/Web/CSS/Reference
http://developer.mozilla.org/docs/Web/CSS/Reference#Selectors
http://developer.mozilla.org/docs/Web/CSS/Attribute_selectors#Syntax
http://developer.mozilla.org/docs/Web/CSS/Mozilla_Extensions

pete of ebor
 
Posts: 136
Joined: February 18th, 2012, 8:41 am

Post Posted July 1st, 2021, 8:06 am

Thanks Morat. Got the 'other month' colours sorted and I've been 'playing' with other settings and not broken anything yet, but there are plenty of options to keep me entertained for months... :D

Return to Calendar


Who is online

Users browsing this forum: No registered users and 1 guest