Read the statement by Michael Teeuw here.
Help with CSS not showing changes on MMM-CalendarExt2
-
@44mc44 said in Help with CSS not showing changes on MMM-CalendarExt2:
There is only one custom.css file correct?
That is correct. It might not be a bad idea to make a backup as you add to it. You never know. :-)
-
Definitely will do. :thumbs_up:
-
@44mc44 Just a suggestion, but you may want to do some research on css using w3 schools or something. The way you attempted to create your css would only work using scss. In standard css you can’t nest the declaration of styles inside of each other. (Not sure how to word it, although i’m pretty certain declaration of styles is wrong.)
-
@seann Will check it out. Thanks! This is all really new to me. I read through the CSS 101 in this forum, but I could definitely use more help.
-
For a bit of background on this, nesting CSS as @44mc44 has tried to do (known as “CSS scoping”) was proposed for the CSS spec, but browsers were slow to support it, and eventually dropped it altogether.
The idea was you could just limit your CSS to a certain selector like follows:
.some-class { h1 { font-size: 24px; color: #ACACAC; } p { font-size: 18px; } }
This would mean that
h1
andp
elements inside an element with the classsome-class
would have the styles applied, whileh1
andp
elements that are not contained in that class would not. This would be a safer way to write your CSS to ensure it doesn’t accidentally get applied to unintended elements.Unfortunately, this doesn’t work in any browser, so you have to write out the rules individually to achieve the same thing:
.some-class h1 { font-size: 24px; color: #ACACAC; } .some-class p { font-size: 18px; }
@Seann is correct in that if we were using a preprocessor such as SASS or SCSS, then scoping would indeed be supported. You would write your rules scoped, and then the preprocessor would take care of converting your rules to the long form. Using a preprocessor helps to make authoring your CSS easier and less verbose. Alas, Magic Mirror does not appear to use a CSS preprocessor, so we’re stuck with writing it out the long way.