- From: Mayank via GitHub <sysbot+gh@w3.org>
- Date: Thu, 23 May 2024 14:56:20 +0000
- To: public-css-archive@w3.org
6 years later, this feature has become even more desirable, thanks to container queries. Container queries, as the name implies, can only query containers. Today this means we often need to add a wrapping DOM element to be able to query it. With something like `::contents`, we'd be able to query the same element! ```css .thing { container-type: inline-size; &::contents { @container (width < 20ch) {…} } } ``` This pattern would similarly be incredibly useful for container **style** queries. ```css button::contents { @container style(--variant: cta) {…} } ``` ```html <button style="--variant: cta"> ``` -- GitHub Notification of comment by mayank99 Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2406#issuecomment-2127351491 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 23 May 2024 14:56:20 UTC