You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to discuss/propose some flattening of the hierarchy for the Tailwind preset, as it is currently quite verbose compared to the default configuration. Tailwind already flattens the regular CSS property hierarchy a lot by removing unambiguous prefixes where possible, often leading to even less typing than the standard property names would have required. This is a continuation of that idea.
Some examples of changes I would personally prefer:
text-text-&-icon-disabled → text-disabled Rationale: Most icons already inherit text colors, so namaing them separately is probably unnecessary.
bg-functional-informational/text-functional-informational → bg-informational/text-informational or maybe even just bg-info/text-info Rationale: Nested properties are unambiguous.
bg-additional-violet-500 → bg-violet-500 Rationale: Color names are unambiguous.
(and many others)
Since none of these prefixes actually prevent any naming collisions, it would likely improve readability and reduce friction for developers already familiar with standard Tailwind, thereby easing a codebase transition to the Scale preset.
I'm happy to contribute a PR with my proposed changes where specific details may be more appropriate to discuss, but I would like to get a feel for the general consensus on such a change before I start working on it.
The text was updated successfully, but these errors were encountered:
I would like to discuss/propose some flattening of the hierarchy for the Tailwind preset, as it is currently quite verbose compared to the default configuration. Tailwind already flattens the regular CSS property hierarchy a lot by removing unambiguous prefixes where possible, often leading to even less typing than the standard property names would have required. This is a continuation of that idea.
Some examples of changes I would personally prefer:
text-text-&-icon-disabled
→text-disabled
Rationale: Most icons already inherit text colors, so namaing them separately is probably unnecessary.
bg-functional-informational
/text-functional-informational
→bg-informational
/text-informational
or maybe even justbg-info
/text-info
Rationale: Nested properties are unambiguous.
bg-additional-violet-500
→bg-violet-500
Rationale: Color names are unambiguous.
Since none of these prefixes actually prevent any naming collisions, it would likely improve readability and reduce friction for developers already familiar with standard Tailwind, thereby easing a codebase transition to the Scale preset.
I'm happy to contribute a PR with my proposed changes where specific details may be more appropriate to discuss, but I would like to get a feel for the general consensus on such a change before I start working on it.
The text was updated successfully, but these errors were encountered: