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

Small question about the 

> alignment on block are not easy to emulate with anchor positioning

Do I understand correct that this is the case when neither top&bottom or left&right (or their logical alternatives) are set, and when the absolutely positioned element gets its position in relation to its place in the content on that axis with missing inset property based on where it would've been if not absolutely positioned or something?

> <TabAtkins> (not correct; you're always positioning relative to the prev/following element, and those can receive a name)

I think that won't work for the plain text cases, see this case: https://codepen.io/kizu/pen/ExOvBEo, as we don't have anything to add the anchor to (we could wrap things with spans, but not sure this is always viable)

My proposal: what if we'd have some kind of a keyword that could be used to anchor things to that _hypothetical box_ position? I imagine the information about where it is should be always available for an absolutely positioned element, so maybe it could be used explicitly?

This would make it so we would unlock any resolution that removes an ability to reuse this behavior, as we could then use it explicitly.

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


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

Received on Thursday, 14 September 2023 09:19:10 UTC