tailwindlabs / discuss

A place to ask questions, get help, or share what you've built with Tailwind CSS.
MIT License
171 stars 9 forks source link

Dissapear all no-overrided CSS-classes in *.scss after upgrade from 1.1.3 to 1.2.0 #461

Open dudintv opened 4 years ago

dudintv commented 4 years ago

I've upgraded Tailwind to 1.2.0. I use it among Ruby on Rails(6.0.2) & Webpack(4.41.2).

After upgrade, only overridden CSS-properties still working. It happens only in SCSS files. In CSS it's still working properly. I've changed (upgraded) only Tailwind package, and of course, there was updated all its dependencies (chalk, detective, lodash, ...)

For example:

.red-button { background: red; }  // won't work, it will be disappeared totally

But if I repeat it's working, eg:

.red-button { background: red; }  // will be erased, no matter which color in the first definition
.red-button { background: red; }  // it's working

Or, even that crazy stuff:

.red-button {
  background: red; // will be erased
  & { background: red; }  // it's working
}

postcss.config.js:

module.exports = {
  syntax: 'postcss-scss',
  plugins: [
    require('postcss-import'),
    require('postcss-flexbugs-fixes'),
    require('precss'),
    require('tailwindcss')('./app/javascript/css/tailwind/tailwind.js'),
    require('autoprefixer'),
    require('postcss-preset-env')({
      autoprefixer: {
        flexbox: 'no-2009'
      },
      stage: 3
    })
  ]
}

I didn't change tailwind.js. It remained with the previous version.

What happens?