Skip to content

Commit

Permalink
Add autoprefixer
Browse files Browse the repository at this point in the history
  • Loading branch information
BBosman committed Mar 7, 2014
1 parent 84a7431 commit cb7eb67
Show file tree
Hide file tree
Showing 14 changed files with 305 additions and 56 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Expand Up @@ -169,6 +169,7 @@ license your work under the terms of the [MIT License](LICENSE.md).
- Always a space after a property's colon (e.g., `display: block;` and not `display:block;`).
- End all lines with a semi-colon.
- For multiple, comma-separated selectors, place each selector on its own line.
- Don't add vendor prefixed properties to their unprefixed counterparts (e.g., only `box-sizing` and not also include `-webkit-box-sizing`), as this is done automagically at build time.
- Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks).
- Attribute selectors should only be used where absolutely necessary (e.g., form controls) and should be avoided on custom components for performance and explicitness.
- Series of classes for a component should include a base class (e.g., `.component`) and use the base class as a prefix for modifier and sub-components (e.g., `.component-lg`).
Expand Down
29 changes: 28 additions & 1 deletion Gruntfile.js
Expand Up @@ -202,6 +202,33 @@ module.exports = function (grunt) {
}
},

autoprefixer: {
options: {
browsers: ['last 2 versions', 'ie 8', 'ie 9', 'android 2.3', 'android 4', 'opera 12']
},
core: {
options: {
map: true
},
src: 'dist/css/<%= pkg.name %>.css'
},
theme: {
options: {
map: true
},
src: 'dist/css/<%= pkg.name %>-theme.css'
},
docs: {
src: 'docs/assets/css/docs.css'
},
examples: {
expand: true,
cwd: 'docs/examples/',
src: ['**/*.css'],
dest: 'docs/examples/'
}
},

css_flip: {
rtl: {
files: {
Expand Down Expand Up @@ -420,7 +447,7 @@ module.exports = function (grunt) {

// CSS distribution task.
grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']);
grunt.registerTask('dist-css', ['less-compile', 'css_flip', 'less:minify', 'cssmin', 'csscomb', 'usebanner']);
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer', 'css_flip', 'less:minify', 'cssmin', 'csscomb', 'usebanner']);

// Docs distribution task.
grunt.registerTask('dist-docs', 'copy:docs');
Expand Down
73 changes: 58 additions & 15 deletions dist/css/bootstrap-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cb7eb67

Please sign in to comment.