Re: [csswg-drafts] [css-fonts-4][css-nesting] Nesting of @supports inside @font-face (#6520)

Hi @drott!

> One consideration from a readability point of view: If we introduce such a `@supports` rule, we will have both mechanisms: a list of entries in the `src:` descriptor (for example multiple `url()` entries potentially then "legacy" `format("...")` specifiers (with its own semantics of choosing the first compatible one from this list) _and_ potentially multiple `src:` descriptors conditional on `@supports` blocks in the same `@font-face` rule, which I personally do not find great for consistency or readability. In other words, we would change the primary paradigm for `src:` selection to the `@supports` syntax but would still need to keep compatibility with the current approach of traversing a list of entries.

Yeah, this was raised by @plinss as well. The counter-argument he agreed to was that `@supports` came after `format()`, so while we're stuck with `format()` for legacy format selection, we shouldn't be *actively* developing two different feature detection mechanisms, one of which is entirely ad hoc and severely more limited.

> FWIW, the "parsing weirdness" may be considered addressed or improved with the [most recent change](https://github.com/w3c/csswg-drafts/commit/60dd3ff915b560713b47f4d9b1d0aade6cbb1944) which references the CSS syntax spec for [parsing a comma separated list of components](https://www.w3.org/TR/css-syntax-3/#parse-comma-separated-list-of-component-values).

I was referring to the fact that this descriptor's syntax needs prose and cannot be fully described by a grammar. I wasn't even aware that it used to be *even* weirder, whoa!

@emilio

> How is the supports rule represented in the OM? Implementation-wise I think it'd be easier for us if it just disappeared, but...

I've wondered about this too, but I'm afraid making it disappear would be fairly inconsistent with every other @-rule, which would be even more confusing once Nesting is implemented. 

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


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

Received on Friday, 20 August 2021 13:47:44 UTC