feat(compileCss): use standard css layers for base tailwind styles #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By default, Tailwind CSS v4 uses CSS layers (theme, base, components, utilities) to group its base styles, but this package currently omits some of them, which causes problems with unlayered styles overriding standard layered styles provided on the site without the use of this module.
This may also interfere with, for example, extending preflight in CSS compiled using this package, since the base unlayered preflight will have more priority than extended layered styles that, by default, should take precedence over the base preflight.
This also affects integrating TailwindCSS based themes with Drupal Canvas.
https://drupal.slack.com/archives/C072JMEPUS1/p1751265628117159
https://drupal.slack.com/archives/C072JMEPUS1/p1757765971384699
This PR loads base TailwindCSS styles in a more standard way using CSS layers, the same as it would be done in a standard project with TailwindCSS styles compiled outside the browser.