Re: [csswg-drafts] [css-anchor-position-1] Grid-based anchoring syntax? (#9145)

> In the current spec you'd write that as bottom: anchor(top); right: anchor(right);; in this proposal you'd alternately be able to write inset-area: top / start center; and get the same effect.

Well, not quite the same, because of the physical/logical differences. In RTL context, it'd be left: anchor(left). One of the interesting things that the grid-based syntax opens up, because it's keyword-based, is being able to use logical+physical combos.

Another interesting thing that it opens up is the ability to use the writing-mode of the anchor or the containing block, not only the writing-mode of the abspos itself. We didn't really explore this, but the alignment properties do this with the e.g. `start` vs `self-start` keywords.

But the main goal was, really, to make it easier to express the author's intention in a more convenient and natural way, without requiring a lot of math-y thinking (at least for the common cases)...

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9145#issuecomment-1687453304 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 22 August 2023 05:25:33 UTC