Re: [csswg-drafts] [css-fonts-4] Clarify maximum number of `<feature-value-names>` in `character-variant()` (#9311)

I also would like to clarify the expected output when declaring a feature for `@character-variant` with more than two values. Should it be valid but ignored? Or invalid and discarded? For example:

```css
@font-feature-values MM Greek {
  @character-variant { alpha-2: 1 2 3; }
}
```

[`CSSFontFeatureValuesRule.characterVariant.set()`](https://drafts.csswg.org/css-fonts-4/#cssfontfeaturevaluesrule-dfn) requires to throw `InvalidAccessError` so it makes sense to discard it? For example:

Currently, Chrome does not throw this error when using CSSOM, and do not discard it in a stylesheet. Firefox discards it, but does not support `CSSFontFeatureValuesRule.characterVariant` yet. There is no WPT.

I suggest this addition to my suggestion in my previous comment:

  > If more than two values are passed, the feature declaration is [invalid](https://drafts.csswg.org/css-syntax-3/#css-invalid).

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


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

Received on Monday, 5 February 2024 14:50:43 UTC