Re: [csswg-drafts] [css-values-5] What does sibling-index()/sibling-count() return if there's no element? (#11232)

There is a question if it should parse at all. Some relevant cases are @media queries, @page properties, @font-face descriptors.

A similar case is anchor-size(). The spec handles anchor-size() as IACVT if not used in a sizing property, but whether anchor-size() should parse at all in a non-element context like the ones mentioned above is not clear to me.

Testing anchor-size() in Chrome turns out that it is valid at parse time for @page properties, but not for @font-face. Also, anchor-size() causes media queries to become general-enclosed.

Additionally, there is the case for @container queries where I think the obvious behavior is that sibling-index()/count() resolves against the container element like font relative units, which should probably have a clarifying comment in the spec for container queries.


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


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

Received on Thursday, 13 March 2025 07:07:18 UTC