Report message:*
 

Re: disabling or overriding icms.css

Subject: Re: disabling or overriding icms.css
by skenow on 2012/2/27 16:59:22

The order of the files is of some importance, but CSS Specificity is more important.

If the same style selector - p, h1, table, .myclass or div, for example - is styled in 2 different places, the last one wins. As bleekk says, we really shouldn't be defining general styles in the last css file to load, as icms.css does.

Here's a technical overview of how stylesheets are currently loaded -

* yourtheme/theme.html begins the layout
* meta tags and header come first
* yourtheme/style.css gets included
...
* smarty var for module_header comes at the end of the head section
* body section starts

Nowhere does your theme need to specifically include a module.css or icms.css file - where does that happen? in the smarty var *module_header.

icms.css gets added by /header.php, before all the textsanitizer and jquery plugins. Later, as the modules load, they can add their own stylesheets to the module_header and they are loaded behind icms.css.

Recap: theme -> icms -> module