-
Notifications
You must be signed in to change notification settings - Fork 667
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
[css-env-1] list of predefined variables #2630
Comments
Could we get a env variable to access the possible UI's scrollbar size (width/height)? For designs to work within/around?
Something like |
Would be nice to have access to browsers navigational interface (e.g. bottom-screen navigation buttons) as displayed here: https://nicolas-hoizey.com/2015/02/viewport-height-is-taller-than-the-visible-part-of-the-document-in-some-mobile-browsers.html |
@Malvoz The difference in the heights of the initial containing block ("smallest possible viewport") and the visual viewport? https://developers.google.com/web/updates/2016/12/url-bar-resizing In current iOS mobile, safari shrinks both the top and bottom nav, while chrome only has the top nav to shrink.
Edited |
The usage example in WebKit's proposal doesn't make sense IMHO, reducing its attractiveness for developers, because Let's say we want to set the font size of an element deeply nested in the DOM tree to 1.2x the user preferred font size. We could use We could use So, if we want to make sure our component is accessible (never sets a font size below the one the user asked for), and can set a font size that is a factor of the user preferred font size, .my-nested-element {
font-size: calc(1.2 * env(user-font-size));
} |
What @nhoizey said, as well as how the |
This is a follow up to https://drafts.csswg.org/css-env-1/#issue-2732e813
So far we have the safe area variables:
safe-area-inset-top: Inset, as a from the top of the viewport to the title-safe content area.
safe-area-inset-right: Inset, as a from the right of the viewport to the title-safe content area.
safe-area-inset-left: Inset, as a from the left of the viewport to the title-safe content area.
safe-area-inset-bottom: Inset, as a from the bottom of the viewport to the title-safe content area.
Also Safari Tech Preview 52 has shipped both fullscreen-inset-top and fullscreen-auto-hide-delay but there is no documentation.
issues/1693 mentions the following too but afaik these haven't shipped anywhere:
user-font-size: User's requested font size
user-background-color: User's requested background color
user-foreground-color: User's requested foreground color
The text was updated successfully, but these errors were encountered: