Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get PostCSS Autoprefixer working with Rails 6

I am wondering if anyone has any luck getting PostCSS Autoprefixer to work with Rails 6?

Previous post where i determined that autoprefixer was not working.

Is there a way to test if PostCSS Autoprefixer is working? Specifically for Rails 6

Here is my postcss.config.js...

module.exports = {
  plugins: [
    require('postcss-import'),
    require('postcss-flexbugs-fixes'),
    require('postcss-preset-env')({
      autoprefixer: {
        flexbox: 'no-2009'
      },
      stage: 3
    })
  ]
}

Here is my packs/application.js...

require("@rails/ujs").start()
require("@rails/activestorage").start()
require("bootstrap/dist/js/bootstrap")
require("pretty-checkbox/dist/pretty-checkbox.min.css")
like image 786
Verty00 Avatar asked Nov 16 '22 23:11

Verty00


1 Answers

You could run rake autoprefixer:info to test your autoprefixer already installed.

Also, install it as mentioned on https://github.com/ai/autoprefixer-rails

Some property value doesn't need prefix anymore. In my case, checking some css transition are still added those prefix.

like image 56
Adam Avatar answered Nov 19 '22 10:11

Adam