Skip to content

Tailwind 4 migration#2641

Open
amazingphilippe wants to merge 7 commits intomainfrom
debt/tailwind4
Open

Tailwind 4 migration#2641
amazingphilippe wants to merge 7 commits intomainfrom
debt/tailwind4

Conversation

@amazingphilippe
Copy link
Copy Markdown
Contributor

@amazingphilippe amazingphilippe commented Apr 2, 2026

Summary | Résumé

Upgrading to tailwind 4 and vite

  • Vite is ... quick. The compilation is very efficient and takes a fraction of a second. It compiles on save, so you can start the development server and forget about npm run tailwind when writing css and html
  • There are a few things I had to fix after the upgrade:
  • .container is not a utility provided by tailwind by default, but we can create our own.
  • @screen function has been replaced by @variant
  • Linting is more efficient, so I had to fix some invalid utilities in some @apply blocks
  • No more tailwind.config.js - Its all a css theme, and integrates perfectly with native css properties. CS properties are available everywhere, not just using tailwind utilities.

Test instructions | Instructions pour tester la modification

  • Locally, npm install
  • Maybe rebuild the container
  • npm run css does the build, but it also runs on make run-dev

@github-actions
Copy link
Copy Markdown

@amazingphilippe amazingphilippe changed the title Tailwind 4 migration - with Node 20 - mvp Tailwind 4 migration Apr 24, 2026
}

:has > [data-module="menu"] {
:has(> [data-module="menu"]) {
Copy link
Copy Markdown
Contributor Author

@amazingphilippe amazingphilippe Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It picked up this syntax error that previously went unnoticed

@apply list-decimal pl-8;
}

.page-content blockquote {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open the diff below in style.css to see tailwind 4's config

box-shadow:
0 0 0 15px var(--white),
0 0 0 20px var(--yellow);
0 0 0 15px var(--color-white),
Copy link
Copy Markdown
Contributor Author

@amazingphilippe amazingphilippe Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example of using tailwind tokens as regular CSS properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant