-
Notifications
You must be signed in to change notification settings - Fork 672
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
css: Make background
a theme-aware property
#2021
Comments
Yeah, I think that's a nice addition. I wouldn't try to parse complex |
I have another great use case for this. {
primary: '#333',
gradient: 'background: linear-gradient(#e66465, #9198e5);',
...
}
// sx={{ background: 'gradient' }} |
Eeh, I’m not in favor of supporting & parsing entire CSS declarations inside theme values. Let's only permit the usage of standard theme values here. |
background
a theme-aware propertybackground
a theme-aware property
Hey @lachlanjc ,
|
Oh! Yes, that's cool with me. Semicolon-free is definitely the way to go haha |
🚀 Issue was released in |
Is your feature request related to a problem? Please describe.
I find it surprising and confusing that the
bg
shorthand can be set to a color name/key, but notbackground
, as they read the same.Describe the solution you'd like
I would like
background
to be a theme-aware property, so I can dosx={{ background: 'myCustomColorName' }}
.Describe alternatives you've considered
I can obviously use
bg
orbackgroundColor
. But once in a while, I may forget and usebackground
, and be slightly annoyed when the color name I pass doesn’t get converted to the expected color value.Additional context
I can send a PR for this if you (the maintainers) agree with the idea. Thank you!
The text was updated successfully, but these errors were encountered: