[csswg-drafts] [css-fonts-4] Percentages in font-weight for relative weights

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

== [css-fonts-4] Percentages in font-weight for relative weights ==
Now that `font-weight` became a number with variable fonts, I think we will see many use cases for wanting to use a font weight that is relative to the parent's font-weight.

This would have been useful even before variable fonts, for emphasizing parts of text regardless of its weight, as to avoid `<strong>` having no effect when used in bold text, or having an extremely strong effect when used with light text.

However, variable fonts open up a swath of use cases for small weight tweaks. Namely:

- Multi-size headlines to appear same weight:
![image](https://user-images.githubusercontent.com/175836/40331156-61b073a2-5d1d-11e8-9f82-eb5f036d4e34.png)
- Better synthesized small caps without the small caps having lighter strokes than the full height caps.
- Better synthesized superscripts/subscripts.

Right now such tweaks are possible, but have to be performed on a case by case basis and break when the base font weight changes. It can be sort of emulated with custom properties, but it's very awkward because it's impossible to get the parent value of a property AND set it (things like `--font-weight: calc(.4 * var(--font-weight))` are invalid cycles). 

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

Received on Monday, 21 May 2018 21:41:05 UTC