Fixing bug that could lose Tailwind's default presets #3099
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.
Changes
Closes #3043
@astrojs/tailwind
was defaulting presets to[]
which actually tells Tailwind to remove the default presets of colors, sizes, etc.This change removes the
applyAstroConfigPreset
option, instead of our own custom flag users can disable the built-in preset in the Tailwind config as usual by includingpresets: []
themselvesTesting
Docs
Updated the integration README (no docs site updates needed)
Bug details
Forcing
presets: undefined
in our default Tailwind config makes sure that the presets are enabled by default. What was happening in #3043 is that the user config customized the theme and didn't include thepresets
config option (pretty normal not to use that option). Our integration ended up with a customized theme andpresets: []
, which inadvertantly threw out all Tailwind presets.With this update, users can use their own Tailwind config file to disable presets if they really need to