Skip to content

Introduce modern-normalize for postcss and sass installs #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

stevepolitodesign
Copy link

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
    

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][].

[modern-normalize]: https://github.com/sindresorhus/modern-normalize
[autoprefixer]: https://github.com/postcss/autoprefixer
[Normalize.css]: https://github.com/csstools/normalize.css
[Tailwind]: https://tailwindcss.com/docs/preflight
@dhh
Copy link
Member

dhh commented Jan 21, 2024

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.

@dhh dhh closed this Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants