【问题标题】:TailwindCSS custom theme don't works with Nuxt.jsTailwindCSS 自定义主题不适用于 Nuxt.js
【发布时间】:2020-06-09 17:30:59
【问题描述】:

我已经从 create nuxt-app 安装了@nuxtjs/tailwindcss,我用我的值修改了tailwind.config.js 文件:

module.exports = {
  important: true,
  theme: {
    theme: {
      extend: {
        fontFamily: {
          one: ["Arial", "Poppins", "Raleway"],
          two: ["Muli", "Open Sans"]
        },
        screens: {
          xll: "1400px"
        }
      }
    }
  },
  variants: {},
  plugins: []
};

当我将font-one 类应用于元素时,此配置不起作用,没有任何反应

编辑: https://codesandbox.io/s/nuxt-tailwindcss-bhc5n

有人可以帮助我吗?感谢您的回复

【问题讨论】:

    标签: vue.js nuxt.js tailwind-css


    【解决方案1】:

    您的配置中有双重“主题”。这就是它不起作用的原因。

      theme: {
        theme: {
    

    【讨论】:

      猜你喜欢
      • 2021-01-29
      • 2015-04-20
      • 2019-06-28
      • 1970-01-01
      • 1970-01-01
      • 2021-01-02
      • 1970-01-01
      • 2019-12-05
      • 2017-05-11
      相关资源
      最近更新 更多