Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Let's use autoprefixer for prefixing #453

Closed
justinpage opened this issue Sep 7, 2015 · 6 comments
Closed

Let's use autoprefixer for prefixing #453

justinpage opened this issue Sep 7, 2015 · 6 comments

Comments

@justinpage
Copy link
Contributor

Idea

Let's use autoprefixer for supporting older browsers. Since we are dependent on grunt, we could take advantage of grunt-postcss. In our current project we have our task setup as the following:

...
    postcss: {
      options: {
        map: true,
        processors: [
          require('autoprefixer')({browsers: 'last 2 versions'})
        ]
      },
      dist: {
        src: 'assets/css/foundation.css'
      }
    }
  });

  grunt.loadNpmTasks('grunt-sass');
  grunt.loadNpmTasks('grunt-postcss');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-copy');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-string-replace');


  grunt.registerTask('build', ['copy', 'string-replace:fontawesome', 'sass',
    'postcss', 'concat', 'uglify']);
  grunt.registerTask('default', ['watch']);
};

Discussion

Some projects take responsibility in adding this as a bonus. Others do not. This decision is up to the project maintainer in deciding if it should be the projects responsibility in including this. To many, the above packages are default in css prefixing. In addition, postcss projects are heavily maintained by many contributors. As a front-end theme/package, you care about compatibility with as many browsers as possible. Or you may feel that such details should be left to the responsibility of the person that digests it.

From my perspective, I think it is something that should be added. But other developers feel different:
ConnorAtherton/loaders.css#18 (comment)

@radel
Copy link
Contributor

radel commented Sep 7, 2015

Lovely, I often add this too.
+1 for including it in the build process.

@justinpage
Copy link
Contributor Author

For full reference of the above snippet: https://gist.github.com/569f1a48fe61aa519be0

@Luciaisacomputer
Copy link
Contributor

I would really love to see this added.

+1

@arielnoname
Copy link

+1

1 similar comment
@AllyReid
Copy link

AllyReid commented Nov 6, 2015

+1

@olefredrik
Copy link
Owner

Done #544

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants