- From: andruud via GitHub <sysbot+gh@w3.org>
- Date: Fri, 18 Jun 2021 23:21:08 +0000
- To: public-css-archive@w3.org
(Great, you already have a solution! :P)
While not impossible to have different units do their own "implicit container selection", it sounds like a mess to me. And of course it will add much-unneeded paper cuts to performance.
- What if the unit exists inside an at-container rule which selects some higher-up named container? Having multiple interpretations of the what the selected container is in the same context is what seems like a mess.
```CSS
@container foo (...) {
p { padding: 2qi; } /* Still resolves against nearest container with inline-size?! */
}
```
- Is it a commonly needed to use qmax/min with different containers for each axis? If not, perhaps your way is actually good enough if CSSified?
```CSS
@property --qi {
syntax: "<length>";
initial-value: 0px;
inherits: false;
}
@property --qb {
syntax: "<length>";
initial-value: 0px;
inherits: false;
}
@container somelevel {
p { --qi: 2qi; }
}
@container anotherlevel {
p { --qb: 2qb; }
}
p { padding: max(var(--qi), var(--qb)); }
```
But I can see how that's a _bit_ verbose if it's a common thing.
--
GitHub Notification of comment by andruud
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5888#issuecomment-864315924 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 18 June 2021 23:21:17 UTC