Tailwind CSS 任意值不适用于 Pug?

问题描述 投票:0回答:1

我在 pug 文件中使用 Tailwind CSS

v3.0.18
任意值时遇到问题。我遵循了这个answer,但它没有解决问题。

这是我的哈巴狗文件:

.container.mx-auto.flex.items-center.space-x-1
  .box.p-8.bg-yellow-800.text-white(class="w-1/2")
    h1.font-bold(class='text-2xl') It's normal
  .box.p-8.bg-yellow-800.text-white(class="w-[50%]")
    h1.font-bold(class='text-\[40px\]') It Doesn't Work

那么,在 pug 中应用 Tailwind CSS 任意值的正确方法是什么?

pug tailwind-css
1个回答
0
投票

您可以使用其他符号 -

tailwind.config.js
:

module.exports = {
  separator: '_',
}
© www.soinside.com 2019 - 2024. All rights reserved.