Re: [csswg-drafts] [css-position-3] List all specified properties that establish a containing block for fixed-position elements (#12083)

Honestly, I shouldn't have gone digging through implementation code you referenced to begin with — that’s not where specs should be clarified. I only added `filter` and `backdrop-filter` because Chrome’s code explicitly links them to spec-defined behavior.

As for `rotate`, `scale`, and `translate`: these are *values* of the `transform` property, not standalone properties. The spec is [already clear](https://drafts.csswg.org/css-transforms/#containing-block-for-all-descendants):

> "Any value other than `none` for the `transform` property also causes the element to establish a containing block for all descendants. Its padding box will be used to layout for all of its absolute-position descendants, fixed-position descendants, and descendant fixed background attachments."  

If an implementation only defines containing block behavior for a subset of values, that’s a conformance issue — not something this issue is about.

Regarding `transform-style`, `perspective`, `backface-visibility`: fair enough. Their effect just reinforces my original ask because the lack of a centralized list leads to inconsistent documentation. For example: [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_display/Containing_block#identifying_the_containing_block), list some of the properties but not others, and even warns about inconsistencies:

> "If the position property is absolute or fixed, the containing block may also be formed by the edge of the padding box of the nearest ancestor element that has any of the following:
>- A filter, backdrop-filter, transform, or perspective value other than none.
>- A contain value of layout, paint, strict or content (e.g., contain: paint;).
>- A container-type value other than normal.
>- A will-change value containing a property for which a non-initial value would form a containing block (e.g., filter or transform).
>- A content-visibility value of auto."

and

> "Note: There are browser inconsistencies with `perspective` and `filter` contributing to containing block formation."


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


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

Received on Thursday, 17 April 2025 14:01:25 UTC