Join the Webstudio community

Updated 3 weeks ago

How to set font stack in CSS custom property

I want to map one of the modern font stacks to a CSS custom property so I can change them globally when I use 2 different fonts.

Currently I add a token "font-secondary" with the non-primary font attached to it. But I'd like to make singular tokens where I could use the var(--font-family) when making specific tokens.
O
J
J
8 comments
Is comma separated values list not working? 'Arial, Verdana'
I think so; I meant from the pre-selected font-families that were added not long ago.
You want to put the premade stack into a variable?
yes, this is correct.
that doesn't work, but stacks are not magic, its just a list of fonts, you can create your own
Ok, thanks. Side note: I'm trying to get this MFS built into our products at my actual job. I learned about it from this discord and love it.
Add a reply
Sign up and join the conversation on Discord