-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add tailwindStylesheet to prettierrc config for tailwind v4 upgrade #64
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
|
Pas op. als je dus toolkit update in je project. Krijg je een flinke commitlist van al je css files die hun sorting weer goed doen. |
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.
Pull Request Overview
This PR adds Tailwind v4 configuration to the Prettier config to maintain consistent class sorting behavior. The change addresses an issue where Tailwind v4's default sorting differs from v3, which can cause problems when class order matters (e.g., @apply border-b-none border-2).
Key Changes:
- Adds
tailwindStylesheetconfiguration pointing to the Tailwind config file to preserve v3-style sorting behavior
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| require.resolve( 'prettier-plugin-tailwindcss' ), | ||
| ], | ||
| tailwindStylesheet: | ||
| './web/app/themes/sage/resources/styles/base/config.css', |
Copilot
AI
Nov 11, 2025
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.
The hardcoded path './web/app/themes/sage/resources/styles/base/config.css' may not work for all projects using this shared prettier config. Consider making this configurable or documenting that consumers should override this value in their local prettier config.
| './web/app/themes/sage/resources/styles/base/config.css', | |
| process.env.TAILWIND_STYLESHEET || './web/app/themes/sage/resources/styles/base/config.css', |
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.
Alle brave projecten hebben de sage folder. danku.
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.
Also ik heb gecheckt of deze config veilig is om te gebruiken in projecten die nog tailwind v3 hebben. En antwoord is ja.
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.
Lekker bezig
YvetteNikolov
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.
Kun je linkje van de documentatie toevoegen aan deze PR? Voor future reference
noordwijk-brave en meedoen-rijssenholten merkte ik taiwind v4 gekkigheid.
De sorting was anders. (sorten werkte. Maar anders)
Sorting anders maakt Bijna niet uit. Behalve heel soms als je dingen overschrijft in de zelfde apply
@apply border-b-none border-2nu is de border-2 de baas, want volgorde maakt uit.
Met deze config change, is de sorting hetzelfde als tijdens tailwind v3.
Zie hier documentatie van plugin zelf over tailwind v4
https://github.com/tailwindlabs/prettier-plugin-tailwindcss?tab=readme-ov-file#specifying-your-tailwind-stylesheet-path-tailwind-css-v4