Skip to content

Conversation

@WybeBosch
Copy link
Contributor

@WybeBosch WybeBosch commented Nov 11, 2025

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-2
nu 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

@WybeBosch
Copy link
Contributor Author

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.

@WybeBosch WybeBosch requested review from YvetteNikolov, Copilot and laravdiemen and removed request for Copilot November 11, 2025 12:40
Copy link

Copilot AI left a 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 tailwindStylesheet configuration 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',
Copy link

Copilot AI Nov 11, 2025

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.

Suggested change
'./web/app/themes/sage/resources/styles/base/config.css',
process.env.TAILWIND_STYLESHEET || './web/app/themes/sage/resources/styles/base/config.css',

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Lekker bezig

@WybeBosch WybeBosch linked an issue Nov 11, 2025 that may be closed by this pull request
@WybeBosch WybeBosch self-assigned this Nov 11, 2025
Copy link
Contributor

@YvetteNikolov YvetteNikolov left a 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

@WybeBosch WybeBosch merged commit 6e81768 into main Nov 11, 2025
1 check passed
@WybeBosch WybeBosch deleted the feat/tailwind-v4-missing-config branch November 11, 2025 13:51
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.

Toolkit prettier tailwind v4 - toevoegen path naar config

3 participants