Giter Site home page Giter Site logo

programsolutions / blazor-tailwindcss-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uabarahona/blazor-tailwindcss-template

0.0 0.0 0.0 401 KB

This template demostrates the integration of tailwindcss with blazor and covers important features like hot-reload and css isolation

License: MIT License

JavaScript 3.85% C# 3.67% CSS 45.24% HTML 47.25%

blazor-tailwindcss-template's Introduction

ℹ️ A nuget package covering this use case has been released on https://github.com/Practical-ASP-NET/Tailwind.Extensions.AspNetCore feel free to take a look.




Blazor + Tailwind

This template demostrates the integration of tailwindcss with blazor and covers important features like hot-reload and css isolation.

BlazorTailwindIntegration.mp4

Description

The main goal of this template is to provide an clean integration with tailwindcss thus it will not modify anything from the official blazor template. Once integration is done there will be additional work to bring tailwindcss templates to blazor :D

⚠️ I have not tested using hot-reload on VS, so this currently works using dotnet-watch

Features

  • css-isolation works with tailwindcss and @apply directives
  • hot-reload considers tailwind compilation
  • <styles> gets compiled and copied over wwwroot without unused styles when release mode
  • change tailwindcss to use JIT compiler
  • only changed files gets re-compiled
  • make true hot-reload work on sytles.css
  • have the post-css hot reload windows close along with donet-watch
  • approach clean up (clean the code and make them more understadable)
  • convert template to a real dotnet template
  • create nuget package to add tailwindcss support for already created projects
  • improve performance and make compilation faster

Requirements

  • .NET 6 Preview 6
  • Node.js 14+

blazor-tailwindcss-template's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.