-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of order custom font family names #363
Comments
do not use it in theme.extend instead do: export default {
theme: {
fontFamily: {
// uncomment if you still need mono and serif
//...defaultTheme.fontFamily,
sans: ['"Inter var"', ...defaultTheme.fontFamily.sans],
},
},
attributify: true,
} |
Yap. Removing |
Looks like it's a bug. Before the fix, if you want to use import defaultTheme from 'windicss/defaultTheme'
export default {
theme: {
extend: {
fontFamily: {
sans: ['"Inter var"', ...defaultTheme.fontFamily.sans].join(','),
},
},
},
attributify: true,
} |
Yap! Your solution also works! Will use this in the meantime |
I'm working off of the vitesse boilerplate -- my windi.config.ts file is totally vanilla -- all I have done is add the fontFamily line (see below) Unfortunately, these changes don't reflect in the app. According to my browser, the font being rendered is I must be doing something stupid/missing something. Anyone got ideas? I landed on this issue because I first tried to set the font via theme --> extend --> fontFamily within the config, but that didn't help either. I'd appreciate any help (even if it's to say "HEY IDIOT! GO READ THE MANUAL WHERE IT IS MENTIONED on here!" Thanks again for all your hard work! :)
|
@armenr Try this: fontFamily: {
sans: ['"Inter var"', ...defaultTheme.fontFamily.sans].join(','),
}, It's a combination of what is said in the Tailwind docs about spaces in font family names (use extra quotes) and the workaround @antfu mentioned here. That should™ work 😊 |
Thank you @HerrBertling !! |
WindiCSS version:
I have implemented a custom font as follows:
index.html
:windi.config.ts
:App.css
:Unfortunately, the browser doesn't pick up the custom font, 'Inter var'. Upon inspecting the loaded
App.css
file via the network tab, I can see theInter var
font was inserted successfully but at the wrong location. See partial output:The text was updated successfully, but these errors were encountered: