Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
can i force themes css to load after extensions css?

since some extensions contain graphical or colored elements in css, it would be nice to be able to override all these bits in one place in a theme. i don't want to change the extensions css directly, obviously because people use different themes.
but it doesn't seem possible to do this without either:
- loading the extension css first and then redefining the css in the theme,
or else
- using !important for all these elements when they load first in the theme css.
#2 is not the nicest solution. is there another way? note that i'm no css genius so i've probably overlooked obvious things.
but it doesn't seem possible to do this without either:
- loading the extension css first and then redefining the css in the theme,
or else
- using !important for all these elements when they load first in the theme css.
#2 is not the nicest solution. is there another way? note that i'm no css genius so i've probably overlooked obvious things.
0
This discussion has been closed.
Comments
that was fast. thanks, nav. excellent.
so where does theme css come in? at 100? i'd just set all my extensions to 0-99?
also, the new parameter would be added like so in the extension php?
$Head->AddStyleSheet("./extensions/whatever/style.css",99);
function AddStyleSheet($StyleSheetLocation, $Media = '', $Position = '100') { if (!is_array($this->StyleSheets)) $this->StyleSheets = array(); $this->InsertItemAt($this->StyleSheets, array('Sheet' => $StyleSheetLocation, 'Media' => $Media), $Position); }
So, if you don't care about the media specification, and you wanted to add your style before all of the other css sheets, do this:
$Head->AddStyleSheet('./extensions/whatever/style.css', '', 0);