Blazor Server CSS Isolation + TailwindCSS build

121 Views Asked by At

I'm trying to make TailwindCSS CLI to also include the CSS from my CSS-isolated blazor components.

Here is my Index.razor

@page "/"

<h1 class="index-H1">Hello, world!</h1>

<span class="from-iso">Welcome to your new app.</span>

And here is its Index.razor.css

.from-iso {
    @apply text-blue-600;
}

now this is my tailwind.config.js

module.exports = {
    content: [
        "./Shared/*.{html,razor,cshtml,css}",
        "./Pages/*.{html,razor,cshtml,css}"
    ],
  theme: {
    extend: {},
  },
  plugins: [],
}

Everytime I make changes to Index.razor.css, the custom classes I added doesn't appear in the output css file (in this case, the .from-iso class). Am I missing something?

0

There are 0 best solutions below