So... I've decided to (at least temporarily) add YET another prefix type to the main list... So, right now, we have in this order of 'execution':
common.css (virtuals and anything that needs to be in all files including non-index)
index.css (main index file obviously...)
sections.css (per-area styles, although it's always included as well)
hacks.css (browser hacks, RTL hacks)
custom.css (this is the one you can include at will.)
The order in which they're included once you're in a sub-skin may not be intuitive. I'm taking the absolute extreme example of Warm, which is a sub-sub-skin. Here it is:
[0] => skins/common.css <--- okay...
[1] => skins/index.css <--- still fine...
[2] => skins/index.member.css <--- this one has the CSS that only shows up to members anyway
[3] => skins/Wine/index.css <-- this is what Wine needs to modify in Weaving
[4] => skins/Wine/index.member.css <-- and a hack for the original index.member.css
[5] => skins/Wine/Warm/index.css <-- and now, what Warm needs to modify in Wine...
[6] => skins/sections.css <-- and now for the per-area CSS...
[7] => skins/Wine/sections.css <-- and what Wine needs to change to it.
[8] => skins/hacks.ie[6].css <-- CSS hacks for IE6 to work
[9] => skins/Wine/hacks.ie[6].css <-- CSS hacks for IE6 to work with Wine
[10] => skins/Wine/Warm/hacks.ie[-9].css <-- CSS hacks for IE 6,7,8 and 9 to work with Warm
=> skins/custom.css <-- Gone, see below.
[11] => skins/Wine/custom.replace.css <-- my own personal custom CSS for Wine (which is empty).
Because it has the 'replace' keyword, the skins/custom.css file is removed from the list.
As you can see, there's at least one big problem: sub-skins execute their index.css file earlier than their parent's sections.css file. This can lead to huge bugs when it comes to CSS selector precedence.
One solution is to rename Wine/index.css to Wine/hacks.css -- and do the same for other index-type files in all sub-skins.
The main inconvenience is that it doesn't scream "I'm a skin definition!", but "I'm a hack!"... (Even though, that's technically what it is since it isn't a replace-type skin... You're trading off "code beauty" for ease of update.)
Or I could simply include files the way they used to be -- folder by folder, i.e. everything from Weaving first, then all of Wine second, etc... I don't like that, there's *PROBABLY* a reason why I did that -- and the original order was screaming for hacks to be included in different positions. (custom.css?)
Another solution is to just drop 'sections.css' (25KB) and merge it with 'index.css' (35KB), like in SMF. Remains to be seen whether it's nice to have everything in a single large file than in two relatively manageable files...
Or, I could do an exception to my system and just merge sections.css to index.css at sort time, but honestly I don't know how to do that... (it's a real sorting function. It doesn't manipulate names, it manipulates characters...)
Right now I think my preference goes to hacks.css... I don't now. I'm asking.
Any opinions...?