Re: [csswg-drafts] [css-fonts][css-font-loading] @font-face's font-variant descriptor vs. FontFace's variant attribute (#7502)

> I'm not sure I understand the relationship between the properties named `font-variant-*` and the descriptors,

A descriptor says what a font can do, what it supports. A property is a request for styling, for some element. So for example a property can say "I want this text to be italic" and the descriptor says "this font supports italic" which means it is a candidate for being used.  This is why properties and descriptors have the same names, but don't necessarily have the same value syntax. For example the `font-weight` descriptor can take two values:

```css
font-weight: 300 650;
```
meaning it can produce that range of weights, while the `font-weight` property takes only a single value

```css
font-weight: 700
```
which means it won't match that font; the `font-weight` property also takes values that make no sense for a descriptor, like `bolder`.

Properties and descriptors are not always paired. For example there is a `unicode-range` descriptor but no `unicode-range` property; the text content of the element sets what unicode characters it wants to render.

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


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

Received on Friday, 15 July 2022 10:16:05 UTC