This project is a small example application that showcases the use of Tailwind CSS with .NET's Blazor (WASM).
Since we're using .NET and Blazor, we won't be using NodeJS or NPM. This means that we prefer to use the standalone Tailwind CSS CLI.
This CLI can run Tailwind CSS commands without leveraging NodeJS or NPM.
Additionally, an MSBuild action has been created which runs on project build.
This action will execute a Tailwind command to build and minify the CSS from the input app.css
in the ~/wwwroot/css
folder.
After building the project, a new file called output.css
is created/updated in the ~/wwwroot/css
folder.
This output.css
file is linked in the index.html
file as a stylesheet.
To summarize:
.razor
, .html
and .cshtml
files in the repositoryNote: any other installation requirements following the installation in the getting started guide are also required and have been executed.
Since the application is a Blazor WASM (WebAssembly) application, there is currently no Docker support available yet. This might be added at a later time.
For now, run the .NET application through the .NET CLI or Visual Studio.
Run the following commands in the root folder of this repository:
dotnet build
dotnet run
At a later time, instructions for publishing and hosting the app will be added to the README.
You can see the following output when running the application without having written any CSS: