【问题标题】:daisy UI custom theme not working after importingdaisy UI custom theme not working after importing
【发布时间】:2022-12-28 00:56:41
【问题描述】:

I had imported daisy UI plugins. But still converts itself todark modehow to fix that problem? I wanted my theme in light mode without usingdata-themelight in the html attribute

【问题讨论】:

  • Please provide enough code so others can better understand or reproduce the problem.

标签: daisyui


【解决方案1】:

In tailwind.config.js set themes to false. Example: module.exports = { plugins: [require('daisyui')], daisyui: { themes: false } };

【讨论】:

    【解决方案2】:

    Put this code totailwind.config.js, the light theme will be applied. If you want to use different themes then you can visit here

    /** @type {import('tailwindcss').Config} */
    module.exports = {
      content: ["./src/**/*.{js,jsx,ts,tsx}"],
      theme: {
        extend: {},
      },
      plugins: [require("daisyui")],
      daisyui: {
        themes: ["light"],
      },
    };
    

    【讨论】:

      猜你喜欢
      • 2022-01-20
      • 2023-04-11
      • 2019-11-18
      • 2021-11-22
      • 2022-12-27
      • 1970-01-01
      • 1970-01-01
      • 2021-08-24
      • 1970-01-01
      相关资源
      最近更新 更多