Re: [csswg-drafts] [css-contain-3] Should not cq units be interpreted in the flatDom context? (#7947)

Example use-case:

1. We have a web component a generic carousel (or card or whatever).
2. This web comp "container" changes the width of the different slot elements (slotting contexts) depending on the available width of the host element. This happens both fluently and abruptly, as the container-query examples show, most likely using container-queries. So far, so good. So far we have used container-queries to style the shadowDom elements, and so far that is all we need.
3. But then we are going to slot elements with text and image content into the web component carousel. At this point, we start to see that we need to adapt for example the font-size of text and the border of the images to *both*:
    1. the element being slotted (for example a `<div>` element with too much text needs a smaller font size and important image needs a bigger border in red) and 
    2. the size/available space of the slot into which these elements are placed (slotting context).
4. Here we would also like to use `cqw` and cq units. On the elements in the lightDom that we slot into the web component, we would like to specify the default font size to 10cqw and image border size to 1cqw, and then we would like to adjust the font size to 8cqw for elements with too much text and 3cqw for important images.

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


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

Received on Monday, 24 October 2022 10:39:11 UTC