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

fix(preset-mini): breakpoint in max-width issue #709

Merged
merged 1 commit into from
Mar 14, 2022
Merged

fix(preset-mini): breakpoint in max-width issue #709

merged 1 commit into from
Mar 14, 2022

Conversation

achinchen
Copy link
Contributor

description

ref

@achinchen achinchen requested a review from antfu as a code owner March 14, 2022 05:21
@netlify
Copy link

netlify bot commented Mar 14, 2022

✔️ Deploy Preview for unocss ready!

🔨 Explore the source changes: ff0b3a0

🔍 Inspect the deploy log: https://app.netlify.com/sites/unocss/deploys/622ed0d737ddd9000803e48d

😎 Browse the preview: https://deploy-preview-709--unocss.netlify.app/

@chu121su12
Copy link
Collaborator

chu121su12 commented Mar 14, 2022

Note that in bootstrap, the delta is 0.02px

Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.

https://github.com/twbs/bootstrap/blob/8fe82c7176a577190f2d69f9cbdd990b7f3c8493/scss/mixins/_breakpoints.scss#L34-L46

@achinchen
Copy link
Contributor Author

Note that in bootstrap, the delta is 0.02px

Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.

https://github.com/twbs/bootstrap/blob/8fe82c7176a577190f2d69f9cbdd990b7f3c8493/scss/mixins/_breakpoints.scss#L34-L46

Due to I use the delta is 0.1 instead of 0.01, I think it's okay. There's demo for delta 0.1.

However it's quite interesting information for the issue with 0.01 vs 0.02 in Webkit.
I did the experiment to confirm the "delta 0.01 bug" in different browsers by using the demo from bug report page, Firefox in MacOS is good for 0.01 but Chrome in MacOS isn't.

Thanks (:

@antfu antfu merged commit 50aff8d into unocss:main Mar 14, 2022
@achinchen achinchen deleted the fix/preset-min/fix-media-query-with-max-width branch March 14, 2022 11:18
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 this pull request may close these issues.

RWD issue: lt-${breakpoint} should be ${breakpointValue - 0.1px}
3 participants