Re: [csswg-drafts] [css-contain-3] What container features can be queried? (#5989)

It's a fascinating idea. I think to do this, though, you'd have to define what values mean in terms of equality, less than, greater than, etc. As in, say an author did this:
```css
@container (font-weight >= normal) {
// ...
}
```
Is that valid? If so, are we converting `normal` to its numerical value? I mean, it seems intuitive that you would, but I think such conversions for the purposes of queries would have to describe those behaviors. I'm not sure the spec is specific enough for types in order to clearly communicate to vendors what `>` `<` `=` should automatically mean for every single CSS property as it might be compared to every possible value. Or what should happen to the entire query for a type mismatch. Although I've been wrong before lol.

My instinct would be to limit it to layout (height / width), get container queries implemented and everyone used to them, with the knowledge that the types of queries will likely be expanded / further defined in the future.

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


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

Received on Saturday, 13 February 2021 03:34:37 UTC