Blazor + tailwindcss = ❤ (for me)
Inspired by Delegate.SassBuilder.
- your asp.net core or blazor project
- node and NPM (or yarn)
npm ioryarn i
- Prepare your asp.net core or blazor project.
- download
package.jsonandPostCSS.targetsand move it in your project - create
.pcssfile intead of.cssfile in your project and write it your own. (optional: sugarss also will detect on build)Your.razor -> Your.razor.pcss - edit your
[PROJECT].csprojand append text below in<Project>:<Import Project="PostCSS.targets" />
dotnet buildordotnet runand see tranformedcssfiles in your project.- You can ignore file that starts with
_. (for import usage)
- You can use almost feature of postcss.
-
postcss.config.js,tailwind.config.js(for tailwindcss) and any postcss configs are supported by postcss or other plugins.
- you can use
gulp,webpack, other build tool intead ofpostcss-clifor advenced usage.
- PostCSS with SASS or LESS support:
Delegate.SassBuildernot recommended. use node's preprocessor instead.
This is really neat and helpful, thanks for sharing!
Curious if you've tried any of this with the JIT mode? Might make the re-builds real quick