-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUIThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUItype: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.waiting for 👍Waiting for upvotes. Open for community feedback and needs more interest to be worked on.Waiting for upvotes. Open for community feedback and needs more interest to be worked on.
Description
Summary 💡
For now, responsive values only behaves as we're using breakpoints.up('xx'), and there's no way around to make it behaves like breakpoints.down('xx'). Providing a way to change this would be useful to some developers trying to add responsiveness to their app from larger screen resolution to smaller screen resolution.
Examples 🌈
/*
* Below works same as `theme.breakpoints.up(key)`, hence previously defined padding is overriden
*/
<Paper sx={{ padding: { xs: 0 } }}>
This box has a responsive width.
</Paper>
/*
* So we need to add default style value to prevent overriding
*/
<Paper sx={{ padding: { xs: 0, md: 8 } }}>
This box has a responsive width.
</Paper>Motivation 🔦
We're adding responsive(mobile) UI to desktop oriented design, and we found that we need to specify original style property value(if it has one) when using sx prop's responsive values in material UI components(other than <Box />)
User requests
- https://mui.zendesk.com/agent/tickets/15646 use max-width over min-width.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUIThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUItype: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.waiting for 👍Waiting for upvotes. Open for community feedback and needs more interest to be worked on.Waiting for upvotes. Open for community feedback and needs more interest to be worked on.