alphapapa / solarized-everything-css

A collection of Solarized user-stylesheets for...everything?
GNU General Public License v3.0
279 stars 43 forks source link

Rules for site-specific files only? #15

Open The-Compiler opened 7 years ago

The-Compiler commented 7 years ago

Can we do something with stylus to make certain rules appear in the site-specific files only?

For example, for LWN I'd like to fix those:

lwn-bad-1 lwn-bad-5

However, that involves rules for span and a:hover - for obvious reasons, they shouldn't land in solarized-all-sites-*.css.

(Note: I'm not going to work on this in the short term - my browser can't do per-domain stylesheets yet anyways :wink:)

alphapapa commented 7 years ago

This is a really good question. As far as I remember, that's not possible with Stylus itself, so doing it would probably require some kind of manual pre- or post-processing (and the thought of writing a script to do that frankly does not delight me ;) ).

Or, if there's a way to embed raw CSS into Stylus, we could try enclosing such rules in the domain selectors (is that the right term?). That would probably be the cleanest solution.

Alternatively, at the cost of making the Makefile and/or the require rules a bit more complex, we might be able to set up separate styl files that would not be included in the all-sites files. I don't recall how the Stylus compiler would react to non-existent files that are required; that might require a workaround.

This will require a bit of research. I'll try to get to it sometime in the future, just a bit busy right now. Thanks for the suggestion. :)