simolus3 / zap

Zap is a fast web framework built on Dart
https://simonbinder.eu/zap/
MIT License
239 stars 12 forks source link

Tailwind CSS integration #11

Closed rikousik closed 2 years ago

rikousik commented 2 years ago

Do you have any plan to make a way of inegrating Tailwind Css to Zap ?

simolus3 commented 2 years ago

In general, you can use any CSS framework by just putting the CSS/Sass/SCSS source files in a Dart package and importing it just like you would with Dart sources.

Tailwind is special because they compile a CSS file based on the classes you actually use. This requires special logic in the build system, and we can't easily replicate that in Dart (since their build tooling is written in JS of course). If you have a precompiled tailwind with the classes you use ready as a CSS file, you can include it with @import or @use in a component's CSS. But there won't be a way to integrate Tailwind's build system into zap.