Blazor + tailwindcss = ❤ (for me)
Inspired by Delegate.SassBuilder
.
- your asp.net core or blazor project
- node and NPM (or yarn)
npm i
oryarn i
- Prepare your asp.net core or blazor project.
- download
package.json
andPostCSS.targets
and move it in your project - create
.pcss
file intead of.css
file in your project and write it your own. (optional: sugarss also will detect on build)Your.razor -> Your.razor.pcss
- edit your
[PROJECT].csproj
and append text below in<Project>
:<Import Project="PostCSS.targets" />
dotnet build
ordotnet run
and see tranformedcss
files 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-cli
for advenced usage.
- PostCSS with SASS or LESS support:
Delegate.SassBuilder
not 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