-
Notifications
You must be signed in to change notification settings - Fork 3
[Feature] Upgrade to Tailwind v4 🎉 #128
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
Conversation
Remove all unnecessary plugins and theme properties
titouanmathis
left a comment
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.
Nice upgrade!
Some adjustments to the docs, we are nearly there.
c6243c1 to
deacc18
Compare
be5fea2 to
ee7c96a
Compare
Co-authored-by: Titouan Mathis <titouan@studiometa.fr>
ee7c96a to
197ebc2
Compare
titouanmathis
left a comment
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.
👍
Before merging, can you add a CHANGELOG.md file based on our other packages?
97fc3b6 to
197ebc2
Compare
titouanmathis
left a comment
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.
Minor changes for the actions
Issue #122
Sub issues
Here is a list of solutions to keep features of the
@studiometa/tailwind-configv2 after the migration.Before upgrading check the compatibility of Tailwind v4 with your project. For all changes between Tailwind v3 and Tailwind v4, refer to the official upgrade guide.
Important
Tailwind CSS v4.0 is a full-featured CSS build tool designed for a specific workflow, and is not designed to be used with CSS preprocessors like Sass, Less, or Stylus.
Theme
Screens
Breakpoints now matches with the default configuration with custom names and additional values:
Layers
Custom layers (z-indexes) declaration has been removed because Tailwind v4 handle them natively.
Transition timing function
In addition to the default values, our custom timing functions are unchanged, check the declaration.
Top / Right / Bottom / Left
Custom inset values declaration has been removed because Tailwind v4 handle them natively.
Plugins
All plugins have been removed, check the reasons and alternative solutions below.
Breakpoint
The breakpoint plugin was used for the breakpoint recognition in the
@studiometa/js-toolkitbut is no longer used since the usage of a config object.Font-Face
Manual
@font-facedeclaration takes the same amount of time and many projects use remote font CDN.Float Grid
Our legacy (float) grid plugin has been removed because modern projects use grid or flex layouts.
Custom container
The core container plugin has been removed in Tailwind v4 and our custom container plugin too.
Use a custom utility instead:
Variant factory
Use the simple custom variant native declaration instead. Note that the direct children selector variant is native in Tailwind for a while.
Example with a "hocus" variant:
Typography
This third party plugin can be replaced with a custom utility: