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
Unable to compose themed css in emotion10 #997
Comments
I think this is by design, as you are using object notation ( I can see the documentation saying you can merge styles in an array here: https://next.emotion.sh/docs/composition (but it uses And here are the docs for object notation: https://next.emotion.sh/docs/object-styles (which are not strings, but objects), there is a note on composition there which might be helpful. Your solution looks fine to me! Hope that helps! : ) |
It doesn´t say in the docs that it needs to be a string - and IMO it would make a lot of sense to be able to put a function or an object in there as well. |
Would be nice to have this feature. Actually the workaround is to make: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This will be possible in upcoming v11, we’ve just merged in #1130 which Implements this |
emotion
version: 10.0.0-beta.8react
version: 16.6.0Relevant code.
What you did:
Tried to compose with one of the parts being a function/themed css.
What happened:
"Functions that are interpolated in css calls will be stringified..."
Is this by design or a bug? The workaround I found is to use the spread operator and call on the css function:
The text was updated successfully, but these errors were encountered: