-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
I just went through a quite painful setup of fonts for my project - first I was trying to include font files manually from google webfonts helper. But the @font-face definitions were being removed somewhere during css optimization in build. I ended up looking into the example project, where I discovered that fontsource exists, and that fonts are loaded with import "../app.css", which I didn't find documented anywhere. Also I faced another issue with using fontsource customizable sass mixins, as the referenced files weren't being loaded from the tilde path so I had to override $fontDir: "@fontsource/#{Roboto.$fontId}/files"
I'll be very happy to contribute docs for all of this to avoid this pain for others in the future, but first I'd like to check if there's a best practice established, get some info about importing css files in js, and where actually to put this so the docs page doesn't grow infinitely with various best-practices and tips