[csswg-drafts] Query font features (#4156)

scottkellum has just created a new issue for https://github.com/w3c/csswg-drafts:

== Query font features ==
Query font features in CSS on a particular element. Possibly similar to Adobe’s [Web Font Loader](https://github.com/typekit/webfontloader) but focus on features rather than a specific font. Also because the font might change on various elements, this may need to either be limited to the `:root` font or work similar to an element query. This may also be similar to the `@supports` syntax but regarding what the font supports rather than the browser.

```CSS
sup {
  @font-supports (font-variant-position: sup) {
    font-variant-position: sup;
  }
  @font-supports not (font-variant-position: sup) {
    font-size: 0.6em;
    vertical-align: super;
  }
}
```

This may also be used for variable font axis:

```CSS
strong {
  @font-supports (font-variation-settings: 'wght' 632) {
    font-variation-settings: 'wght' 632;
  }
  @font-supports not (font-variation-settings: 'wght' 632) {
    font-weight: bold;
  }
}
```


This is slightly related to [#520 Supported variation font axes and font features are not discoverable](https://github.com/w3c/csswg-drafts/issues/520)

From a [CSSRemedy](https://github.com/mozdevs/cssremedy) discussion on [sub & sup](https://github.com/mozdevs/cssremedy/issues/48).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4156 using your GitHub account

Received on Monday, 29 July 2019 15:21:56 UTC