【问题标题】:Tailwindcss purges whitelisted tagTailwind Css 清除白名单标签
【发布时间】:2021-01-15 11:50:30
【问题描述】:

我想保留如下一行:

h3 {
        @apply text-2xl mt-8 mb-4;
   }

不幸的是,顺风正在清除 h3-tag :-/

这是配置:

purge: {
        content: ['./resources/js/**/*.vue',],
        options: {
            whitelist: ['h1', 'h2', 'h3'],
        }
    },

【问题讨论】:

    标签: tailwind-css


    【解决方案1】:

    purge.options.whitelist 是要列入白名单的类名数组。因此,您的代码白名单是 .h1、.h2 和 .h3 类而不是实际标签。

    解决方案

    /* purgecss start ignore */
    
    h3 {
         @apply text-2xl mt-8 mb-4;
       }
    
    /* purgecss end ignore */
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-24
      • 1970-01-01
      • 2021-05-22
      • 2021-10-30
      • 2021-01-06
      • 2021-06-26
      相关资源
      最近更新 更多