-
Notifications
You must be signed in to change notification settings - Fork 213
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
[Title Bar Customization] Use CSS environment variables to layout title bar #212
Conversation
@amandabaker I was already gone for the day when this request came in. On the whole I think it’s good. Did you consider using logical properties for the directions rather than left/right? I know CSS is currently being refactored to support logical properties, so it might be worth consideration. More: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties |
The original approach was to use For example, if the browser is in Hebrew (RTL browser layout), and the content is in English (LTR text direction), then which of those does But what if instead a developer flips the direction on some lower element ( Since we already are dealing with L/R/T/B in the case of All that said, inset-inline is an especially confusing topic when crossing the border between browser chrome and web content, so if I'm making a mistake here, then I don't mind going back to revisit the inset-inline option. |
@amandabaker I totally see where you’re coming from. My general feeling is that if logical properties are used, they would relate to the content (according to the root element) and not the browser chrome. We should probably flag it as something to discuss with the CSS WG as they are the ones who would ultimately make the call on how it should be standardized. |
@aarongustafson Agreed. This is the issue against the CSS WG, but it hasn't gotten any feedback yet: w3c/csswg-drafts#4721 Ultimately, we can do this either way if we tell developers that they must set the direction on the root of the document if they want to use this feature with RTL, so if they decide to go with the inset-inline approach, then we can adjust appropriately. |
Update explainer to use and explain new CSS environment variables:
unsafe-area-top-inset-left/right
.CSS working group proposal:
Related issues:
controlsOverlay
bounding rect #203 [Title Bar Customization] Consider using css env variables forcontrolsOverlay
bounding rect