Mastodon Feed: Post

Mastodon Feed

Boosted by kornel ("Kornel"):
webstandards_dev ("Web Standards") wrote:

Using safe-area-inset to build mobile-safe layouts. Modern phones have notches, cutouts, and floating buttons that overlap your UI unless you account for them. The Polypane blog walks through env(safe-area-inset-*), why you need viewport-fit=cover in the , combining insets with calc() for extra spacing, and the new safe-area-max-inset-* values that stay stable even when the address bar hides on scroll. #css #layout

https://polypane.app/blog/using-safe-area-inset-to-build-mobile-safe-layouts/

Polypane logo, “Using safe-area-inset to build mobile-safe layouts” title, code block setting body padding with env(safe-area-inset-*), and a phone mockup with a “Safe action area” button.