Allow the sx
prop to work with statically defined variables
#296
Labels
package: system
Specific to @mui/system
sx
prop to work with statically defined variables
#296
Summary
It seems that currently CSS objects must be defined inline for the
sx
prop to be picked up on and the styles statically extracted.Ideally we would have the option to define static CSS object variables which can be provided to the
sx
prop.Examples
Potentially if needed styles could require a
css
branding function to make it easy for the compiler to pick up on?Motivation
I have a large codebase using
@emotion/react
with theircss
prop and I have a lot of code very similar to my example below. Allowing this would enable simple migrations away from@emotion/react
by substituting thecss
prop for thesx
prop. Excited to see where this library goes, it looks great!Search keywords: sx
The text was updated successfully, but these errors were encountered: