W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2020

[csswg-drafts] [CSS-Fonts] Need method to interpolate variable font settings (#5635)

From: Scott Kellum via GitHub <sysbot+gh@w3.org>
Date: Mon, 19 Oct 2020 19:15:08 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-724906828-1603134907-sysbot+gh@w3.org>
scottkellum has just created a new issue for https://github.com/w3c/csswg-drafts:

== [CSS-Fonts] Need method to interpolate variable font settings ==
There is currently no way to interpolate [font variation settings](https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-variation-settings) fluidly across widths (viewport or element widths). This is [expected behavior from many font authors](https://www.instagram.com/p/B81EnHGBtW3/) but is impossible to do in CSS.

This can not be done in `calc()` (via clamp or CSS locks) due to CSS unit typing as font variation settings require a type of <number> and viewport units are incompatible <length> typed.

## Proposals

- I would propose adding a way to bind viewport/element dimensions to animations, allowing people to interpolate properties across sizes. This is related to the [CSS Scroll Linked Animations](https://drafts.csswg.org/scroll-animations-1/#scrollable-animation-usecase) draft, but expands it to bind to width. This dramatically expands the scope of this issue, but allows interpolation of all properties across varying widths and enabling far more control around style changes across page and element scaling than media queries or element queries allow.
- Allow for some sort of unit logic in `calc()` that can re-type a value, although this seems kind of clumsy to me as it is limited in use cases, and the math has the potential to be concluded and cumbersome.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 19 October 2020 19:15:10 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:20 UTC