Less 不会应用带点 (.) 的 Tailwind CSS 类名

Less wont apply Tailwind CSS classname with dot (.)

如何应用包含带 Less 的点的 Tailwind CSS 类名?转义 (\) 无效。 我可以在 Sass:

中毫无问题地使用这段代码
@apply py-0.5;

Syntax error: The 0.5 class does not exist. If you're sure that 0.5 exists, make sure that any @import statements are being properly processed before Tailwind CSS sees your CSS, as @apply can only be used for classes in the same CSS tree. (7:4)

其他 Tailwind CSS 类名工作正常。

这很可能与 Less 解析输入的方式有关。你可以 use ~ to escape class 名字。

@apply ~"py-0.5";