-
Notifications
You must be signed in to change notification settings - Fork 674
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
Values of space keys when referenced in variants are not populated in CSS #1027
Comments
I don't think you can alias a responsive tuple. You don't have to shallow copy it,
This is treated as a nested scale. You can do This would be a pretty awesome feature, especially since we can do |
I think this is a slight difference in understanding how variants and scales work. Scales (e.g. |
Thank you @jxnblk for the clarification! What is the recommended best practice for achieving reusability of responsive scale arrays with override ability? |
Overriding responsive values from a variant doesn't work as well as it should at the moment, but it's something we'd like to address for v1, see #832 |
Describe the bug
Create an array assigned to a
space
key for responsive values (called "lg" in this issue). Use that key in a variant for a property. Theme-ui does not populate those values in the CSS as expected. Using[...theme.space.lg]
does work, however.To Reproduce
Expected behavior
margin-right
andmargin-left
values should be populated inPeople
component's CSS like so:The above CSS results when using
theme.people
definition:Actual behavior
margin-left
andmargin-right
are missing:The text was updated successfully, but these errors were encountered: