#1103: CSS Anchored Fallback Container Queries

Visit on Github.

Opened May 28, 2025

こんにちは TAG-さん!

I'm requesting an early TAG design review of CSS Anchored Fallback Container Queries.

A declarative way of styling descendants of anchor positioned elements, based on their applied position-try-fallbacks, using @container queries.

Discussions

Discussed Jun 2, 2025 (See Github)

Xiaocheng: Extends anchor positioning and container queries. Strong demand to style the descendents of the anchored elements depending on which fallback position it takes. E.g. show an arrow pointing in the right direction. New syntax based on container queries so descendents of anchored element can query the current fallback position. Use cases are strong, and I don't see considerations beyond typical CSS scope. However, spec text seems not finished. No spec link in the review link.

Jeffrey: It is an early review, so no spec is expected.

Xiaocheng: Only consideration needed is whether the syntax is ergonomic enough. Explainer lists several limitations of current design. E.g. to use container queries, you need style containment. Should we suggest to evaluate whether limitations will affect intended use cases? Feel like the limitations are normal. These are standard requirements for containment.

Jeffrey: Could ask the question of whether the requirements based on having fallback not depend on the styles, are the same as the normal container requirements of not having size (etc?) not depend on the styles. They've probably thought about it adequately. You're probably ready to draft a comment?

Xiaocheng: Will do. What to ask?

Martin: Answer "Are we on the right track? Is there anything we've missed?"

Jeffrey: You can close it. there's a Resolution that's "this is on the right track" rather than "satisfied"

Xiaocheng: "validated"

Jeffrey: Probably can post that this week. Maybe have one other person proofread the comment.