diff options
| author | Mark Otto <[email protected]> | 2016-02-07 22:48:26 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-02-07 22:48:26 -0800 |
| commit | e455b6b8d2cd028d53640f14134f0e8b3f575786 (patch) | |
| tree | 7d3ee33ae188ac37734fb92ec1d29d695d21fd63 /scss | |
| parent | e589cdbfe9421d58f6c3ff4d2820056983df6def (diff) | |
| parent | e3b55aadea895bdb0910f3ffd3f74d89fee37925 (diff) | |
| download | bootstrap-e455b6b8d2cd028d53640f14134f0e8b3f575786.tar.xz bootstrap-e455b6b8d2cd028d53640f14134f0e8b3f575786.zip | |
Merge branch 'v4-dev' into v4-form-sizing
Diffstat (limited to 'scss')
| -rw-r--r-- | scss/_forms.scss | 8 | ||||
| -rw-r--r-- | scss/_print.scss | 174 | ||||
| -rw-r--r-- | scss/_reboot.scss | 3 | ||||
| -rw-r--r-- | scss/_variables.scss | 15 |
4 files changed, 108 insertions, 92 deletions
diff --git a/scss/_forms.scss b/scss/_forms.scss index aaa7ffc73..7055cad23 100644 --- a/scss/_forms.scss +++ b/scss/_forms.scss @@ -56,7 +56,7 @@ } select.form-control { - &:not([size], [multiple]) { + &:not([size]):not([multiple]) { height: $input-height; } } @@ -289,17 +289,17 @@ input[type="checkbox"] { // .form-control-success { -// background-image: url("#{$form-icon-success}"); +// background-image: $form-icon-success; // border-color: $brand-success; // } // // .form-control-warning { -// background-image: url("#{$form-icon-warning}"); +// background-image: $form-icon-warning; // border-color: $brand-warning; // } // // .form-control-error { -// background-image: url("#{$form-icon-danger}"); +// background-image: $form-icon-danger; // border-color: $brand-danger; // } diff --git a/scss/_print.scss b/scss/_print.scss index ac1c3bba0..d569cce4d 100644 --- a/scss/_print.scss +++ b/scss/_print.scss @@ -8,107 +8,109 @@ // http://www.phpied.com/delay-loading-your-print-css/ // ========================================================================== -@media print { - *, - *::before, - *::after, - *::first-letter, - *::first-line { - // Bootstrap specific; comment out `color` and `background` - //color: #000 !important; // Black prints faster: - // http://www.sanbeiji.com/archives/953 - text-shadow: none !important; - //background: transparent !important; - box-shadow: none !important; - } +@if $enable-print-styles { + @media print { + *, + *::before, + *::after, + *::first-letter, + *::first-line { + // Bootstrap specific; comment out `color` and `background` + //color: #000 !important; // Black prints faster: + // http://www.sanbeiji.com/archives/953 + text-shadow: none !important; + //background: transparent !important; + box-shadow: none !important; + } - a, - a:visited { - text-decoration: underline; - } + a, + a:visited { + text-decoration: underline; + } - // Bootstrap specific; comment the following selector out - //a[href]::after { - // content: " (" attr(href) ")"; - //} + // Bootstrap specific; comment the following selector out + //a[href]::after { + // content: " (" attr(href) ")"; + //} - abbr[title]::after { - content: " (" attr(title) ")"; - } + abbr[title]::after { + content: " (" attr(title) ")"; + } - // Bootstrap specific; comment the following selector out - // - // Don't show links that are fragment identifiers, - // or use the `javascript:` pseudo protocol - // - - //a[href^="#"]::after, - //a[href^="javascript:"]::after { - // content: ""; - //} - - pre, - blockquote { - border: $border-width solid #999; // Bootstrap custom code; using `$border-width` instead of 1px - page-break-inside: avoid; - } + // Bootstrap specific; comment the following selector out + // + // Don't show links that are fragment identifiers, + // or use the `javascript:` pseudo protocol + // + + //a[href^="#"]::after, + //a[href^="javascript:"]::after { + // content: ""; + //} + + pre, + blockquote { + border: $border-width solid #999; // Bootstrap custom code; using `$border-width` instead of 1px + page-break-inside: avoid; + } - // - // Printing Tables: - // http://css-discuss.incutio.com/wiki/Printing_Tables - // + // + // Printing Tables: + // http://css-discuss.incutio.com/wiki/Printing_Tables + // - thead { - display: table-header-group; - } + thead { + display: table-header-group; + } - tr, - img { - page-break-inside: avoid; - } + tr, + img { + page-break-inside: avoid; + } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } - h2, - h3 { - page-break-after: avoid; - } + h2, + h3 { + page-break-after: avoid; + } - // Bootstrap specific changes start + // Bootstrap specific changes start - // Bootstrap components - .navbar { - display: none; - } - .btn, - .dropup > .btn { - > .caret { - border-top-color: #000 !important; + // Bootstrap components + .navbar { + display: none; + } + .btn, + .dropup > .btn { + > .caret { + border-top-color: #000 !important; + } + } + .label { + border: $border-width solid #000; } - } - .label { - border: $border-width solid #000; - } - .table { - border-collapse: collapse !important; + .table { + border-collapse: collapse !important; - td, - th { - background-color: #fff !important; + td, + th { + background-color: #fff !important; + } } - } - .table-bordered { - th, - td { - border: 1px solid #ddd !important; + .table-bordered { + th, + td { + border: 1px solid #ddd !important; + } } - } - // Bootstrap specific changes end + // Bootstrap specific changes end + } } diff --git a/scss/_reboot.scss b/scss/_reboot.scss index fe4af1f93..0b2990130 100644 --- a/scss/_reboot.scss +++ b/scss/_reboot.scss @@ -34,8 +34,7 @@ html { // // @viewport is needed because IE 10+ doesn't honor <meta name="viewport"> in // some cases. See http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/. -// Eventually @viewport will replace <meta name="viewport">. It's been manually -// prefixed for forward-compatibility. +// Eventually @viewport will replace <meta name="viewport">. // // However, `device-width` is broken on IE 10 on Windows (Phone) 8, // (see http://timkadlec.com/2013/01/windows-phone-8-and-device-width/ and https://github.com/twbs/bootstrap/issues/10497) diff --git a/scss/_variables.scss b/scss/_variables.scss index 502bb7939..b7f31a296 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -17,6 +17,18 @@ // Fonts // Components +@mixin _assert-ascending($map, $map-name) { + $prev-key: null; + $prev-num: null; + @each $key, $num in $map { + @if $prev-num != null and $prev-num >= $num { + @warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !"; + } + $prev-key: $key; + $prev-num: $num; + } +} + // General variable structure // // Variable format should follow the `$component-modifier-state-property` order. @@ -50,6 +62,7 @@ $enable-gradients: false !default; $enable-transitions: false !default; $enable-hover-media-query: false !default; $enable-grid-classes: true !default; +$enable-print-styles: true !default; // Spacing @@ -111,6 +124,7 @@ $grid-breakpoints: ( lg: 992px, xl: 1200px ) !default; +@include _assert-ascending($grid-breakpoints, "$grid-breakpoints"); // Grid containers @@ -123,6 +137,7 @@ $container-max-widths: ( lg: 940px, xl: 1140px ) !default; +@include _assert-ascending($container-max-widths, "$container-max-widths"); // Grid columns |
