mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 07:34:27 +08:00

In https://github.com/discourse/discourse-fonts/pull/15 we are introducing special font properties for certain fonts, specifically the `font-variation-settings` and `font-feature-settings`. For now this will only apply to Inter, but we may do it for other fonts in future. This commit makes it so the color_definitions.css file includes these special properties for each font, either defined on the root `html` element for the body font or on the `h1-h6` elements for the heading font. This is done in this way because defining them on `@font-face` is ignored by the browser. This also ensures special CSS classes for the wizard container e.g. wizard-container-font-FONTID are defined, this is so we can use these special properties scoped to the font selected in the wizard, which will affect the way the canvas preview is rendered. Here is an example of before/after with special properties applied to Inter, in this case: ```css font-variation-settings: 'opsz' 28; font-feature-settings: 'calt' 0, 'ccmp' 0, 'ss02' 1; ```