我在 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 任意值的正确方法是什么?
您可以使用其他符号 -
tailwind.config.js
:
module.exports = {
separator: '_',
}