- From: Naman Goel via GitHub <sysbot+gh@w3.org>
- Date: Tue, 11 Oct 2022 22:53:00 +0000
- To: public-css-archive@w3.org
> What if instead of cq* units we got a function that would accept an optional container name? E.g. container([w | h | min | max] [of [<custom-ident> | closest] ]?)
This feels like the right solution to me, but I'm not sure about the exact syntax proposed. Perhaps we can use `container-reference` as function name to combine both your ideas?
```css
.meta p {
font-size: clamp(1rem, container-reference(10cqi, card), 2rem);
}
```
One benefit I see of doing this is that it extends the container units that have already been introduced and other than learning about a single new function, introduces no new syntax.
I'm not completely sure about the function name though. Some other ideas:
* `for-container-named()`
* `for-container()`
* `in-container-named()`
* `from-container()`
* `container()`
--
GitHub Notification of comment by nmn
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7858#issuecomment-1275372056 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 11 October 2022 22:53:02 UTC