font-weight: inherit not possible? #6815
-
I have a textarea and sometimes I need it to get the style from its parent. Textareas have their own style by default which means I need to override it to get the parent value. In CSS I can do it like below:textarea {
font-weight: inherit;
} How can I do the same thing in Tailwind? Class does not work<textarea class="font-inherit">Text</textarea> Arbitrary value does not work<textarea class="font-[inherit]">Text</textarea> @apply does not workBecause I need a Tailwind class, apply does not work. Custom CSS worksYes, custom CSS works, but it's a bit ugly when everything else is Tailwind. Any ideas? Maybe this would be a good feature request? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
You can add “inherit” to your font weight scale in your config file, then “font-inherit” will work 👍🏻 |
Beta Was this translation helpful? Give feedback.
-
no better solution as of 2023? |
Beta Was this translation helpful? Give feedback.
-
I think this would be a nice addition (feature), along with One use case: using
Docs: |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
You can add “inherit” to your font weight scale in your config file, then “font-inherit” will work 👍🏻