postcss / autoprefixer

Parse CSS and add vendor prefixes to rules by Can I Use
https://twitter.com/autoprefixer
MIT License
21.66k stars 1.26k forks source link

Issues Indent autoprefixer with postcss-cli how can I fix this? #1429

Closed HypeNeutron closed 2 years ago

HypeNeutron commented 2 years ago

Complaint in SASS compiler on indent problem in my main.prefix.css

Error: Inconsistent indentation: 5 spaces were used for indentation, but the rest of the document was indented using 2 spaces.

my cil:

postcss --use autoprefixer -b 'last 5 versions' assets/css/main.comp.css -o assets/css/main.prefix.css

indent in object-fit

.card__card-tour img#tourImg {
  width: 100%;
  height: 32rem;
  -o-object-fit: cover;
     object-fit: cover;
  border-top-right-radius: 0.5rem;
  border-top-left-radius: 0.5rem;
}
ai commented 2 years ago

You can disable it by setting cascade: false option for Autoprefixer (it may need to use PostCSS config)

HypeNeutron commented 2 years ago

@ai

You can disable it by setting cascade: false option for Autoprefixer (it may need to use PostCSS config)

This is correctly? in my postcss.config.js on root

module.exports = {
  plugins: [require('autoprefixer')({ cascade: false })],
};

I'm still see indent in file and complaint in SASS compiler

ai commented 2 years ago

Looks good.

But maybe there is some tool which run another Autoprefixer and do not see this config.