I started working on a PR for this functionality, but ran into a couple issues I'd like to ask about before going further, since I'm not sure it fits in to the build process as easily as other presets. Here are a few issues I ran into:
Ideally, Tailwind should be included in two different lines, so you can add / extract components before/after the main bulk of the framework to avoid CSS specificity issues. This means main.scss has to be modified, which seems like a bit of an anti pattern, since a copy of sorts would have to be maintained in this installer repo.
Tailwind is configured via a javascript file, which is generated with a node command. I'm not sure any of the other presets do this?
Tailwind uses PostCSS, and it doesn't seem like any of the other presets do this either. This requires adding a line to webpack.config.js like tailwindcss: './tailwind.js'. Additionally, this causes some stylelinter errors too, and the tailwind-specific at-rules (i.e. @tailwind) need to be added to the excludes array for stylelinter in package.json.
Given the above problems, would Tailwind CSS still be considered as a preset? I'm happy to keep working on it if so, but otherwise a short guide or docs piece might be more appropriate when sage v9 is fully released. Thanks!
I started working on a PR for this functionality, but ran into a couple issues I'd like to ask about before going further, since I'm not sure it fits in to the build process as easily as other presets. Here are a few issues I ran into:
main.scss
has to be modified, which seems like a bit of an anti pattern, since a copy of sorts would have to be maintained in this installer repo.webpack.config.js
liketailwindcss: './tailwind.js'
. Additionally, this causes some stylelinter errors too, and the tailwind-specific at-rules (i.e.@tailwind
) need to be added to the excludes array for stylelinter inpackage.json
.Given the above problems, would Tailwind CSS still be considered as a preset? I'm happy to keep working on it if so, but otherwise a short guide or docs piece might be more appropriate when sage v9 is fully released. Thanks!