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

[css-anchor-position] flip should also flip safe-area-inset values #10422

Open
fantasai opened this issue Jun 11, 2024 · 1 comment
Open

[css-anchor-position] flip should also flip safe-area-inset values #10422

fantasai opened this issue Jun 11, 2024 · 1 comment

Comments

@fantasai
Copy link
Collaborator

https://drafts.csswg.org/css-anchor-position-1/#swap-due-to-a-try-tactic

Flipping should probably flip the safe-area-insets (if that's possible).

@andruud
Copy link
Member

andruud commented Jun 12, 2024

Doesn't quite fit within the exiting nature of "flips" in Blink, but it should be possible. We can spec that, for a style resolution under a given flip, the substitution value of env() is modified according to the flip.

So for example: for left: env(safe-area-inset-left) and flip-inline, safe-area-inset-left is transformed to safe-area-inset-right during substitution. So post-substitution we get e.g. left: 42px; /* from safe-area-inset-right */. Then, separately, that value is swapped with right using the existing mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants