Custom Theme Isn't Applied #3997
-
Hi all, I recently created a CodeSandbox to mess around with NextJS and TailwindCSS, and I can't seem to edit the theme. https://codesandbox.io/s/laughing-booth-mirvj?file=/tailwind.config.js I've generated a tailwind.config.js file, but when I tried to change the font of the Home link in the navbar to a serif font, it doesn't seem to work. Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey! You're currently defining the theme: {
extend: {}
},
colors: {},
fontFamily: {
sans: ["ui-serif"],
title: ["serif"]
}, You need to move this inside the theme: {
extend: {
fontFamily: {
sans: ["ui-serif"],
title: ["serif"]
},
colors: {},
}
}, Hope it helps! 👍 |
Beta Was this translation helpful? Give feedback.
Hey!
You're currently defining the
fontFamily
object outside of thetheme
key in your config file:You need to move this inside the
theme
(to override it completely) or inside oftheme.extend
to extend it:Hope it helps! 👍