stailwc icon indicating copy to clipboard operation
stailwc copied to clipboard

Multiple fonts in a fontFamily does not work

Open stouch opened this issue 2 years ago • 2 comments

We cannot set multiple fonts for a fontFamily definition in our tailwind because on tw() render it concatenates with (space) instead of concatenating with , (comma), so for :

// tailwind.config.js
{
    fontFamily: {
      body: ["Inter", "sans-serif"],
    }
}

we got :

/* once` transpiled on runtime : ... */
font-family: "Inter sans-serif"; 

and "Inter sans-serif" isnt an existing font.

stouch avatar Aug 02 '23 10:08 stouch

Yep, noticed the same thing.

Looks like it's joined incorrectly: https://github.com/arlyon/stailwc/blob/master/crates/tailwind-parse/src/eval/plugin.rs#L241

halfbakedsneed avatar Aug 02 '23 15:08 halfbakedsneed

Thanks for the report. Fixing now!

arlyon avatar Aug 03 '23 16:08 arlyon