-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt CLI with changes in TailwindCSS V3 #281
Conversation
cls => '!' + cls, | ||
); | ||
// Duplicate classnames with an important (!) prefix | ||
const generatedClassGroupWithImportantPrefix = generatedClassGroup.map(cls => '!' + cls); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it would improve or worsen perf, but some of the things this lib is doing can be accomplished using template string types:
export type TClassesWithModifiers = `!${TClasses}` | TClasses
This could potentially be used to implement a lot of things in the lib with less code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I think this will make file size much smaller
Would you like to make a PR with this change to be merged into master for v2 releases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a shot at it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm already using Tailwind 3 myself, so I thought maybe I should do the changes on top of this PR. Do you think that would be a good idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I've tested this approach on pseudoclasses, and it was extremely slow
But it was OK when applying this approach to important modifiers only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yes, it makes more sense to do the changes on top of this PR. Thank you!
The issue still remains with classes with colors
was generating: `border--red-100`
This PR contains the following:
Tailwind V3 changes:
vertical-align
values to config file instead of hard-coding (#5487)overflow-clip
totext-clip
andoverflow-ellipsis
totext-ellipsis
(#5630)tailwindcss-classnames:
fontFamily("font-sans", "sm:font-mono")
,display("flex")
)