nuxt / fonts

Plug-and-play web font optimization and configuration for Nuxt apps.

Home Page:https://fonts.nuxt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support use of CSS variables for font-family names

prazdevs opened this issue · comments

commented

Hi :)
I define my font families using CSS variables / tokens, and it seems the module won't parse it.

Given:

:root {
  --font-family-base: Lexend, sans-serif;
  --font-family-heading: Quicksand, sans-serif;
}

and usage:

html,
body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
}

fonts are not loaded. However, if i add lets say Lexend to the font-family before the variable, everything works.

I have no idea of the "doability" of this, just wanted to point that out as it doesnt seem someone did already.

I'll stay with fontaine only for now 😄 cheers