Re: [csswg-drafts] [cssom-view] `getClientRects()` should return a flattened list of child rects for `display: contents` (#12040)

I agree that we should fix this and that compat is not a problem, I was just mentioning it in case, as some teams are more risk averse than others.

Yes, anchor positioning also working would be great. Not sure if this would be sufficient for it, I suspect it would need a separate exception, but I cannot imagine any cases where the current behavior would be desirable. 

As for use cases, the one I’ve run into is web components wrapping natives to get the UA a11y and behavior but wanting to still make them stylable from the outside with regular CSS properties and without parts. Eg a <foo-button> wrapping a native <button> but still wanting properties on the host to work, and style the underlying button. Applying display: contents on the host and inheriting liberally on the shadow button seems to be the only way to do this, not just currently, but in the forseeable future (in some cases even if extending builtins were a possibility). 

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


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

Received on Sunday, 6 April 2025 16:43:38 UTC