`xs: 0px` cannot be assigned as minimum breakpoint
See original GitHub issueHi guys !
In a NextJs project, I use your library for handling easily breakpoints (thanks by the way).
Unfortunately, this code below seems does not work since this following error has triggered :
Error: [styled-breakpoints]: 'xs: 0px' cannot be assigned as minimum breakpoint.
FYI, I use default breakpoint values.
export const Container = styled.div<WrapperProps>`
${space}
margin-left: auto;
margin-right: auto;
${between('xs', 'md')} {
width: 90%;
}
${up('md')} {
width: 70%;
}
`;
I remember a few months ago, this kind of code worked.
I use next 12.0.7 (which uses SWC instead of Babel now), styled-components 5.3.3 and styled-breakpoints 10.2.1.
Thanks for your help 😃.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
custom breakpoint xs fails if min-width: 0px not specified #1050
when screen is smaller than max-width: 599.99px, media observer should next() xs. What is the current behavior? The changes array has LT-SM LT- ......
Read more >styled-breakpoints - npm
Simple and powerfull css breakpoints for styled-components and emotion. Latest version: 11.1.1, last published: 6 months ago.
Read more >How to Use CSS Breakpoints in Material UI - Level Up Coding
This will check if the breakpoint has a minimum width of 600px. If it matches, meaning if the screen is at least 600px...
Read more >CSS · Bootstrap
Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller...
Read more >Media queries in MUI components - reactjs - Stack Overflow
You can see MUI default breakpoints here. The breakpoint names and values can be overrided using createTheme() : const theme = createTheme({ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mg901 You’re right. So, it’s why
sm
is explicitly forbidden in this case. Thanks for your answer 😉.Hi, @fvandenbulck !) Just replace your code with this