Re: [csswg-drafts] [css-anchor] Detecting active @position-fallback (#8171)

> It uses a new `container-type:anchored` ,and `container anchored(fallback: <integer>)` where `0` means no fallback is used and otherwise a 1-based index into the computed `position-try-fallbacks` value.
> 
> Disclaimer: I went for the number-indexing for fallbacks for ease of implementation as I wanted to explore implementability, containment requirements, and other limitations.

As discussed internally _(resharing here for visibility)_: I think we should eventually end up with a syntax where one can refer to a fallback keyword/ident in the query.

E.g. `@container anchored(fallback: none)`, `@container anchored(fallback: flip-block)`, `@container anchored(fallback: --horizontal)`, etc.

Referring to numeric indices is error-prone and requires one to adjust the numbers when inserting a new fallback option. But it sure is good enough to start playing with it :)

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


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

Received on Monday, 26 May 2025 08:19:31 UTC