laravel-frontend-presets / tall

A TALL (Tailwind CSS, Alpine.js, Laravel and Livewire) Preset for Laravel
MIT License
2.43k stars 204 forks source link

Add postcss alternative to scss #47

Closed marccoup closed 3 years ago

marccoup commented 4 years ago

If you're using tailwind you probably don't need scss - I thought this preset should at least have the option to install without scss and that's what this adds.

You can now run php artisan ui tall --option=postcss to set up this preset with postcss instead of scss

From the tailwind docs:

If you're using Tailwind for a brand new project and don't need to integrate it with any existing Sass/Less/Stylus stylesheets, you should highly consider relying on other PostCSS plugins to add the preprocessor features you use instead of using a separate preprocessor.

This has a few benefits:

  • Your builds will be faster. Since your CSS doesn't have to be parsed and processed by multiple tools, your CSS will compile much quicker using only PostCSS.
  • No quirks or workarounds. Because Tailwind adds some new non-standard keywords to CSS (like @tailwind, @apply, theme(), etc.), you often have to write your CSS in annoying, unintuitive ways to get a preprocessor to give you the expected output. Working exclusively with PostCSS avoids this.
ryangjchandler commented 3 years ago

@imliam I think this one might still be worth adding..