Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules for site-specific files only? #15

Open
The-Compiler opened this issue Mar 2, 2017 · 1 comment
Open

Rules for site-specific files only? #15

The-Compiler opened this issue Mar 2, 2017 · 1 comment

Comments

@The-Compiler
Copy link
Collaborator

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 😉)

@alphapapa
Copy link
Owner

alphapapa commented Mar 7, 2017

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants