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

add detection for env() functions #921

Merged

Conversation

romainmenke
Copy link
Member

@romainmenke romainmenke changed the title add detection for env functions add detection for env() functions Apr 5, 2023
@@ -0,0 +1,7 @@
@media (min-height: calc((safe-area-inset-top) + 0.02px)) {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious here, why is it 0.02 and not 0.01 ? Is that the limit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.02 is the smallest fraction that works well for some older Safari versions.
This is something that was tested by bootstrap and reported to postcss-media-minmax.

Anything smaller than 0.02 is rounded away.
So 900.01 === 900 but 900.02 !== 900

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!!

Copy link
Member

@Antonio-Laguna Antonio-Laguna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice one!

@romainmenke romainmenke merged commit 571f800 into main Apr 9, 2023
@romainmenke romainmenke deleted the add-detection-for-env-funciton--passionate-newt-86807acb8b branch April 9, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants