[V3] Consistent typography #18335
-
Hi everyone, I'm trying to use Tailwind CSS in the following way: .text {
@apply leading-7;
&-3xl {
@apply text-3xl;
}
&-bold{
@apply font-bold;
}
&-semibold\/gray-500{
@apply gray-500;
}
} My goal is to be able to write HTML like this: <h1 class="text-3xl-bold/gray-500">Welcome to Our Platform</h1> Because I don't want to write code so many
However, it seems that Tailwind doesn't support this approach. Could someone please explain why this is the case? Also, if I've made any mistakes or if there’s a better way to achieve this, I would really appreciate your guidance. Thank you for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You're trying to use Sass-like nesting syntax. However, Tailwind uses native CSS nesting which does not support this kind of partial indent concatenation between nesting boundaries. |
Beta Was this translation helpful? Give feedback.
You're trying to use Sass-like nesting syntax. However, Tailwind uses native CSS nesting which does not support this kind of partial indent concatenation between nesting boundaries.