Split up Tailwind configuration using presets #34
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.
Currently all the Tailwind (TW) configuration is in one big file. I always thought this was nice, because that way you don't have to add and keep track of multiple .scss files like we had to in the past. However the file grew bigger and complex. On top of that some of Peak's utilities might be intimidating to new users as well.
While reading up on TW 1.9 I stumbled across the concept of presets. This basically gives us a nice way to split up the config files. That way you can just assume stuff works but never have to be confronted with the configuration of Peaks utilities and components. You just use them.
For this draft PR I settled for the following files:
With this setup you probably only ever edit the forms, typography and site config files. Those three files just contain your current projects configuration so it make more sense as it's your own. This seems more comprehensible to me. You probably also rarely have to add and keep track of added config files so that's a not an issue anymore.
Another benefit is that it's now easier to opt out of TW Typography and/or TW Forms if you don't want to use those.
What do you think?