Replies: 1 comment
-
|
As workarounds, you could consider:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm porting an existing design system to Tailwind and noticed a specificity issue when using the
fontproperty in a custom utility. Consider these two utilities, for example (https://play.tailwindcss.com/FKQdkXHozt):When both utilities are used on an element,
fontalways overwritesfont-weight. As a result, the text in the example doesn't have thefont-weightapplied. This is becausefontis not included inpackages/tailwindcss/src/property-order.ts. Including it beforefont-familyhere fixes the issue:tailwindcss/packages/tailwindcss/src/property-order.ts
Lines 344 to 347 in d7fc281
I would be happy to open a PR if the Tailwind team considers this a bug. However, I'm unsure whether adding this property would have other implications.
Beta Was this translation helpful? Give feedback.
All reactions