-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Box] Add breakpoint value support to maxWidth prop #26984
Conversation
@ansh-saini could we add a test case? |
Sure, but I'm a little confused, there are two test files for |
Don't test this at the Box's level. Test the transformation behavior instead. https://github.com/mui-org/material-ui/blob/next/packages/material-ui-system/src/styleFunctionSx/styleFunctionSx.test.js or https://github.com/mui-org/material-ui/blob/next/packages/material-ui-system/src/style.test.js not sure which one is better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also update the documentation for the sx prop - https://github.com/mui-org/material-ui/blob/next/docs/src/pages/system/the-sx-prop/the-sx-prop.md#sizing
@mnajdova The sx or the https://next.material-ui.com/system/sizing/#width page? I thought we said that sx was to give an overview and the flat props to go into the details :) |
My opinion was that every custom transformation should be on the https://github.com/mui-org/material-ui/blob/next/docs/src/pages/system/the-sx-prop (not including the pure CSS props that does not have any transformation). As the |
@mnajdova This would mean that we need to duplicate the information between the sx page and the detailed sections. I don't think that it can work: 1. it would make it easier to get unsynchronized information, 2. the "sx props" page is better at documenting some of the custom behaviors than in the dedication pages. This seems counterproductive. the sx prop is only about the sx prop, while the other sections cover the flattened props (which are important too). |
71ac78c
to
5ef0f9e
Compare
5ef0f9e
to
d3c6b92
Compare
d3c6b92
to
6e10ad0
Compare
Adds breakpoint value support on Box
maxWidth
prop as suggested in this commentCloses #25771
Preview: https://deploy-preview-26984--material-ui.netlify.app/system/sizing/#max-width