- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 22 Mar 2023 15:55:02 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-contain] Container queries within display:none are difficult to implement`, and agreed to the following: * `RESOLVED: elements within a display:none subtree have no parents that container queries can access` <details><summary>The full IRC log of that discussion</summary> <emeyer> oriol: Problem is that browsers tend to avoid computing style of elements inside a display: none subtree<br> <emeyer> …You can still force the computation with JS<br> <emeyer> …What should happen if one of these elements may have a container which is applying some rules conditionally, which may affect the comptued style you get?<br> <emeyer> …Gets more complicated if ancestor is a container or not<br> <emeyer> …In Blink, I think this was easier to implement per spec since it has some caching and first computation is cached<br> <emeyer> …That way we know if ancestors are containers or not<br> <emeyer> …Firefox doesn’t have this caching, so when it computes, the information isn’t stored in the element<br> <emeyer> …emilio didn’t think my patch to pass information around was the best<br> <emeyer> …Discussion agreed it was reasonable that an element in a display: none subtree should be treated as having no container<br> <emeyer> …This might not be good for style queries<br> <emeyer> emilio: Some of this is complexity specific to Firefox, but in general, some of this is very messy and not very interoperable<br> <emeyer> …I’m not a fan of adding complexity here<br> <emeyer> …We do something similar where older browsers do transforms on display: none elements as none<br> <emeyer> …I’d rather do the easy-to-implement thing instead of having extra complexity<br> <emeyer> …I don’t think it’s particularly useful to check elements based on container queries when the container isn’t there<br> <emeyer> …Any answer will be weird<br> <emeyer> astearns: Is there a way of having elements escape a display: none ancestor using CSS?<br> <emeyer> emilio: No, which is why browsers optimize them away<br> <emeyer> astearns: Then I have no concerns<br> <emeyer> …Proposed resolution: elements within a display:none subtree have no parents that container queries can access<br> <emeyer> emilio: The wording could be they have no query containers, though I’d like room to confirm this is fine<br> <emeyer> …We can resolve and seek comment after<br> <emilio> s/room/Rune<br> <emeyer> astearns: Anyone on the call want to wait for Rune’s response?<br> <emeyer> (silence)<br> <emeyer> RESOLVED: elements within a display:none subtree have no parents that container queries can access<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8197#issuecomment-1479833291 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 22 March 2023 15:55:03 UTC