Font modes? #2161
-
Hi theme-ui, I had an idea: what if we could create modes for fonts the same way theme-ui does for colors? Is there a way to implement this currently? Color modes are great, but I feel like adding fonts to the mode system would be really nice. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's a fun idea! I think because of the different metrics of fonts it wouldn't be that popular, & more challenging to implement performance-wise if you need to load multiple fonts, so we're unlikely to build this feature. You could definitely work around the theme a bit to implement this currently—the first thing I'd reach for is checking the color mode with a hook from Theme UI then using the Global component to set |
Beta Was this translation helpful? Give feedback.
It's a fun idea! I think because of the different metrics of fonts it wouldn't be that popular, & more challenging to implement performance-wise if you need to load multiple fonts, so we're unlikely to build this feature. You could definitely work around the theme a bit to implement this currently—the first thing I'd reach for is checking the color mode with a hook from Theme UI then using the Global component to set
fontFamily
on your root element: https://theme-ui.com/guides/global-styles