我正在使用 TailwindCSS 和 PostCSS,我有这个 css 代码:
.btn {
@apply py-1;
@apply px-4;
@apply border;
@apply rounded;
}
.btn:hover {
@apply bg-white text-black;
}
.btn:focus {
@apply bg-black text-white;
}
PostCSS(或使用插件)中是否有本机方式来编写如下代码?
.btn {
@apply py-1;
@apply px-4;
@apply border;
@apply rounded;
&:hover {
@apply bg-white text-black;
}
&:focus {
@apply bg-black text-white;
}
}