Description
Related page
https://next.mui.com/material-ui/migration/migrating-to-pigment-css/
Kind of issue
Missing information
Issue description
Hi,
I have a lot of Emotion (sx-constructs) and styled components with variables and selectors like [theme.breakpoints.down('md')]:
i miss documentation how to migrate all this to Pigment CSS:
for example:
const navigationHeight = 56;
const StyledSnackbarInfo = styled(Snackbar)(({ theme }) => ({
'&.MuiSnackbar-root': {
marginBottom: calc(${navigationHeight + 8}px)
,
},
[theme.breakpoints.down('md')]: {
'&.MuiSnackbar-root': {
marginBottom: calc(${navigationHeight + 10}px)
,
},
},
}));
OR
const drawerWidth = 240;
<AppBar
position="fixed"
sx={{
width: { md: calc(100% - ${drawerWidth}px)
},
ml: { md: ${drawerWidth}px
},
}}
...
How can i migrate all sx-constructs with these ${drawerWidth} variables and [theme.breakpoints.down('md')] as selectors in styled components to Pigment CSS?
Thanks in advance!
Context
No response
Search keywords: variables selectors pigment css