Go to ".\TailwindBlazor\TailwindBlazor" in CMD and run command:
npx tailwindcss init
The "tailwind.config.js" file will be created. Change it to:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./**/*.{razor,html}'],
theme: {
extend: {},
},
plugins: [],
}
Create /Styles/tailwind.css file and change it to:
@tailwind base;
@tailwind components;
@tailwind utilities;
Add some tailwindcss classes to "Home.razor" component:
@page "/"
<PageTitle>Home</PageTitle>
<h1 class="font-extrabold text-5xl">Hello, world!</h1>
Welcome to your new app.
Add tailwind file to "index.html":
<link rel="stylesheet" href="css/tailwind.css" />
Comment out some code in "NavMenu.razor" that toogles nav menu (bug) ``` <button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
npx tailwindcss -i .\Styles\tailwind.css -o .\wwwroot\css\tailwind.css --watch