-
Notifications
You must be signed in to change notification settings - Fork 675
Referencing theme colors in border and boxShadow #75
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
Comments
Yeah, for border (and other CSS) properties, I generally recommend using the regular (not shorthand) properties ( As for
For reference, here is a list of the properties that pick up values from the theme: https://styled-system.com/css/#theme-keys |
Thanks! Using functions for property values is a nice feature. I couldn't find it from the docs. I think it might deserve a highlight somewhere. Btw, have you considered adding |
I've added a section to describe using functional values here: https://theme-ui.com/sx-prop/#functional-values As far as the |
@jxnblk could you perhaps consider to add parsing of color variables inside the boxShadow property? While regarding the bordercolor it is not necessary due to the border-color property, in boxShadow it would be very nice. |
I expected I could use theme colors like this, but
primary
is not replaced with the theme color:Border bottom color can be achieved like this (but it took a while to realize that
borderColor
must be defined afterborderBottom
in order it to work):For boxShadow, on the other hand, there isn't a separate property to define the color in.
It would be really handy being able to use theme colors inside border and boxShadow definitions.
The text was updated successfully, but these errors were encountered: