- From: Guillaume via GitHub <noreply@w3.org>
- Date: Tue, 01 Jul 2025 05:42:11 +0000
- To: public-css-archive@w3.org
cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-conditional-5] Style and media ranges are inconsistent == They accept different range values: - [media](https://drafts.csswg.org/mediaqueries-5/#typedef-mf-range): `<number>`, `<dimension>`, `<ratio>` - [style](https://drafts.csswg.org/css-conditional-5/#typedef-style-range): `<number>`, `<percentage>`, `<length>`, `<angle>`, `<time>`, `<frequency>`, `<resolution>` There is probably a reason to restrict dimension types for style range values. But I suspect that `<flex>` and `<ratio>` should be valid. (No media feature values accept `<percentage>` so this difference may be normal, but I wonder if it should be valid for future compat with a media feature value accepting a raw percentage, to make its query evaluate to `unknown`... which is off topic.) Style range values are actually defined with `<declaration-value>` and validated against the above numeric types at evaluation time. If this validation fails, it evaluates to `false`. If I am not mistaken, a consequence is that `not style(1px < 1unknown)` evaluates to `true` instead of `unknown`, which becomes `false` at the top-level, like for `not media(width < 1unknown)`. (This assumes that `media()` - and other functional conditions - are always used in a context accepting `<general-enclosed>` as a fallback.) So I just want to make sure that these differences are not an oversight. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12425 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 1 July 2025 05:42:12 UTC