-
-
Notifications
You must be signed in to change notification settings - Fork 96
feat: tailwind v4 css based plugin #419
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
base: main
Are you sure you want to change the base?
Conversation
Files added: - tailwind.v4.js Issues found: - corePlugins is neither set nor available anymore - utilities must begin with a lowercase letter in tw4 - the `e` (escape) in the plugin creator was removed Issues fixed: - just always assume preflight - changed the utility classes beginning with a `-` to `reduce-by-` instead - shimmed the `e` method for now and added a TODO
### Why - tailwind v4 has opted to be a css first architecture, thus degrading jsbased plugins deprecated. - to reflect that and also take care of the changes in the global style and variables a pure css plugin was necessary ### How - Based on the v3 plugin file and the intermediate step of the v4-compatibility-plugin js a generator was created to build a v4 compatible theme plugin. ## Problems - Big parts of the change are yet untested. As I only use a small substack in my application.
Issues identified so far:
|
- this will bump the minimum required browser version by quite a bit, but generally tailwind4 is already on this level as well - fixed some issues with the new utility method
Looking forward to this getting merged in; I'll try and test it if I get time this weekend and will provide comments if I find anything. |
hey @lacrioque, happy to help. How can I test this? (the instructions how to install the css module are clear, but how do I "checkout" this PR?) oooh, never mind. You commit the dist files! |
To be able to merge this, I would definitely need:
A great addition would be some Playwright screenshot based tests that compares point 1 with the original |
In general (unit-) testing and visual comparison for frontend elements sounds like a use case for storybook? Or for the visual testing can recommend https://percy.io/ But yeah sorry, offtopic |
π Linked issue
Not in an issue but in a discussion -> #392
β Type of change
π Description
Why
How
Use it
It is really as easy as importing one css file.
Problems
π Checklist