A more interesting problem to solve, I think, is that of optimising CSS rules for browser rendering.
A more interesting problem to solve, I think, is that of optimising CSS rules for browser rendering.
Things like:
* Rearrange rules within the file to put similar rules within the sliding window.
* Rearrange rules so that tail of the last declaration of one rule and the start of the next selector create the longest possible common substring.
* Rearrange the order of declarations within the rules to maximize the length of common substrings that span two declarations, ie ": 2em;\nbackground-color: rgb("
Any sponsors? No? Didn't think so. Not even you, big G? Aww...
For now some minifiers do sort the values, which helps.
The "not starving to death" thing is a bit of an issue on the way there... Well, I have savings, but...
And if I get a horrid job, then I won't have the energy. :P
I'm engaging in this ugly probably unsightly (but helpfully quick and maintainable) practice in a project with a short developmental cycle right now, and I've yet to have any issues outside of temporarily forgetting that I have already globally defined a specific style or enclosed a style I thought I'd left global.
(It's a corp. annual report -- that my team got tasked with as a favour -- so it has some repeating styles, and others isolated between pages)
I used to have a doc with actual numbers, but I've since lost it. If I dig it up, I'll link it here.