[docs] variables and selector like [theme.breakpoints.down('md')], how to use in Pigment CSS ? #203
Labels
docs
Improvements or additions to the documentation
package: system
Specific to @mui/system
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
support: docs-feedback
Feedback from documentation page
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
The text was updated successfully, but these errors were encountered: