rails / cssbundling-rails

Bundle and process CSS in Rails with Tailwind, PostCSS, and Sass via Node.js.
MIT License
563 stars 83 forks source link

Introduce `modern-normalize` for `postcss` and `sass` installs #139

Closed stevepolitodesign closed 5 months ago

stevepolitodesign commented 7 months ago

Adds modern-normalize to postcss and sass installation scripts in an effort to improve the developer experience.

This is consistent with the existing decision to include autoprefixer with the postcss installation script.

We chose modern-normalize over Normalize.css due to that fact that it is actively maintained and is used in Tailwind.

How to review this pull-request

  1. Create a new rails app without specifying a --css option:

    rails new cssbundling_demo
  2. Add the gem referencing this fork.

    gem "cssbundling-rails", github: "stevepolitodesign/cssbundling-rails", branch: "sp-modern-normalize"
  3. Run the installation script for either postcss or sass.

    bin/rails css:install:[postcss|sass]
  4. Confirm the styles are compiled to app/assets/builds/application.css

    yarn build:css
    cat app/assets/builds/application.css
dhh commented 5 months ago

I'd rather be going in the other direction and consider whether we still need autoprefixer. This needs to be an absolute minimal install that people can then take further.