- From: Una Kravets via GitHub <sysbot+gh@w3.org>
- Date: Thu, 13 Jan 2022 19:36:30 +0000
- To: public-css-archive@w3.org
I don't think we should default everything to being a style container. This came up with [currentBackgroundColor](https://github.com/w3c/csswg-drafts/issues/5292) Consider the following: ``` <div class="card"> <img /> <div class="meta"> <p>Text <a href="#">Link</a></p> <button> Buy Me on <span>Store</span> <span>$10.99</span> </button> </div> </div> ``` If I wanted to change the color of the `span`s or`<a>`'s, based on the card background color, it would use `transparent` by default and not the `.card`'s background color. In this case, we wouldn't want that — we'd want a higher-level parent and not a direct parent. We'd want to query the `.card` container. Setting explicit containers works better in this case, and setting `container-type` will make it easier to have expected results. -- GitHub Notification of comment by una Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6393#issuecomment-1012446872 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 13 January 2022 19:36:31 UTC