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 composing styles #3

Merged
merged 2 commits into from
Aug 28, 2019
Merged

Support composing styles #3

merged 2 commits into from
Aug 28, 2019

Conversation

dhleong
Copy link
Owner

@dhleong dhleong commented Aug 28, 2019

Closes #1

Refs #1

Uses the same `composes` key that css-modules uses.

This is actually pretty straightforward. By just using the method
call within the style factory, we know that the style element will
be inserted, and we are given the class name directly, so we can
just insert that into the string of classes returned from our
method.

It'd be cool to support :composes in child definitions, but since
it's implemented by concat'ing class names it doesn't seem possible.
For that purpose you would just create a separate def* and use it
on the children directly.
@dhleong dhleong merged commit 5926709 into master Aug 28, 2019
@dhleong dhleong deleted the dhleong/compose branch August 28, 2019 13:39
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.

Support composition
1 participant