Open1
TailwindCSS でのフォント指定と @nuxtjs/google-fonts での指定
tailwind.config.ts
では引用符でくくる
tailwind.config.ts
import type { Config } from 'tailwindcss'
import defaultTheme from 'tailwindcss/defaultTheme'
export default <Partial<Config>>{
theme: {
extend: {
fontFamily: {
sans: ['"M PLUS 1p"', ...defaultTheme.fontFamily.sans],
// sans: ['"M PLUS Rounded 1c"', ...defaultTheme.fontFamily.sans],
},
},
},
}
nuxt.config.ts
では +
をつけて指定する
nuxt.config.ts
modules: ['@nuxtjs/google-fonts'],
googleFonts: {
families: {
'M+PLUS+1p': [400, 800],
// 'M+PLUS+Rounded+1c': true, //[400, 700],
},
},