Commit cb7eb674 authored by Bas Bosman's avatar Bas Bosman

Add autoprefixer

parent 84a7431d
...@@ -169,6 +169,7 @@ license your work under the terms of the [MIT License](LICENSE.md). ...@@ -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;`). - Always a space after a property's colon (e.g., `display: block;` and not `display:block;`).
- End all lines with a semi-colon. - End all lines with a semi-colon.
- For multiple, comma-separated selectors, place each selector on its own line. - 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, 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. - 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`). - 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`).
......
...@@ -202,6 +202,33 @@ module.exports = function (grunt) { ...@@ -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: { css_flip: {
rtl: { rtl: {
files: { files: {
...@@ -420,7 +447,7 @@ module.exports = function (grunt) { ...@@ -420,7 +447,7 @@ module.exports = function (grunt) {
// CSS distribution task. // CSS distribution task.
grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']); 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. // Docs distribution task.
grunt.registerTask('dist-docs', 'copy:docs'); grunt.registerTask('dist-docs', 'copy:docs');
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -231,7 +231,9 @@ body { ...@@ -231,7 +231,9 @@ body {
text-align: center; text-align: center;
text-shadow: 0 1px 0 rgba(0,0,0,.1); text-shadow: 0 1px 0 rgba(0,0,0,.1);
background-color: #6f5499; background-color: #6f5499;
background-image: -webkit-gradient(linear, left top, left bottom, from(#563d7c), to(#6f5499));
background-image: -webkit-linear-gradient(top, #563d7c 0%, #6f5499 100%); background-image: -webkit-linear-gradient(top, #563d7c 0%, #6f5499 100%);
background-image: -o-linear-gradient(top, #563d7c 0%, #6f5499 100%);
background-image: linear-gradient(to bottom, #563d7c 0%, #6f5499 100%); background-image: linear-gradient(to bottom, #563d7c 0%, #6f5499 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#563d7c', endColorstr='#6F5499', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#563d7c', endColorstr='#6F5499', GradientType=0);
background-repeat: repeat-x; background-repeat: repeat-x;
...@@ -837,6 +839,7 @@ h1[id] { ...@@ -837,6 +839,7 @@ h1[id] {
border-color: #e5e5e5 #eee #eee; border-color: #e5e5e5 #eee #eee;
border-style: solid; border-style: solid;
border-width: 1px 0; border-width: 1px 0;
-webkit-box-shadow: inset 0 3px 6px rgba(0,0,0,.05);
box-shadow: inset 0 3px 6px rgba(0,0,0,.05); box-shadow: inset 0 3px 6px rgba(0,0,0,.05);
} }
/* Echo out a label for the example */ /* Echo out a label for the example */
...@@ -868,6 +871,7 @@ h1[id] { ...@@ -868,6 +871,7 @@ h1[id] {
border-color: #ddd; border-color: #ddd;
border-width: 1px; border-width: 1px;
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
-webkit-box-shadow: none;
box-shadow: none; box-shadow: none;
} }
.bs-example + .highlight { .bs-example + .highlight {
...@@ -1329,6 +1333,7 @@ h1[id] { ...@@ -1329,6 +1333,7 @@ h1[id] {
color: #fff; color: #fff;
background-color: #d9534f; background-color: #d9534f;
border-bottom: 1px solid #b94441; border-bottom: 1px solid #b94441;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
box-shadow: inset 0 1px 0 rgba(255,255,255,.25); box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
} }
.bs-customizer-alert .close { .bs-customizer-alert .close {
...@@ -1346,6 +1351,7 @@ h1[id] { ...@@ -1346,6 +1351,7 @@ h1[id] {
color: #fff; color: #fff;
background-color: #a83c3a; background-color: #a83c3a;
border-color: #973634; border-color: #973634;
-webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
box-shadow: inset 0 2px 4px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1); box-shadow: inset 0 2px 4px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
} }
...@@ -1449,6 +1455,6 @@ h1[id] { ...@@ -1449,6 +1455,6 @@ h1[id] {
border-color: rgba(82,168,236,.8); border-color: rgba(82,168,236,.8);
outline: 0; outline: 0;
outline: thin dotted \9; /* IE6-9 */ outline: thin dotted \9; /* IE6-9 */
-moz-box-shadow: 0 0 8px rgba(82,168,236,.6); -webkit-box-shadow: 0 0 8px rgba(82,168,236,.6);
box-shadow: 0 0 8px rgba(82,168,236,.6); box-shadow: 0 0 8px rgba(82,168,236,.6);
} }
...@@ -2972,6 +2972,7 @@ a { ...@@ -2972,6 +2972,7 @@ a {
<h3 id="less-mixins-box-sizing">Box-sizing</h3> <h3 id="less-mixins-box-sizing">Box-sizing</h3>
<p>Reset your components' box model with a single mixin. For context, see this <a href="https://developer.mozilla.org/en-US/docs/CSS/box-sizing" target="_blank">helpful article from Mozilla</a>.</p> <p>Reset your components' box model with a single mixin. For context, see this <a href="https://developer.mozilla.org/en-US/docs/CSS/box-sizing" target="_blank">helpful article from Mozilla</a>.</p>
<p>The mixin is <strong>deprecated</strong> as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixin internally until Bootstrap v4.</p>
{% highlight scss %} {% highlight scss %}
.box-sizing(@box-model) { .box-sizing(@box-model) {
-webkit-box-sizing: @box-model; // Safari <= 5 -webkit-box-sizing: @box-model; // Safari <= 5
...@@ -3014,6 +3015,7 @@ a { ...@@ -3014,6 +3015,7 @@ a {
<h3 id="less-mixins-transitions">Transitions</h3> <h3 id="less-mixins-transitions">Transitions</h3>
<p>Three mixins for flexibility. Set all transition information with one, or specify a separate delay and duration as needed.</p> <p>Three mixins for flexibility. Set all transition information with one, or specify a separate delay and duration as needed.</p>
<p>The mixins are <strong>deprecated</strong> as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.</p>
{% highlight scss %} {% highlight scss %}
.transition(@transition) { .transition(@transition) {
-webkit-transition: @transition; -webkit-transition: @transition;
...@@ -3041,6 +3043,7 @@ a { ...@@ -3041,6 +3043,7 @@ a {
<h3 id="less-mixins-transformations">Transformations</h3> <h3 id="less-mixins-transformations">Transformations</h3>
<p>Rotate, scale, translate (move), or skew any object.</p> <p>Rotate, scale, translate (move), or skew any object.</p>
<p>The mixins are <strong>deprecated</strong> as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.</p>
{% highlight scss %} {% highlight scss %}
.rotate(@degrees) { .rotate(@degrees) {
-webkit-transform: rotate(@degrees); -webkit-transform: rotate(@degrees);
...@@ -3097,6 +3100,7 @@ a { ...@@ -3097,6 +3100,7 @@ a {
<h3 id="less-mixins-animations">Animations</h3> <h3 id="less-mixins-animations">Animations</h3>
<p>A single mixin for using all of CSS3's animation properties in one declaration and other mixins for individual properties.</p> <p>A single mixin for using all of CSS3's animation properties in one declaration and other mixins for individual properties.</p>
<p>The mixins are <strong>deprecated</strong> as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.</p>
{% highlight scss %} {% highlight scss %}
.animation(@animation) { .animation(@animation) {
-webkit-animation: @animation; -webkit-animation: @animation;
...@@ -3143,8 +3147,7 @@ a { ...@@ -3143,8 +3147,7 @@ a {
<p>Provide context for form controls within each field.</p> <p>Provide context for form controls within each field.</p>
{% highlight scss %} {% highlight scss %}
.placeholder(@color: @input-color-placeholder) { .placeholder(@color: @input-color-placeholder) {
&:-moz-placeholder { color: @color; } // Firefox 4-18 &::-moz-placeholder { color: @color; } // Firefox
&::-moz-placeholder { color: @color; } // Firefox 19+
&:-ms-input-placeholder { color: @color; } // Internet Explorer 10+ &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
&::-webkit-input-placeholder { color: @color; } // Safari and Chrome &::-webkit-input-placeholder { color: @color; } // Safari and Chrome
} }
......
...@@ -37,6 +37,7 @@ h6, .h6 { ...@@ -37,6 +37,7 @@ h6, .h6 {
.blog-masthead { .blog-masthead {
background-color: #428bca; background-color: #428bca;
-webkit-box-shadow: inset 0 -2px 5px rgba(0,0,0,.1);
box-shadow: inset 0 -2px 5px rgba(0,0,0,.1); box-shadow: inset 0 -2px 5px rgba(0,0,0,.1);
} }
......
...@@ -33,6 +33,7 @@ body { ...@@ -33,6 +33,7 @@ body {
color: #fff; color: #fff;
text-align: center; text-align: center;
text-shadow: 0 1px 3px rgba(0,0,0,.5); text-shadow: 0 1px 3px rgba(0,0,0,.5);
-webkit-box-shadow: inset 0 0 100px rgba(0,0,0,.5);
box-shadow: inset 0 0 100px rgba(0,0,0,.5); box-shadow: inset 0 0 100px rgba(0,0,0,.5);
} }
......
...@@ -34,11 +34,10 @@ body { ...@@ -34,11 +34,10 @@ body {
color: #777; color: #777;
text-align: center; text-align: center;
background-color: #e5e5e5; /* Old browsers */ background-color: #e5e5e5; /* Old browsers */
background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e5e5e5 100%); /* FF3.6+ */ background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e5e5e5));
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */ background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e5e5e5 100%);
background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* Chrome 10+,Safari 5.1+ */ background-image: -o-linear-gradient(top, #f5f5f5 0%, #e5e5e5 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* Opera 11.10+ */ background-image: linear-gradient(top, #f5f5f5 0%, #e5e5e5 100%);
background-image: linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
background-repeat: repeat-x; /* Repeat the gradient */ background-repeat: repeat-x; /* Repeat the gradient */
border-bottom: 1px solid #d5d5d5; border-bottom: 1px solid #d5d5d5;
...@@ -48,6 +47,7 @@ body { ...@@ -48,6 +47,7 @@ body {
.nav-justified > .active > a:focus { .nav-justified > .active > a:focus {
background-color: #ddd; background-color: #ddd;
background-image: none; background-image: none;
-webkit-box-shadow: inset 0 3px 7px rgba(0,0,0,.15);
box-shadow: inset 0 3px 7px rgba(0,0,0,.15); box-shadow: inset 0 3px 7px rgba(0,0,0,.15);
} }
.nav-justified > li:first-child > a { .nav-justified > li:first-child > a {
......
...@@ -21,7 +21,7 @@ footer { ...@@ -21,7 +21,7 @@ footer {
.row-offcanvas { .row-offcanvas {
position: relative; position: relative;
-webkit-transition: all .25s ease-out; -webkit-transition: all .25s ease-out;
-moz-transition: all .25s ease-out; -o-transition: all .25s ease-out;
transition: all .25s ease-out; transition: all .25s ease-out;
} }
......
This diff is collapsed.
...@@ -6,13 +6,6 @@ ...@@ -6,13 +6,6 @@
// Bar animations // Bar animations
// ------------------------- // -------------------------
// WebKit
@-webkit-keyframes progress-bar-stripes {
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// Spec and IE10+
@keyframes progress-bar-stripes { @keyframes progress-bar-stripes {
from { background-position: 40px 0; } from { background-position: 40px 0; }
to { background-position: 0 0; } to { background-position: 0 0; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment