I wonder what's the % of devices with a notch. Seems like they are going away anyway.
-
-
-
So far, it is worthy by just by counting the number of the iPhone X and iPhone 11 out there and all all its variants (XR, XS, XMax...) And we didn't even take into account all other cheap copies that even copied the notch :)
- Još 8 drugih odgovora
Novi razgovor -
-
-
To make it easier to work with I prefer using --safe-area in combination with custom properties (you can use shorter names than shown in the screenshot ;-) .class { padding-top: var(--safe-top); }pic.twitter.com/y88p8ICQD8
-
Both `env()` and `var()` have fallback values, (https://developer.mozilla.org/en-US/docs/Web/CSS/var …, https://developer.mozilla.org/en-US/docs/Web/CSS/env …; search for “declaration-value”), this would allow for further code simplification.
- Još 2 druga odgovora
Novi razgovor -
-
-
So useful! Thanks!
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
You should use the meta tag `viewport-fit=cover` to avoid white margins on devices with notch or any non standard viewport shape.
Then you can use environment variables to use safe areas.
More info here