Skip to content
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

Switch to the range syntax #61

Open
Ayc0 opened this issue Jun 26, 2023 · 1 comment
Open

Switch to the range syntax #61

Ayc0 opened this issue Jun 26, 2023 · 1 comment

Comments

@Ayc0
Copy link
Collaborator

Ayc0 commented Jun 26, 2023

instead of using @media (min-width: …) and @media (max-width: …), we should use @media (… <= width < …): At the moment, the breakpoints are from 0 to 575 for xs, then from 576 to 767 for sm etc. This means that all sub-pixels between 575px and 576px aren't tracked.

But we need this syntax to be more used (at least 95%):

https://caniuse.com/css-media-range-syntax

@Ayc0
Copy link
Collaborator Author

Ayc0 commented Jun 26, 2023

Another thing we can try is check if the syntax is supported. If yes we can use it, if no, we can do -0.1px on the upper bound.

We can also put that behind a flag, like useExperimentalRangeSyntax in the provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant