[csswg-drafts] [css-contain] Container queries wrongly assume that all elements can be contained (#7667)

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-contain] Container queries wrongly assume that all elements can be contained ==
See https://drafts.csswg.org/css-contain-3/#container-type

> - `size`
>    Establishes a [query container](https://drafts.csswg.org/css-contain-3/#query-container) for [container size queries](https://drafts.csswg.org/css-contain-3/#container-size-query) on both the [inline](https://drafts.csswg.org/css-writing-modes-4/#inline-axis) and [block axis](https://drafts.csswg.org/css-writing-modes-4/#block-axis). Applies [layout containment](https://drafts.csswg.org/css-contain-2/#layout-containment), [style containment](https://drafts.csswg.org/css-contain-2/#style-containment), and [size containment](https://drafts.csswg.org/css-contain-2/#size-containment) to the [principal box](https://drafts.csswg.org/css-display-3/#principal-box).
> - `inline-size`
>    Establishes a [query container](https://drafts.csswg.org/css-contain-3/#query-container) for [container size queries](https://drafts.csswg.org/css-contain-3/#container-size-query) on the container’s own [inline axis](https://drafts.csswg.org/css-writing-modes-4/#inline-axis). Applies [layout containment](https://drafts.csswg.org/css-contain-2/#layout-containment), [style containment](https://drafts.csswg.org/css-contain-2/#style-containment), and [inline-size containment](https://drafts.csswg.org/css-contain-3/#inline-size-containment) to the [principal box](https://drafts.csswg.org/css-display-3/#principal-box).

While all elements accept style containment, layout containment requires all these conditions:
 - the element generates a [principal box](https://drafts.csswg.org/css-display-3/#principal-box)
 - its [principal box](https://drafts.csswg.org/css-display-3/#principal-box) is not an [internal table box](https://drafts.csswg.org/css-display-3/#internal-table-box) or is a [table-cell](https://drafts.csswg.org/css-display-3/#valdef-display-table-cell)
 - its [principal box](https://drafts.csswg.org/css-display-3/#principal-box) is not an [internal ruby box](https://drafts.csswg.org/css-display-3/#internal-ruby-box) nor a [non-atomic](https://drafts.csswg.org/css-display-3/#atomic-inline) [inline-level](https://drafts.csswg.org/css-display-3/#inline-level) box

Size containment and inline-size containment, in addition to the requirements above, also need:
 - its [inner display type](https://drafts.csswg.org/css-display-3/#inner-display-type) is not [table](https://drafts.csswg.org/css-display-3/#valdef-display-table)
 - its [principal box](https://drafts.csswg.org/css-display-3/#principal-box) is not a [table-cell](https://drafts.csswg.org/css-display-3/#valdef-display-table-cell)

It makes no sense to establish a [query container](https://drafts.csswg.org/css-contain-3/#query-container) for [container size queries](https://drafts.csswg.org/css-contain-3/#container-size-query) if size containment has no effect on the element. Obvious circularity issues.



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7667 using your GitHub account


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

Received on Wednesday, 31 August 2022 17:48:56 UTC