Repository navigation
Font modes? #2161
Answered
by
lachlanjc
davidackemandev
asked this question in
Ideas
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. |
Answered by
lachlanjc
Mar 5, 2022
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 |
0 replies
Answer selected by
lachlanjc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to 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
fontFamilyon your root element: https://theme-ui.com/guides/global-styles