Skip to content

[css-conditional-5][css-overflow-5] Valid size query containers and box tree re-ordering #11213

@lilles

Description

@lilles

In the spec: https://drafts.csswg.org/css-conditional-5/ref-for-query-container①⑧, valid query containers are said to be selected from the element's flat tree ancestors.

We have encountered an issue when the box tree order does not follow the flat tree order. The box for ::scroll-marker-group becomes a sibling of its originating element. While normally pseudo elements can query the size of their originating element, this causes an issue with layout escaping the container causing circularity.

Can we say something generally about box tree re-ordering and size query container candidates?

For the ::scroll-marker-group case we know that if it generates a box, it will be a sibling of its originating element's box. For future cases, if the box tree order depends on the element's style, we might not know at the time we query the container where the element's box will end up.

If we know about the box re-ordering at query time we could either:

  1. Not consider ancestors which will not be box tree ancestors as valid size query containers
  2. Always evaluate size queries to unknown for such containers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Wednesday Morning

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions