[csswg-drafts] [css-anchor-position-1] More intuitive alignment defaults when using one-sided insets (#12512)

fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-anchor-position-1] More intuitive alignment defaults when using one-sided insets ==
In absolute positioning in general, if an author sets one inset and leaves the other one 'auto', we attach the absolutely positioned box to that edge (by magically resolving the `auto` inset to an appropriate length to make the containing block snugly fit the box into that position). But with `position-area`, we resolve all 'auto' insets to zero, which means that we lose this behavior.

There are two downsides to this:
- It's likely unexpected, since this works elsewhere. Usually the default alignment is what's wanted, but for center tracks, there's a little more room for preferences.
- The alignment properties are fundamentally logical, but `position-area` has options for fully logical, fully physical, and logical-physical placement combinations, so controlling the position within an area with alignment properties is not always ideal.

We could consider altering the alignment behavior for `position-area` so that in the cases where there is only one `auto` inset, we still resolve that to a used value of zero (leaving us with a usefully-sized containing block, if the author changes the alignment), but also resolve `normal` alignment to attach to the non-auto edge instead of to its usual area-based default.

What do people think? CC @kizu @mirisuzanne 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12512 using your GitHub account


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

Received on Monday, 21 July 2025 21:43:45 UTC