【发布时间】:2020-11-23 06:15:12
【问题描述】:
我现在正在使用带有 Tailwind 的 Vue。
这是我当前的 Tailwind 配置:
const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
purge: [],
theme: {
extend: {
fontFamily: {
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
},
},
},
variants: {},
plugins: [],
}
我正在使用Inter var 字体,因为在 OSX 系统上,默认字体粗细不起作用。现在,我想构建这个项目,但在生产版本中它没有应用正确的字体系列。我尝试通过 html 链接和 css 导入来导入字体系列,但这些都不起作用。
【问题讨论】:
-
你从哪里导入这个字体文件/字体?
-
用于开发,它在我的电脑上。但我尝试通过 index.html 文件中的 html 链接和 tailwind css 文件中的 css 导入来导入字体。
标签: javascript html css vue.js tailwind-css