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

Inaccurate breakpoint max-width when using rem values #2558

Closed
3 of 4 tasks
fiadone opened this issue Apr 29, 2023 · 1 comment · Fixed by #3003
Closed
3 of 4 tasks

Inaccurate breakpoint max-width when using rem values #2558

fiadone opened this issue Apr 29, 2023 · 1 comment · Fixed by #3003
Assignees

Comments

@fiadone
Copy link

fiadone commented Apr 29, 2023

UnoCSS version

v0.51.8

Describe the bug

When we customize the theme's breakpoints via config by using rem-based values, the calcMaxWidthBySize utility provided by the preset-mini uses a subtraction coefficient of 0.1 which produces an inaccurate value in the resultant media queries, since it should be 1/16 instead (or, more generally, 1/rem-context-size).

Reproduction

https://uno.antfu.me/play/?html=DwEwlgbgBAFgjFAZgGwKYA8oCsCuBnAFzEQE8BaAY1QDsDUAnKMOgWz0prsYHMBDABzIAmKMBYgAXCgyUA9sgB8AKCijw0QXAAsUAEaz6IBnoNH6ZeqhAB6AMwAGKAuDX1y1aEhRNO-YeMUyLx4eAC8AER%2BZhZWdvbhzq6Q7mpePnrcZLrIOKjWQkKJbiqpGmTaUIHBYZGZ2bn5QgkuxS3JQA&config=JYWwDg9gTgLgBAbzgEwKYDNgDtUGEJaYDmcAvnOlBCHAOQCuWEAxgM6u0BQnqAHpLBQYAhvQA28NJhz5CwIgAoEnOHBgALVCFQAuRCtVwARlFTCA1pGwxWe5YcMhke2gBYAHKZC0ANAYdiRC4AbK5evv6GvGIu7gAM4ZGkBsmkAJRAA&css=Q&options=N4IgzgLgTglgxhEAuaBXApgXyA

System Info

No response

Validations

@stale
Copy link

stale bot commented Jun 29, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

Successfully merging a pull request may close this issue.

2 participants