- From: Guillaume via GitHub <sysbot+gh@w3.org>
- Date: Wed, 27 Sep 2023 13:37:09 +0000
- To: public-css-archive@w3.org
cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-fonts-4] `@font-palette-values` lacking declaration for `font-family` == I would like to confirm that there should be no consistency between`@font-palette-values` (and possibly `@property`) on one side, and `@counter-style` and `@font-face` on the other, when they are missing mandatory descriptors. For `@counter-style` and `@font-face`, it was decided (#1682, #1133) to consider them as *not declaring a resource* instead of as *invalid* (*ignored*), which means they appear in the CSSOM and make any following `@import` or `@namespace` invalid . <details> <summary>Nit: some texts in the corresponding specs still hints at considering them as invalid.</summary> For `@counter-style`, cf. #9258. For `@font-face`, the spec says...: > [...] `@font-face` rules require a `font-family` and `src` descriptor; if either of these are missing, the `@font-face` rule must not be considered when performing the font matching algorithm. ... but later: > **Name:** `font-family` > > [...] It is required for the `@font-face` rule to be valid. > > **Name:** `src` > > [...] It is required for the `@font-face` rule to be valid. I am willing to open a separate issue but I think it can be fixed more quickly by a spec author. </details> But FF *ignores* `@counter-style` when it is missing these descriptors. It preserves `@font-face` when it is missing a declaration for `src` or `font-family` (but it prevents declaring values via `fontFace.style`). Chrome allows to declare `@counter-style` and `@font-face` without the required descriptors, and to later apply the resources after declaring the descriptors via CSSOM. For `@property` and `@font-palette-values`, the corresponding specs want them to be invalid when they are missing the required descriptors, although implementations still diverge for `@property` (cf. [css-houdini-drafts#1098](https://github.com/w3c/css-houdini-drafts/issues/1098)). This seems to be expected because their descriptors are read-only in the CSSOM. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9417 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 27 September 2023 13:37:10 UTC