Re: [csswg-drafts] [css-align-3][css-position-3] Better interaction of auto insets and self-alignment properties? (#9124)

> That is exactly what I meant, and I think it is useful: you're immediately able to align yourself relative to the anchor box. (If you think about the current use cases of abspos, rather than focusing on pop-ups specifically, it'll be more obvious why this is useful.)

Hm, I don't think I agree. For one, if that *is* the box that you want, you can get it with a one-liner `inset: anchor(same);` already. So, we're not meaningfully saving authors any complexity. 

In addition, having this behavior means authors need to track two totally different behaviors for what `auto` does when using alignment props, depending on whether they have a single auto inset or two. Similarly, the alignment box could differ based on axis, which generally is also a little confusing. (That is, if you specified just `top: 0;` it would be equivalent to `top: 0; bottom: 0; left: anchor(left); right: anchor(right);`, which feels confusing/weird.)

I'd like to avoid this sort of mental complexity if it's not significantly helping authors, and given how trivial it is to invoke this behavior when it's desired, I don't think that's the case.

(I'll reiterate my general point - the double-auto "static position" behavior was nothing more than a simple, early, very weak/limited form of anchor positioning. It did something useful at the time when we didn't have the tools to do better, but it's no longer necessary, and we should instead opt for a simple, consistent model for the future, as much as compat allows.)

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


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

Received on Wednesday, 23 August 2023 21:56:24 UTC