Closed justinehell closed 2 years ago
create-nuxt-app: v3.7.1
Create a nuxt app with npm init nuxt-app <app-name> and choose Tailwind CSS as UI framework My full config :
npm init nuxt-app <app-name>
Tailwind CSS
UI framework
Create tailwind.config.js at the root of the project like so
tailwind.config.js
When I use my custom font (eg in my example font-sans) inside Tutorial.vue component, my custom font is successfully loaded and displayed
font-sans
Tutorial.vue
fontFamily class is overrided by the tailwind.min.css. Therefore, my custom font doesn't show up.
tailwind.min.css
I found out after some research that tailwind.min.css is called inside the Tutorial.vue component.
A big thanks to hakim bhd that found the solution
Is it possible to remove this line if we choose Tailwind as UI framework ?
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.1.2/dist/tailwind.min.css" rel="stylesheet" />
My bad I just saw that we are not supposed to work with the Tutorial.vue component. I close this issue
Version
create-nuxt-app: v3.7.1
Steps to reproduce
Create a nuxt app with
npm init nuxt-app <app-name>
and chooseTailwind CSS
asUI framework
My full config :Create
tailwind.config.js
at the root of the project like soWhat is Expected?
When I use my custom font (eg in my example
font-sans
) insideTutorial.vue
component, my custom font is successfully loaded and displayedWhat is actually happening?
fontFamily class is overrided by the
tailwind.min.css
. Therefore, my custom font doesn't show up.I found out after some research that
tailwind.min.css
is called inside theTutorial.vue
component.A big thanks to hakim bhd that found the solution
Proposed solution
Is it possible to remove this line if we choose Tailwind as UI framework ?
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.1.2/dist/tailwind.min.css" rel="stylesheet" />