I would like to apply inherited font size to an element with Tailwind.
I know that this can be achieved in regular CSS like so:
.element {
font-size: inherit;
}
But how would I accomplish this using purely Tailwind class syntax? text-inherit
seems to apply color: inherit
not font-size: inherit
like I desire.
You can achieve this through an arbitrary value with the length
type-cast as specified by the relevant Tailwind Documentation.
In Use:
<div class="text-[length:inherit]"></div>