Cleaning up our font system

Here’s a refactor for your review, this one may work better to allow any stylesheet to use or update the vars:

https://github.com/discourse/discourse/pull/12746

OK I’ve wrapped my head around it a little more – Currently, all the variables defined here are able to be read from themes/plugins, but not write new values, as each stylesheet is compiled separately. Adding css custom properties allows themes/plugins to override the variables dynamically, and all dependent stylesheets pick up the new values. :slight_smile:

3 Likes