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

Support global selectors #19

Merged
merged 1 commit into from Aug 24, 2016

Conversation

steadicat
Copy link
Contributor

@steadicat steadicat commented Aug 23, 2016

This is an easy solution for #16. Any selector prefixed with $ is passed through to the generated CSS unchanged, and omitted in the resulting JS object.

This allows for comma-separated lists of selectors as well, such as { '$html, body, .button': {} }, which is pretty useful when defining global stylesheets.

An alternative solution would be to allow comma separated selectors everywhere, and requiring the prefixing of every selector individually ({ foo: {}, bar: {}, '$html, $body, $.button, foo, bar': {} }), but that would be a bigger change. Would love to hear thoughts on this.

@steadicat
Copy link
Contributor Author

Again, test broken because of #17.

@martinandert martinandert merged commit 4f591b2 into martinandert:master Aug 24, 2016
@martinandert
Copy link
Owner

Wow, thanks for this and the other two pull requests. Great stuff! Merged all three and released a new minor version.

Would you mind updating the README with an explanation of this feature? And also please add yourself to the "contributors" section of package.json if you like.

@steadicat steadicat deleted the global-selectors branch August 24, 2016 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants