Skip to content

Commit cb7eb67

Browse files
committed
Add autoprefixer
1 parent 84a7431 commit cb7eb67

File tree

14 files changed

+305
-56
lines changed

14 files changed

+305
-56
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ license your work under the terms of the [MIT License](LICENSE.md).
169169
- Always a space after a property's colon (e.g., `display: block;` and not `display:block;`).
170170
- End all lines with a semi-colon.
171171
- For multiple, comma-separated selectors, place each selector on its own line.
172+
- 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.
172173
- 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).
173174
- Attribute selectors should only be used where absolutely necessary (e.g., form controls) and should be avoided on custom components for performance and explicitness.
174175
- 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`).

Gruntfile.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,33 @@ module.exports = function (grunt) {
202202
}
203203
},
204204

205+
autoprefixer: {
206+
options: {
207+
browsers: ['last 2 versions', 'ie 8', 'ie 9', 'android 2.3', 'android 4', 'opera 12']
208+
},
209+
core: {
210+
options: {
211+
map: true
212+
},
213+
src: 'dist/css/<%= pkg.name %>.css'
214+
},
215+
theme: {
216+
options: {
217+
map: true
218+
},
219+
src: 'dist/css/<%= pkg.name %>-theme.css'
220+
},
221+
docs: {
222+
src: 'docs/assets/css/docs.css'
223+
},
224+
examples: {
225+
expand: true,
226+
cwd: 'docs/examples/',
227+
src: ['**/*.css'],
228+
dest: 'docs/examples/'
229+
}
230+
},
231+
205232
css_flip: {
206233
rtl: {
207234
files: {
@@ -420,7 +447,7 @@ module.exports = function (grunt) {
420447

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

425452
// Docs distribution task.
426453
grunt.registerTask('dist-docs', 'copy:docs');

dist/css/bootstrap-rtl.css

Lines changed: 58 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)