Code
<link rel="stylesheet" href="<!--[$stylepath]-->/style.css" type="text/css" />
But after that line there are many more stylesheets loaded from modules, blocks and so on. Those stylesheets can change your theme CSS because the files are loaded later.
Sometimes you need to change just a little declaration from a module stylesheet and you don't wnat to make use of an own CSS file in your theme folder.
An example:
You are using menutree with a dropdown menu. The modules/menutree/pnstyle/cssplay_simpledrop_blackred.css is loaded and generates a font size that doesn't fit for your theme.
You can modify the cssplay_simpledrop_blackred.css directly in module folder - but the next upgrade will overwrite your changes.
Sure you can copy cssplay_simpledrop_blackred.css to your theme and modify font size there.
But why not add the small correction directly to your theme CSS when there are just 2-3 lines to add?
In this case it's better to get your theme CSS loaded after the modules CSS.
What to do?
1.
Add the modifications to your theme CSS.
The example:
Code
.cssplay_drop a, .cssplay_drop a:visited {
font-size:0.9em;
width:100px;
}
font-size:0.9em;
width:100px;
}
2.
Remove
Code
<link rel="stylesheet" href="<!--[$stylepath]-->/style.css" type="text/css" />
3.Add
Code
<!--[pnpageaddvar name="stylesheet" value="themes/yourtheme/style/style.css"]-->
right before closing body tag /body.
So you prevent module style overwriting and get your theme CSS loaded as last CSS file which can overwrite any stylesheet declaration done before.
--
| scribite! | TNGz | piwik | zweet |
