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

Replying to: https://github.com/w3c/csswg-drafts/issues/9124#issuecomment-1679487628

**Utility:**

Using static positioning is very difficult to achieve for web-developers, as within flow-layout you need to place your abspos element in a very precise location within the DOM (and ensure it has the right `display` as well). Practically speaking not many web-developers use it and we haven't heard much desire to add more capabilities here.

> This same alignment can often be achieved using anchor positioning, but it requires setting up the relevant associations--and in the case of flow layout might be quite tricky.

I'd argue the opposite - using static-positioning in flow-layout is much more difficult as you need precise location within the DOM + correct `display`, vs. anchor positioning where can just target the element you are interested in. The current defined behaviour in the spec (from investigations) doesn't have much real-world applicability wrt. use-cases, and capabilities it does provide can easily be covered by anchor positioning.

**Compatibility:**

It's really only implemented in 1.5 layout modes, and its very buggy in all engines. (Implemented in grid, and half implemented for flexbox as only supports `align-self`).

Practically speaking not many web-developers use static-positioning, and on top of that don't place `align-self`, `justify-self` on the abspos. This wouldn't change the static-position being picked up from `align-content` / `justify-content`.

We are happy to take the compatibility risk for the proposed model, and can report back to the group if we find any major issues.

**Understandable:**

After playing around with it quite a bit the proposed model is very natural, it does what I expect. The current model has hidden confusing behaviours like the potential for `align-self` to work in both axes (column flexbox + top/bottom insets set) for example.

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


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

Received on Wednesday, 16 August 2023 00:11:40 UTC