csinn / CSInn

C# Inn community website.
MIT License
26 stars 9 forks source link

TailwindCSS requires JS? #36

Open Almantask opened 5 years ago

Almantask commented 5 years ago

saturnsringsToday at 3:34 AM I'm having a hard time trying to figure out how to incorporate tailwind css without using nodejs. jsteffToday at 8:35 AM It says many of the features are not available through cdn which goes against our will to get rid of js. Installation

@trinitrotoluene Are we missing something or is it really a dependency on JS?

mrivera7 commented 5 years ago

We could write the JS code TailwindCSS uses in C# and contribute it to their community, but I think that is beyond the scope of this project.

Somebody in discord suggested using PureCSS instead. It doesn't seem to require JS. Another person suggested using Bulma, but I think that would require the use of JS.

Whatever the solution to this issue, I think adding the use of sass would make for manageable code. Sass allows for the use of variables and functions, and that can make the front-end development experience much more pleasant. There is a Nuget package called LibSass Host for .NET we could use to transform Sass to CSS, and I found a site with a list of many other alternatives.

trinitrotoluene commented 5 years ago

Any half-decent CSS framework comes bundled with JS in some way, shape or form. Tailwind compiles to a single pure CSS stylesheet, node is simply required for compilation due to Tailwind allowing you to configure and optimise which rules it will generate for you in the compiled stylesheet.

Essentially we trade using no JS frameworks or JS in general at runtime for a deploy-time depenency on Node.JS to compile our stylesheets. imo that's a good tradeoff but yes something to bear in mind.

James231 commented 4 years ago

If you really want to use a UI framework for Blazor, it's best to avoid the general js frameworks and go for something targetted at Blazor. I've used MatBlazor before and it's great. But there are others like Blazorize, DevExpress Components and Ant Design. For a complete list see the Awseome Blazor repo.