-
-
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
theme.breakpoint.down not working correctly #17875
Comments
@lcswillems Do you confirm it's a duplicate of #13448? I'm not sure we use the same convention, from my perspective, + 1 accounts for the next element in the breakpoint list. lg + 1 = xl, md + 1 = lg. The exclusive interval ( |
Do you have any idea on how we could make the documentation easier to understand, waiting for a potential change of behavior in v5? |
Yes, it is a duplicate.
Okay, I see. For me it means, "+1" in pixels... For me, it is really confusing. In my head, "sm", "xs" are values... And if I do Moreover, if I have this code:
that hides an element when screen size is lower than 300 and if I want to transform this code in its opposite, i.e. into a code that shows the element when screen size is higher than 300, I just have to replace But for breakpoints
|
@lcswillems Thanks for the feedback. I agree, I think that it's simpler to think of the breakpoints as values and not ranges. It's what #13448 plans to solve. Now, because the usage of down() should be significantly less frequent than the usage of up(), we can live with it for the coming months until v5 land. |
Same issue, I'm using Material UI 4.9.11. |
Duplicate of #13448 |
Current Behavior 😯
theme.breakpoints.down('md')
represents interval[0, lg+1[
.Expected Behavior 🤔
It should represent interval
[0, md+1[
as mentioned in the documentation.Steps to Reproduce 🕹
I made an elementary CodeSandBox : https://codesandbox.io/s/material-demo-w8bhk . The bar should become blue at a medium size, but it does it at a large size.
The text was updated successfully, but these errors were encountered: