diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2016-02-19 19:23:15 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2016-02-19 19:23:15 +0300 |
commit | 59a78d6f71e79f73a954a87a4b3769d9c85c49f2 (patch) | |
tree | 1c2e4c2cc719b946aa2e930293494a4440f0b551 /assets/stylesheets | |
parent | 76dfa96d6a6f519abb00f27680fbafa2714900d5 (diff) |
rake update[v4-dev]
Diffstat (limited to 'assets/stylesheets')
43 files changed, 585 insertions, 518 deletions
diff --git a/assets/stylesheets/_bootstrap.scss b/assets/stylesheets/_bootstrap.scss index 0710363..14cf514 100644 --- a/assets/stylesheets/_bootstrap.scss +++ b/assets/stylesheets/_bootstrap.scss @@ -34,7 +34,7 @@ @import "bootstrap/card"; @import "bootstrap/breadcrumb"; @import "bootstrap/pagination"; -@import "bootstrap/labels"; +@import "bootstrap/tags"; @import "bootstrap/jumbotron"; @import "bootstrap/alert"; @import "bootstrap/progress"; diff --git a/assets/stylesheets/bootstrap/_alert.scss b/assets/stylesheets/bootstrap/_alert.scss index b3dcf03..55fc101 100644 --- a/assets/stylesheets/bootstrap/_alert.scss +++ b/assets/stylesheets/bootstrap/_alert.scss @@ -7,15 +7,6 @@ margin-bottom: $spacer-y; border: $alert-border-width solid transparent; @include border-radius($alert-border-radius); - - // Improve alignment and spacing of inner content - > p, - > ul { - margin-bottom: 0; - } - > p + p { - margin-top: 5px; - } } // Headings for larger alerts diff --git a/assets/stylesheets/bootstrap/_button-group.scss b/assets/stylesheets/bootstrap/_button-group.scss index 3ef563f..ff6c33f 100644 --- a/assets/stylesheets/bootstrap/_button-group.scss +++ b/assets/stylesheets/bootstrap/_button-group.scss @@ -1,3 +1,5 @@ +// scss-lint:disable QualifyingElement + // Make the div behave like a button .btn-group, .btn-group-vertical { diff --git a/assets/stylesheets/bootstrap/_buttons.scss b/assets/stylesheets/bootstrap/_buttons.scss index 640fe1d..119cf1c 100644 --- a/assets/stylesheets/bootstrap/_buttons.scss +++ b/assets/stylesheets/bootstrap/_buttons.scss @@ -1,3 +1,5 @@ +// scss-lint:disable QualifyingElement + // // Base styles // @@ -5,13 +7,14 @@ .btn { display: inline-block; font-weight: $btn-font-weight; + line-height: $btn-line-height; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; user-select: none; border: $input-btn-border-width solid transparent; - @include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $line-height, $btn-border-radius); + @include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-border-radius); @include transition(all .2s ease-in-out); &, @@ -141,11 +144,11 @@ fieldset[disabled] a.btn { .btn-lg { // line-height: ensure even-numbered height of button next to large input - @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $line-height-lg, $btn-border-radius-lg); + @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-border-radius-lg); } .btn-sm { // line-height: ensure proper height of button next to small input - @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $line-height-sm, $btn-border-radius-sm); + @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-border-radius-sm); } diff --git a/assets/stylesheets/bootstrap/_card.scss b/assets/stylesheets/bootstrap/_card.scss index 3982f6e..856d6c6 100644 --- a/assets/stylesheets/bootstrap/_card.scss +++ b/assets/stylesheets/bootstrap/_card.scss @@ -7,8 +7,10 @@ display: block; margin-bottom: $card-spacer-y; background-color: $card-bg; - border: $card-border-width solid $card-border-color; + // border: $card-border-width solid $card-border-color; @include border-radius($card-border-radius); + // Doesn't use mixin so that cards always have a "border" + box-shadow: inset 0 0 0 $card-border-width $card-border-color; } .card-block { @@ -51,13 +53,15 @@ .card { > .list-group:first-child { .list-group-item:first-child { - border-radius: $card-border-radius $card-border-radius 0 0; + border-top-left-radius: $card-border-radius; + border-top-right-radius: $card-border-radius; } } > .list-group:last-child { .list-group-item:last-child { - border-radius: 0 0 $card-border-radius $card-border-radius; + border-bottom-right-radius: $card-border-radius; + border-bottom-left-radius: $card-border-radius; } } } @@ -72,7 +76,9 @@ @include clearfix; padding: $card-spacer-y $card-spacer-x; background-color: $card-cap-bg; - border-bottom: $card-border-width solid $card-border-color; + // border-bottom: $card-border-width solid $card-border-color; + // Doesn't use mixin so that cards always have a "border" + box-shadow: inset 0 0 0 $card-border-width $card-border-color; &:first-child { @include border-radius($card-border-radius-inner $card-border-radius-inner 0 0); @@ -83,7 +89,9 @@ @include clearfix; padding: $card-spacer-y $card-spacer-x; background-color: $card-cap-bg; - border-top: $card-border-width solid $card-border-color; + // border-top: $card-border-width solid $card-border-color; + // Doesn't use mixin so that cards always have a "border" + box-shadow: inset 0 0 0 $card-border-width $card-border-color; &:last-child { @include border-radius(0 0 $card-border-radius-inner $card-border-radius-inner); @@ -92,6 +100,27 @@ // +// Header navs +// + +.card-header-tabs { + margin-right: -($card-spacer-x / 2); + margin-bottom: -$card-spacer-y; + margin-left: -($card-spacer-x / 2); + border-bottom: 0; + + .nav-item { + margin-bottom: 0; + } +} + +.card-header-pills { + margin-right: -($card-spacer-x / 2); + margin-left: -($card-spacer-x / 2); +} + + +// // Background variations // @@ -286,7 +315,7 @@ @include media-breakpoint-up(sm) { .card-columns { column-count: 3; - column-gap: 1.25rem; + column-gap: $card-columns-sm-up-column-gap; .card { display: inline-block; diff --git a/assets/stylesheets/bootstrap/_carousel.scss b/assets/stylesheets/bootstrap/_carousel.scss index af8c95c..2ff886a 100644 --- a/assets/stylesheets/bootstrap/_carousel.scss +++ b/assets/stylesheets/bootstrap/_carousel.scss @@ -163,16 +163,16 @@ bottom: 10px; left: 50%; z-index: 15; - width: 60%; + width: $carousel-indicators-width; padding-left: 0; - margin-left: -30%; + margin-left: -($carousel-indicators-width / 2); text-align: center; list-style: none; li { display: inline-block; - width: 10px; - height: 10px; + width: $carousel-indicator-size; + height: $carousel-indicator-size; margin: 1px; text-indent: -999px; cursor: pointer; @@ -183,11 +183,12 @@ // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer background-color: rgba(0,0,0,0); // IE9 border: 1px solid $carousel-indicator-border-color; - border-radius: 10px; + border-radius: $carousel-indicator-size; } + .active { - width: 12px; - height: 12px; + width: $carousel-indicator-active-size; + height: $carousel-indicator-active-size; margin: 0; background-color: $carousel-indicator-active-bg; } @@ -200,9 +201,9 @@ .carousel-caption { position: absolute; - right: 15%; + right: ((100% - $carousel-caption-width) / 2); bottom: 20px; - left: 15%; + left: ((100% - $carousel-caption-width) / 2); z-index: 10; padding-top: 20px; padding-bottom: 20px; @@ -225,23 +226,23 @@ .carousel-control { .icon-prev, .icon-next { - width: 30px; - height: 30px; - margin-top: -15px; - font-size: 30px; + width: $carousel-control-sm-up-size; + height: $carousel-control-sm-up-size; + margin-top: -($carousel-control-sm-up-size / 2); + font-size: $carousel-control-sm-up-size; } .icon-prev { - margin-left: -15px; + margin-left: -($carousel-control-sm-up-size / 2); } .icon-next { - margin-right: -15px; + margin-right: -($carousel-control-sm-up-size / 2); } } // Show and left align the captions .carousel-caption { - right: 20%; - left: 20%; + right: ((100% - $carousel-caption-sm-up-width) / 2); + left: ((100% - $carousel-caption-sm-up-width) / 2); padding-bottom: 30px; } diff --git a/assets/stylesheets/bootstrap/_close.scss b/assets/stylesheets/bootstrap/_close.scss index 89e68a3..f98d4c1 100644 --- a/assets/stylesheets/bootstrap/_close.scss +++ b/assets/stylesheets/bootstrap/_close.scss @@ -19,6 +19,8 @@ // iOS requires the button element instead of an anchor tag. // If you want the anchor version, it requires `href="#"`. // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile + +// scss-lint:disable QualifyingElement button.close { padding: 0; cursor: pointer; @@ -26,3 +28,4 @@ button.close { border: 0; -webkit-appearance: none; } +// scss-lint:enable QualifyingElement diff --git a/assets/stylesheets/bootstrap/_code.scss b/assets/stylesheets/bootstrap/_code.scss index a9ddb4c..ea660bc 100644 --- a/assets/stylesheets/bootstrap/_code.scss +++ b/assets/stylesheets/bootstrap/_code.scss @@ -8,8 +8,8 @@ samp { // Inline code code { - padding: .2rem .4rem; - font-size: 90%; + padding: $code-padding-y $code-padding-x; + font-size: $code-font-size; color: $code-color; background-color: $code-bg; @include border-radius($border-radius); @@ -17,8 +17,8 @@ code { // User input typically entered via keyboard kbd { - padding: .2rem .4rem; - font-size: 90%; + padding: $code-padding-y $code-padding-x; + font-size: $code-font-size; color: $kbd-color; background-color: $kbd-bg; @include border-radius($border-radius-sm); @@ -37,8 +37,7 @@ pre { display: block; margin-top: 0; margin-bottom: 1rem; - font-size: 90%; - line-height: $line-height; + font-size: $code-font-size; color: $pre-color; // Account for some code outputs that place code tags in pre tags diff --git a/assets/stylesheets/bootstrap/_custom-forms.scss b/assets/stylesheets/bootstrap/_custom-forms.scss index 88723a2..371945c 100644 --- a/assets/stylesheets/bootstrap/_custom-forms.scss +++ b/assets/stylesheets/bootstrap/_custom-forms.scss @@ -13,6 +13,7 @@ position: relative; display: inline; padding-left: $custom-control-gutter; + cursor: pointer; + .custom-control { margin-left: $custom-control-spacer-x; @@ -84,12 +85,12 @@ } .custom-control-input:checked ~ .custom-control-indicator { - background-image: url(#{$custom-checkbox-checked-icon}); + background-image: $custom-checkbox-checked-icon; } .custom-control-input:indeterminate ~ .custom-control-indicator { background-color: $custom-checkbox-indeterminate-bg; - background-image: url(#{$custom-checkbox-indeterminate-icon}); + background-image: $custom-checkbox-indeterminate-icon; @include box-shadow($custom-checkbox-indeterminate-box-shadow); } } @@ -104,7 +105,7 @@ } .custom-control-input:checked ~ .custom-control-indicator { - background-image: url(#{$custom-radio-checked-icon}); + background-image: $custom-radio-checked-icon; } } @@ -145,7 +146,7 @@ padding-right: $custom-select-padding-x \9; color: $custom-select-color; vertical-align: middle; - background: $custom-select-bg url(#{$custom-select-indicator}) no-repeat right $custom-select-padding-x center; + background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center; background-image: none \9; background-size: $custom-select-bg-size; border: $custom-select-border-width solid $custom-select-border-color; @@ -218,8 +219,10 @@ @include border-radius($custom-file-border-radius); @include box-shadow($custom-file-box-shadow); - &::after { - content: $custom-file-placeholder; + @each $lang, $text in map-get($custom-file-text, placeholder) { + &:lang(#{$lang})::after { + content: $text; + } } &::before { @@ -233,9 +236,14 @@ padding: $custom-file-padding-x $custom-file-padding-y; line-height: $custom-file-line-height; color: $custom-file-button-color; - content: $custom-file-button-label; background-color: $custom-file-button-bg; border: $custom-file-border-width solid $custom-file-border-color; @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0); } + + @each $lang, $text in map-get($custom-file-text, button-label) { + &:lang(#{$lang})::before { + content: $text; + } + } } diff --git a/assets/stylesheets/bootstrap/_dropdown.scss b/assets/stylesheets/bootstrap/_dropdown.scss index cf4472a..47fc204 100644 --- a/assets/stylesheets/bootstrap/_dropdown.scss +++ b/assets/stylesheets/bootstrap/_dropdown.scss @@ -42,9 +42,9 @@ z-index: $zindex-dropdown; display: none; // none by default, but block on "open" of the menu float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; // override default ul + min-width: $dropdown-min-width; + padding: $dropdown-padding-y 0; + margin: $dropdown-margin-top 0 0; // override default ul font-size: $font-size-base; color: $body-color; text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) @@ -67,10 +67,9 @@ .dropdown-item { display: block; width: 100%; // For `<button>`s - padding: 3px 20px; + padding: 3px $dropdown-item-padding-x; clear: both; font-weight: normal; - line-height: $line-height; color: $dropdown-link-color; text-align: inherit; // For `<button>`s white-space: nowrap; // prevent links from randomly breaking onto new lines @@ -133,12 +132,7 @@ right: 0; left: auto; // Reset the default from `.dropdown-menu` } -// With v3, we enabled auto-flipping if you have a dropdown within a right -// aligned nav component. To enable the undoing of that, we provide an override -// to restore the default dropdown menu alignment. -// -// This is only for left-aligning a dropdown menu within a `.navbar-right` or -// `.pull-right` nav component. + .dropdown-menu-left { right: auto; left: 0; @@ -147,9 +141,8 @@ // Dropdown section headers .dropdown-header { display: block; - padding: 3px 20px; + padding: $dropdown-padding-y $dropdown-item-padding-x; font-size: $font-size-sm; - line-height: $line-height; color: $dropdown-header-color; white-space: nowrap; // as with > li > a } @@ -164,12 +157,6 @@ z-index: $zindex-dropdown-backdrop; } -// Right aligned dropdowns -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} - // Allow for dropdowns to go bottom up (aka, dropup-menu) // // Just add .dropup after the standard .dropdown class and you're set. @@ -188,6 +175,6 @@ .dropdown-menu { top: auto; bottom: 100%; - margin-bottom: 2px; + margin-bottom: $dropdown-margin-top; } } diff --git a/assets/stylesheets/bootstrap/_forms.scss b/assets/stylesheets/bootstrap/_forms.scss index 6de81fc..729ca76 100644 --- a/assets/stylesheets/bootstrap/_forms.scss +++ b/assets/stylesheets/bootstrap/_forms.scss @@ -1,3 +1,5 @@ +// scss-lint:disable QualifyingElement + // // Textual form controls // @@ -9,25 +11,18 @@ // height: $input-height; padding: $input-padding-y $input-padding-x; font-size: $font-size-base; - line-height: $line-height; + line-height: $input-line-height; color: $input-color; background-color: $input-bg; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214. background-image: none; + background-clip: padding-box; border: $input-btn-border-width solid $input-border-color; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS. @include border-radius($input-border-radius); @include box-shadow($input-box-shadow); @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s); - // Make inputs at least the height of their button counterpart (base line-height + padding + border). - // Only apply the height to textual inputs and some selects. - // &:not(textarea), - // &:not(select[size]), - // &:not(select[multiple]) { - // height: $input-height; - // } - // Unstyle the caret on `<select>`s in IE10+. &::-ms-expand { background-color: transparent; @@ -61,6 +56,11 @@ } } +select.form-control { + &:not([size]):not([multiple]) { + height: $input-height; + } +} // Make file inputs better match text inputs by forcing them to new lines. .form-control-file, @@ -92,8 +92,6 @@ // // Note that as of 8.3, iOS doesn't support `week`. -// SCSS-Lint exemption until https://github.com/brigade/scss-lint/pull/672 gets merged -// scss-lint:disable PseudoElement _::-webkit-full-page-media, // Hack to make this CSS be Safari-only; see http://browserbu.gs/css-hacks/webkit-full-page-media/ input[type="date"], input[type="time"], @@ -113,7 +111,6 @@ input[type="month"] { line-height: $input-height-lg; } } -// scss-lint:enable PseudoElement // Static form control text @@ -146,18 +143,14 @@ input[type="month"] { // issue documented in https://github.com/twbs/bootstrap/issues/15074. .form-control-sm { - // height: $input-height-sm; padding: $input-padding-y-sm $input-padding-x-sm; font-size: $font-size-sm; - line-height: $line-height-sm; @include border-radius($input-border-radius-sm); } .form-control-lg { - // height: $input-height-lg; padding: $input-padding-y-lg $input-padding-x-lg; font-size: $font-size-lg; - line-height: $line-height-lg; @include border-radius($input-border-radius-lg); } @@ -264,8 +257,8 @@ input[type="checkbox"] { .form-control-danger { padding-right: ($input-padding-x * 3); background-repeat: no-repeat; - background-position: center right ($input-height * .25); - background-size: ($input-height * .65) ($input-height * .65); + background-position: center right ($input-height / 4); + background-size: ($input-height / 2) ($input-height / 2); } // Form validation states @@ -273,7 +266,7 @@ input[type="checkbox"] { @include form-control-validation($brand-success); .form-control-success { - background-image: url($form-icon-success); + background-image: $form-icon-success; } } @@ -281,7 +274,7 @@ input[type="checkbox"] { @include form-control-validation($brand-warning); .form-control-warning { - background-image: url($form-icon-warning); + background-image: $form-icon-warning; } } @@ -289,7 +282,7 @@ input[type="checkbox"] { @include form-control-validation($brand-danger); .form-control-danger { - background-image: url($form-icon-danger); + background-image: $form-icon-danger; } } @@ -297,17 +290,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/assets/stylesheets/bootstrap/_grid.scss b/assets/stylesheets/bootstrap/_grid.scss index d846f09..24cf74d 100644 --- a/assets/stylesheets/bootstrap/_grid.scss +++ b/assets/stylesheets/bootstrap/_grid.scss @@ -30,7 +30,6 @@ } } - // Columns // // Common styles for small and large grid columns @@ -38,40 +37,3 @@ @if $enable-grid-classes { @include make-grid-columns(); } - - -// Flex variation -// -// Custom styles for additional flex alignment options. - -@if $enable-flex and $enable-grid-classes { - - // Flex column reordering - - @each $breakpoint in map-keys($grid-breakpoints) { - @include media-breakpoint-up($breakpoint) { - .col-#{$breakpoint}-first { order: -1; } - .col-#{$breakpoint}-last { order: 1; } - } - } - - // Alignment for every column in row - - @each $breakpoint in map-keys($grid-breakpoints) { - @include media-breakpoint-up($breakpoint) { - .row-#{$breakpoint}-top { align-items: flex-start; } - .row-#{$breakpoint}-center { align-items: center; } - .row-#{$breakpoint}-bottom { align-items: flex-end; } - } - } - - // Alignment per column - - @each $breakpoint in map-keys($grid-breakpoints) { - @include media-breakpoint-up($breakpoint) { - .col-#{$breakpoint}-top { align-self: flex-start; } - .col-#{$breakpoint}-center { align-self: center; } - .col-#{$breakpoint}-bottom { align-self: flex-end; } - } - } -} diff --git a/assets/stylesheets/bootstrap/_images.scss b/assets/stylesheets/bootstrap/_images.scss index 60e8fc9..d17006d 100644 --- a/assets/stylesheets/bootstrap/_images.scss +++ b/assets/stylesheets/bootstrap/_images.scss @@ -17,7 +17,6 @@ // Image thumbnails .img-thumbnail { padding: $thumbnail-padding; - line-height: $line-height; background-color: $thumbnail-bg; border: $thumbnail-border-width solid $thumbnail-border-color; border-radius: $thumbnail-border-radius; @@ -48,6 +47,6 @@ } .figure-caption { - font-size: 90%; + font-size: $figure-caption-font-size; color: $gray-light; } diff --git a/assets/stylesheets/bootstrap/_input-group.scss b/assets/stylesheets/bootstrap/_input-group.scss index eeca6ee..1c651d1 100644 --- a/assets/stylesheets/bootstrap/_input-group.scss +++ b/assets/stylesheets/bootstrap/_input-group.scss @@ -4,6 +4,7 @@ .input-group { position: relative; + width: 100%; @if $enable-flex { display: flex; @@ -85,9 +86,10 @@ .input-group-addon { padding: $input-padding-y $input-padding-x; + margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom font-size: $font-size-base; font-weight: normal; - line-height: 1.5; + line-height: $input-line-height; color: $input-color; text-align: center; background-color: $input-group-addon-bg; @@ -106,11 +108,13 @@ @include border-radius($border-radius-lg); } + // scss-lint:disable QualifyingElement // Nuke default margins from checkboxes and radios to vertically center within. input[type="radio"], input[type="checkbox"] { margin-top: 0; } + // scss-lint:enable QualifyingElement } @@ -118,32 +122,31 @@ // Reset rounded corners // -.input-group .form-control:first-child, -.input-group-addon:first-child, -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group > .btn, -.input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), -.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { +.input-group .form-control:not(:last-child), +.input-group-addon:not(:last-child), +.input-group-btn:not(:last-child) > .btn, +.input-group-btn:not(:last-child) > .btn-group > .btn, +.input-group-btn:not(:last-child) > .dropdown-toggle, +.input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn { @include border-right-radius(0); } -.input-group-addon:first-child { +.input-group-addon:not(:last-child) { border-right: 0; } -.input-group .form-control:last-child, -.input-group-addon:last-child, -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group > .btn, -.input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child), -.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { +.input-group .form-control:not(:first-child), +.input-group-addon:not(:first-child), +.input-group-btn:not(:first-child) > .btn, +.input-group-btn:not(:first-child) > .btn-group > .btn, +.input-group-btn:not(:first-child) > .dropdown-toggle, +.input-group-btn:not(:last-child) > .btn:not(:first-child), +.input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn { @include border-left-radius(0); } -.input-group-addon:last-child { +.form-control + .input-group-addon:not(:first-child) { border-left: 0; } - // // Button input groups // @@ -169,13 +172,13 @@ } // Negative margin to only have a single, shared border between the two - &:first-child { + &:not(:last-child) { > .btn, > .btn-group { margin-right: (-$input-btn-border-width); } } - &:last-child { + &:not(:first-child) { > .btn, > .btn-group { z-index: 2; diff --git a/assets/stylesheets/bootstrap/_labels.scss b/assets/stylesheets/bootstrap/_labels.scss deleted file mode 100644 index c58ddde..0000000 --- a/assets/stylesheets/bootstrap/_labels.scss +++ /dev/null @@ -1,77 +0,0 @@ -// Base class -// -// Requires one of the contextual, color modifier classes for `color` and -// `background-color`. - -.label { - display: inline-block; - padding: .25em .4em; - font-size: 75%; - font-weight: $label-font-weight; - line-height: 1; - color: $label-color; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - @include border-radius(); - - // Empty labels collapse automatically - &:empty { - display: none; - } -} - -// Quick fix for labels in buttons -.btn .label { - position: relative; - top: -1px; -} - -// Add hover effects, but only for links -a.label { - @include hover-focus { - color: $label-link-hover-color; - text-decoration: none; - cursor: pointer; - } -} - -// Pill labels -// -// Make them extra rounded with a modifier to replace v3's badges. - -.label-pill { - padding-right: .6em; - padding-left: .6em; - // Use a higher than normal value to ensure completely rounded edges when - // customizing padding or font-size on labels. - @include border-radius(10rem); -} - -// Colors -// -// Contextual variations (linked labels get darker on :hover). - -.label-default { - @include label-variant($label-default-bg); -} - -.label-primary { - @include label-variant($label-primary-bg); -} - -.label-success { - @include label-variant($label-success-bg); -} - -.label-info { - @include label-variant($label-info-bg); -} - -.label-warning { - @include label-variant($label-warning-bg); -} - -.label-danger { - @include label-variant($label-danger-bg); -} diff --git a/assets/stylesheets/bootstrap/_list-group.scss b/assets/stylesheets/bootstrap/_list-group.scss index 5115e56..d7e2ec5 100644 --- a/assets/stylesheets/bootstrap/_list-group.scss +++ b/assets/stylesheets/bootstrap/_list-group.scss @@ -16,67 +16,21 @@ .list-group-item { position: relative; display: block; - padding: .75rem 1.25rem; + padding: $list-group-item-padding-y $list-group-item-padding-x; // Place the border on the list items and negative margin up for better styling margin-bottom: -$list-group-border-width; background-color: $list-group-bg; border: $list-group-border-width solid $list-group-border-color; - // Round the first and last items &:first-child { @include border-top-radius($list-group-border-radius); } + &:last-child { margin-bottom: 0; @include border-bottom-radius($list-group-border-radius); } -} - -.list-group-flush { - .list-group-item { - border-width: $list-group-border-width 0; - border-radius: 0; - } - - &:first-child { - .list-group-item:first-child { - border-top: 0; - } - } - - &:last-child { - .list-group-item:last-child { - border-bottom: 0; - } - } -} - - -// Interactive list items -// -// Use anchor or button elements instead of `li`s or `div`s to create interactive -// list items. Includes an extra `.active` modifier class for selected items. - -a.list-group-item, -button.list-group-item { - width: 100%; - color: $list-group-link-color; - text-align: inherit; - - .list-group-item-heading { - color: $list-group-link-heading-color; - } - // Hover state - @include hover-focus { - color: $list-group-link-hover-color; - text-decoration: none; - background-color: $list-group-hover-bg; - } -} - -.list-group-item { - // Disabled state &.disabled { @include plain-hover-focus { color: $list-group-disabled-color; @@ -93,11 +47,11 @@ button.list-group-item { } } - // Active class on item itself, not parent &.active { @include plain-hover-focus { z-index: 2; // Place active items above their siblings for proper border styling color: $list-group-active-color; + text-decoration: none; // Repeat here because it inherits global a:hover otherwise background-color: $list-group-active-bg; border-color: $list-group-active-border; @@ -114,6 +68,35 @@ button.list-group-item { } } +.list-group-flush { + .list-group-item { + border-radius: 0; + } +} + + +// Interactive list items +// +// Use anchor or button elements instead of `li`s or `div`s to create interactive +// list items. Includes an extra `.active` modifier class for selected items. + +.list-group-item-action { + width: 100%; // For `<button>`s (anchors become 100% by default though) + color: $list-group-link-color; + text-align: inherit; // For `<button>`s (anchors inherit) + + .list-group-item-heading { + color: $list-group-link-heading-color; + } + + // Hover state + @include hover-focus { + color: $list-group-link-hover-color; + text-decoration: none; + background-color: $list-group-hover-bg; + } +} + // Contextual variants // @@ -132,7 +115,7 @@ button.list-group-item { .list-group-item-heading { margin-top: 0; - margin-bottom: 5px; + margin-bottom: $list-group-item-heading-margin-bottom; } .list-group-item-text { margin-bottom: 0; diff --git a/assets/stylesheets/bootstrap/_mixins.scss b/assets/stylesheets/bootstrap/_mixins.scss index 934769f..1b5bf0f 100644 --- a/assets/stylesheets/bootstrap/_mixins.scss +++ b/assets/stylesheets/bootstrap/_mixins.scss @@ -18,7 +18,7 @@ @import "mixins/breakpoints"; @import "mixins/hover"; @import "mixins/image"; -@import "mixins/label"; +@import "mixins/tag"; @import "mixins/reset-filter"; @import "mixins/resize"; @import "mixins/screen-reader"; @@ -48,7 +48,6 @@ // // Layout @import "mixins/clearfix"; -@import "mixins/center-block"; // @import "mixins/navbar-align"; @import "mixins/grid-framework"; @import "mixins/grid"; diff --git a/assets/stylesheets/bootstrap/_modal.scss b/assets/stylesheets/bootstrap/_modal.scss index c43d55b..83a1335 100644 --- a/assets/stylesheets/bootstrap/_modal.scss +++ b/assets/stylesheets/bootstrap/_modal.scss @@ -40,7 +40,7 @@ .modal-dialog { position: relative; width: auto; - margin: 10px; + margin: $modal-dialog-margin; } // Actual modal @@ -48,7 +48,7 @@ position: relative; background-color: $modal-content-bg; background-clip: padding-box; - border: 1px solid $modal-content-border-color; + border: $modal-content-border-width solid $modal-content-border-color; @include border-radius($border-radius-lg); @include box-shadow($modal-content-xs-box-shadow); // Remove focus outline from opened modal @@ -74,7 +74,7 @@ // Top section of the modal w/ title and dismiss .modal-header { padding: $modal-title-padding; - border-bottom: 1px solid $modal-header-border-color; + border-bottom: $modal-header-border-width solid $modal-header-border-color; @include clearfix; } // Close icon @@ -99,22 +99,8 @@ .modal-footer { padding: $modal-inner-padding; text-align: right; // right align buttons - border-top: 1px solid $modal-footer-border-color; + border-top: $modal-footer-border-width solid $modal-footer-border-color; @include clearfix(); // clear it in case folks use .pull-* classes on buttons - - // Properly space out buttons - .btn + .btn { - margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs - margin-left: 5px; - } - // but override that for button groups - .btn-group .btn + .btn { - margin-left: -1px; - } - // and override it for block buttons as well - .btn-block + .btn-block { - margin-left: 0; - } } // Measure scrollbar width for padding body during modal show/hide @@ -130,17 +116,17 @@ @include media-breakpoint-up(sm) { // Automatically set modal's width for larger viewports .modal-dialog { - width: $modal-md; - margin: 30px auto; + max-width: $modal-md; + margin: $modal-dialog-sm-up-margin-y auto; } + .modal-content { @include box-shadow($modal-content-sm-up-box-shadow); } - // Modal sizes - .modal-sm { width: $modal-sm; } + .modal-sm { max-width: $modal-sm; } } -@include media-breakpoint-up(md) { - .modal-lg { width: $modal-lg; } +@include media-breakpoint-up(lg) { + .modal-lg { max-width: $modal-lg; } } diff --git a/assets/stylesheets/bootstrap/_navbar.scss b/assets/stylesheets/bootstrap/_navbar.scss index 5d89436..85a3697 100644 --- a/assets/stylesheets/bootstrap/_navbar.scss +++ b/assets/stylesheets/bootstrap/_navbar.scss @@ -69,8 +69,8 @@ .navbar-brand { float: left; - padding-top: .25rem; - padding-bottom: .25rem; + padding-top: $navbar-brand-padding-y; + padding-bottom: $navbar-brand-padding-y; margin-right: 1rem; font-size: $font-size-lg; @@ -117,6 +117,7 @@ } } +// scss-lint:disable ImportantRule // Custom override for .navbar-toggleable { &-xs { @@ -135,6 +136,7 @@ } } } +// scss-lint:enable ImportantRule // Navigation diff --git a/assets/stylesheets/bootstrap/_normalize.scss b/assets/stylesheets/bootstrap/_normalize.scss index 2e62b53..93dd452 100644 --- a/assets/stylesheets/bootstrap/_normalize.scss +++ b/assets/stylesheets/bootstrap/_normalize.scss @@ -1,4 +1,4 @@ -/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +/*! normalize.css commit fe56763 | MIT License | github.com/necolas/normalize.css */ // // 1. Set default font family to sans-serif. @@ -37,7 +37,6 @@ figcaption, figure, footer, header, -hgroup, main, menu, nav, @@ -353,13 +352,11 @@ input[type="number"]::-webkit-outer-spin-button { } // -// 1. Address `appearance` set to `searchfield` in Safari and Chrome. -// 2. Address `box-sizing` set to `border-box` in Safari and Chrome. +// Address `appearance` set to `searchfield` in Safari and Chrome. // input[type="search"] { - -webkit-appearance: textfield; // 1 - box-sizing: content-box; //2 + -webkit-appearance: textfield; } // diff --git a/assets/stylesheets/bootstrap/_pagination.scss b/assets/stylesheets/bootstrap/_pagination.scss index c0b8239..5f40a7f 100644 --- a/assets/stylesheets/bootstrap/_pagination.scss +++ b/assets/stylesheets/bootstrap/_pagination.scss @@ -47,7 +47,6 @@ float: left; // Collapse white-space padding: $pagination-padding-y $pagination-padding-x; margin-left: -1px; - line-height: $line-height; color: $pagination-color; text-decoration: none; background-color: $pagination-bg; diff --git a/assets/stylesheets/bootstrap/_popover.scss b/assets/stylesheets/bootstrap/_popover.scss index 303850c..9ea8c14 100644 --- a/assets/stylesheets/bootstrap/_popover.scss +++ b/assets/stylesheets/bootstrap/_popover.scss @@ -10,6 +10,8 @@ // So reset our font and text properties to avoid inheriting weird values. @include reset-text(); font-size: $font-size-sm; + // Allow breaking very long words so they don't overflow the popover's bounds + word-wrap: break-word; background-color: $popover-bg; background-clip: padding-box; border: $popover-border-width solid $popover-border-color; diff --git a/assets/stylesheets/bootstrap/_print.scss b/assets/stylesheets/bootstrap/_print.scss index e2929bb..b2c9373 100644 --- a/assets/stylesheets/bootstrap/_print.scss +++ b/assets/stylesheets/bootstrap/_print.scss @@ -1,88 +1,116 @@ +// scss-lint:disable ImportantRule, QualifyingElement + // Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css // ========================================================================== // Print styles. -// Inlined to avoid the additional HTTP request: h5bp.com/r +// Inlined to avoid the additional HTTP request: +// http://www.phpied.com/delay-loading-your-print-css/ // ========================================================================== -@media print { - *, - *::before, - *::after { - text-shadow: none !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; + } - abbr[title]::after { - content: " (" attr(title) ")"; - } + // Bootstrap specific; comment the following selector out + //a[href]::after { + // content: " (" attr(href) ")"; + //} - pre, - blockquote { - border: $border-width solid #999; - page-break-inside: avoid; - } + abbr[title]::after { + content: " (" attr(title) ")"; + } - thead { - display: table-header-group; // h5bp.com/t - } + // Bootstrap specific; comment the following selector out + // + // Don't show links that are fragment identifiers, + // or use the `javascript:` pseudo protocol + // - tr, - img { - page-break-inside: avoid; - } + //a[href^="#"]::after, + //a[href^="javascript:"]::after { + // content: ""; + //} - img { - max-width: 100% !important; - } + pre, + blockquote { + border: $border-width solid #999; // Bootstrap custom code; using `$border-width` instead of 1px + page-break-inside: avoid; + } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } + // + // Printing Tables: + // http://css-discuss.incutio.com/wiki/Printing_Tables + // - h2, - h3 { - page-break-after: avoid; - } + thead { + display: table-header-group; + } - // Bootstrap specific changes start + tr, + img { + page-break-inside: avoid; + } - // Bootstrap components - .navbar { - display: none; - } - .btn, - .dropup > .btn { - > .caret { - border-top-color: #000 !important; + p, + h2, + h3 { + orphans: 3; + widows: 3; } - } - .label { - border: $border-width solid #000; - } - .table { - border-collapse: collapse !important; + h2, + h3 { + page-break-after: avoid; + } + + // Bootstrap specific changes start - td, - th { - background-color: #fff !important; + // Bootstrap components + .navbar { + display: none; } - } - .table-bordered { - th, - td { - border: 1px solid #ddd !important; + .btn, + .dropup > .btn { + > .caret { + border-top-color: #000 !important; + } + } + .tag { + border: $border-width solid #000; } - } - // Bootstrap specific changes end + .table { + border-collapse: collapse !important; + + td, + th { + background-color: #fff !important; + } + } + .table-bordered { + th, + td { + border: 1px solid #ddd !important; + } + } + + // Bootstrap specific changes end + } } diff --git a/assets/stylesheets/bootstrap/_progress.scss b/assets/stylesheets/bootstrap/_progress.scss index 8cac202..b2bcb30 100644 --- a/assets/stylesheets/bootstrap/_progress.scss +++ b/assets/stylesheets/bootstrap/_progress.scss @@ -3,8 +3,8 @@ // @keyframes progress-bar-stripes { - from { background-position: $spacer-y 0; } - to { background-position: 0 0; } + from { background-position: $spacer-y 0; } + to { background-position: 0 0; } } diff --git a/assets/stylesheets/bootstrap/_reboot.scss b/assets/stylesheets/bootstrap/_reboot.scss index 5b0f09b..0b29901 100644 --- a/assets/stylesheets/bootstrap/_reboot.scss +++ b/assets/stylesheets/bootstrap/_reboot.scss @@ -1,3 +1,5 @@ +// scss-lint:disable ImportantRule, QualifyingElement, DuplicateProperty + // Reboot // // Global resets to common HTML elements and more for easier usage by Bootstrap. @@ -32,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) @@ -44,14 +45,8 @@ html { // // Wrap `@viewport` with `@at-root` for when folks do a nested import (e.g., // `.class-name { @import "bootstrap"; }`). -// -// Includes future-proofed vendor prefixes as well. @at-root { - @-moz-viewport { width: device-width; } - @-ms-viewport { width: device-width; } - @-o-viewport { width: device-width; } - @-webkit-viewport { width: device-width; } - @viewport { width: device-width; } + @-ms-viewport { width: device-width; } } @@ -77,7 +72,7 @@ body { // Make the `body` use the `font-size-root` font-family: $font-family-base; font-size: $font-size-base; - line-height: $line-height; + line-height: $line-height-base; // Go easy on the eyes and use something other than `#000` for text color: $body-color; // By default, `<body>` has no `background-color` so we set one as a best practice. @@ -331,8 +326,6 @@ legend { } input[type="search"] { - // Undo Normalize's default here to match our global overrides. - box-sizing: inherit; // This overrides the extra rounded corners on search inputs in iOS so that our // `.form-control` class can properly style them. Note that this cannot simply // be added to `.form-control` as it's not specific enough. For details, see diff --git a/assets/stylesheets/bootstrap/_tables.scss b/assets/stylesheets/bootstrap/_tables.scss index 8ec35b9..c04e7c9 100644 --- a/assets/stylesheets/bootstrap/_tables.scss +++ b/assets/stylesheets/bootstrap/_tables.scss @@ -10,7 +10,6 @@ th, td { padding: $table-cell-padding; - line-height: $line-height; vertical-align: top; border-top: $table-border-width solid $table-border-color; } @@ -109,7 +108,7 @@ .table-responsive { display: block; width: 100%; - min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837) + min-height: .01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837) overflow-x: auto; // TODO: find out if we need this still. @@ -172,15 +171,14 @@ tbody, tfoot { &:last-child { - tr:last-child { - th, - td { - border-bottom: $table-border-width solid $table-border-color; - } + tr:last-child th, + tr:last-child td { + border-bottom: $table-border-width solid $table-border-color; } } } + // scss-lint:disable ImportantRule tr { float: left; @@ -190,4 +188,5 @@ border: $table-border-width solid $table-border-color; } } + // scss-lint:enable ImportantRule } diff --git a/assets/stylesheets/bootstrap/_tags.scss b/assets/stylesheets/bootstrap/_tags.scss new file mode 100644 index 0000000..dee9ed9 --- /dev/null +++ b/assets/stylesheets/bootstrap/_tags.scss @@ -0,0 +1,77 @@ +// Base class +// +// Requires one of the contextual, color modifier classes for `color` and +// `background-color`. + +.tag { + display: inline-block; + padding: $tag-padding-y $tag-padding-x; + font-size: $tag-font-size; + font-weight: $tag-font-weight; + line-height: 1; + color: $tag-color; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + @include border-radius(); + + // Empty tags collapse automatically + &:empty { + display: none; + } +} + +// Quick fix for tags in buttons +.btn .tag { + position: relative; + top: -1px; +} + +// scss-lint:disable QualifyingElement +// Add hover effects, but only for links +a.tag { + @include hover-focus { + color: $tag-link-hover-color; + text-decoration: none; + cursor: pointer; + } +} +// scss-lint:enable QualifyingElement + +// Pill tags +// +// Make them extra rounded with a modifier to replace v3's badges. + +.tag-pill { + padding-right: $tag-pill-padding-x; + padding-left: $tag-pill-padding-x; + @include border-radius($tag-pill-border-radius); +} + +// Colors +// +// Contextual variations (linked tags get darker on :hover). + +.tag-default { + @include tag-variant($tag-default-bg); +} + +.tag-primary { + @include tag-variant($tag-primary-bg); +} + +.tag-success { + @include tag-variant($tag-success-bg); +} + +.tag-info { + @include tag-variant($tag-info-bg); +} + +.tag-warning { + @include tag-variant($tag-warning-bg); +} + +.tag-danger { + @include tag-variant($tag-danger-bg); +} diff --git a/assets/stylesheets/bootstrap/_tooltip.scss b/assets/stylesheets/bootstrap/_tooltip.scss index a17aefc..e8151af 100644 --- a/assets/stylesheets/bootstrap/_tooltip.scss +++ b/assets/stylesheets/bootstrap/_tooltip.scss @@ -7,6 +7,8 @@ // So reset our font and text properties to avoid inheriting weird values. @include reset-text(); font-size: $font-size-sm; + // Allow breaking very long words so they don't overflow the tooltip's bounds + word-wrap: break-word; opacity: 0; &.in { opacity: $tooltip-opacity; } diff --git a/assets/stylesheets/bootstrap/_type.scss b/assets/stylesheets/bootstrap/_type.scss index 60f983a..ff71140 100644 --- a/assets/stylesheets/bootstrap/_type.scss +++ b/assets/stylesheets/bootstrap/_type.scss @@ -11,22 +11,12 @@ h1, h2, h3, h4, h5, h6, color: $headings-color; } -h1 { font-size: $font-size-h1; } -h2 { font-size: $font-size-h2; } -h3 { font-size: $font-size-h3; } -h4 { font-size: $font-size-h4; } -h5 { font-size: $font-size-h5; } -h6 { font-size: $font-size-h6; } - -// These declarations are kept separate from and placed after -// the previous tag-based declarations so that the classes beat the tags in -// the CSS cascade, and thus <h1 class="h2"> will be styled like an h2. -.h1 { font-size: $font-size-h1; } -.h2 { font-size: $font-size-h2; } -.h3 { font-size: $font-size-h3; } -.h4 { font-size: $font-size-h4; } -.h5 { font-size: $font-size-h5; } -.h6 { font-size: $font-size-h6; } +h1, .h1 { font-size: $font-size-h1; } +h2, .h2 { font-size: $font-size-h2; } +h3, .h3 { font-size: $font-size-h3; } +h4, .h4 { font-size: $font-size-h4; } +h5, .h5 { font-size: $font-size-h5; } +h6, .h6 { font-size: $font-size-h6; } .lead { font-size: $lead-font-size; @@ -70,14 +60,14 @@ hr { small, .small { - font-size: 80%; + font-size: $small-font-size; font-weight: normal; } mark, .mark { - padding: .2em; - background-color: $state-warning-bg; + padding: $mark-padding; + background-color: $mark-bg; } @@ -117,13 +107,12 @@ mark, padding: ($spacer / 2) $spacer; margin-bottom: $spacer; font-size: $blockquote-font-size; - border-left: .25rem solid $blockquote-border-color; + border-left: $blockquote-border-width solid $blockquote-border-color; } .blockquote-footer { display: block; font-size: 80%; // back to default font-size - line-height: $line-height; color: $blockquote-small-color; &::before { @@ -136,7 +125,7 @@ mark, padding-right: $spacer; padding-left: 0; text-align: right; - border-right: .25rem solid $blockquote-border-color; + border-right: $blockquote-border-width solid $blockquote-border-color; border-left: 0; } @@ -148,3 +137,14 @@ mark, content: "\00A0 \2014"; // nbsp, em dash } } + +@if not $enable-flex { + // Clean up some horizontal `<dl>`s built with grids + // scss-lint:disable QualifyingElement + dl.row { + > dd + dt { + clear: left; + } + } + // scss-lint:enable QualifyingElement +} diff --git a/assets/stylesheets/bootstrap/_utilities.scss b/assets/stylesheets/bootstrap/_utilities.scss index c0df122..3f9e81f 100644 --- a/assets/stylesheets/bootstrap/_utilities.scss +++ b/assets/stylesheets/bootstrap/_utilities.scss @@ -1,8 +1,8 @@ @import "utilities/background"; -@import "utilities/center-block"; @import "utilities/clearfix"; @import "utilities/pulls"; @import "utilities/screenreaders"; @import "utilities/spacing"; @import "utilities/text"; @import "utilities/visibility"; +@import "utilities/flex"; diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss index a3bba57..82ef6f9 100644 --- a/assets/stylesheets/bootstrap/_variables.scss +++ b/assets/stylesheets/bootstrap/_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,12 +62,14 @@ $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 // // Control the default styling of most Bootstrap elements by modifying these // variables. Mostly focused on spacing. +// You can add more entries to the $spacers map, should you need more variation. $spacer: 1rem !default; $spacer-x: $spacer !default; @@ -101,7 +115,7 @@ $link-hover-decoration: underline !default; // Grid breakpoints // -// Define the minimum and maximum dimensions at which your layout will change, +// Define the minimum dimensions at which your layout will change, // adapting to different screen sizes, for use in media queries. $grid-breakpoints: ( @@ -111,6 +125,7 @@ $grid-breakpoints: ( lg: 992px, xl: 1200px ) !default; +@include _assert-ascending($grid-breakpoints, "$grid-breakpoints"); // Grid containers @@ -123,6 +138,7 @@ $container-max-widths: ( lg: 940px, xl: 1140px ) !default; +@include _assert-ascending($container-max-widths, "$container-max-widths"); // Grid columns @@ -130,14 +146,14 @@ $container-max-widths: ( // Set the number of columns and specify the width of the gutters. $grid-columns: 12 !default; -$grid-gutter-width: 1.875rem !default; // 30px +$grid-gutter-width: 30px !default; // Typography // // Font, line-height, and color for body text, headings, and more. -$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default; +$font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif !default; $font-family-serif: Georgia, "Times New Roman", Times, serif !default; $font-family-monospace: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default; $font-family-base: $font-family-sans-serif !default; @@ -150,6 +166,8 @@ $font-size-lg: 1.25rem !default; $font-size-sm: .875rem !default; $font-size-xs: .75rem !default; +$line-height-base: 1.5 !default; + $font-size-h1: 2.5rem !default; $font-size-h2: 2rem !default; $font-size-h3: 1.75rem !default; @@ -167,8 +185,6 @@ $display2-weight: 300 !default; $display3-weight: 300 !default; $display4-weight: 300 !default; -$line-height: 1.5 !default; - $headings-margin-bottom: ($spacer / 2) !default; $headings-font-family: inherit !default; $headings-font-weight: 500 !default; @@ -178,6 +194,8 @@ $headings-color: inherit !default; $lead-font-size: 1.25rem !default; $lead-font-weight: 300 !default; +$small-font-size: 80% !default; + $text-muted: $gray-light !default; $abbr-border-color: $gray-light !default; @@ -185,10 +203,13 @@ $abbr-border-color: $gray-light !default; $blockquote-small-color: $gray-light !default; $blockquote-font-size: ($font-size-base * 1.25) !default; $blockquote-border-color: $gray-lighter !default; +$blockquote-border-width: .25rem !default; $hr-border-color: rgba(0,0,0,.1) !default; $hr-border-width: $border-width !default; +$mark-padding: .2em !default; + $dt-font-weight: bold !default; $kbd-box-shadow: inset 0 -.1rem 0 rgba(0,0,0,.25) !default; @@ -236,7 +257,8 @@ $table-border-color: $gray-lighter !default; // For each of Bootstrap's buttons, define text, background and border color. $btn-padding-x: 1rem !default; -$btn-padding-y: .375rem !default; +$btn-padding-y: .5rem !default; +$btn-line-height: 1.25 !default; $btn-font-weight: normal !default; $btn-box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075) !default; $btn-active-box-shadow: inset 0 3px 5px rgba(0,0,0,.125) !default; @@ -267,10 +289,10 @@ $btn-danger-border: $btn-danger-bg !default; $btn-link-disabled-color: $gray-light !default; -$btn-padding-x-sm: .75rem !default; +$btn-padding-x-sm: .5rem !default; $btn-padding-y-sm: .25rem !default; -$btn-padding-x-lg: 1.25rem !default; +$btn-padding-x-lg: 1.5rem !default; $btn-padding-y-lg: .75rem !default; $btn-block-spacing-y: 5px !default; @@ -288,13 +310,14 @@ $btn-border-radius-sm: $border-radius-sm !default; // Forms $input-padding-x: .75rem !default; -$input-padding-y: .375rem !default; +$input-padding-y: .5rem !default; +$input-line-height: 1.25 !default; $input-bg: #fff !default; $input-bg-disabled: $gray-lighter !default; $input-color: $gray !default; -$input-border-color: #ccc !default; +$input-border-color: rgba(0,0,0,.15) !default; $input-btn-border-width: $border-width !default; // For form controls and buttons $input-box-shadow: inset 0 1px 1px rgba(0,0,0,.075) !default; @@ -307,13 +330,13 @@ $input-box-shadow-focus: rgba(102,175,233,.6) !default; $input-color-placeholder: #999 !default; -$input-padding-x-sm: .75rem !default; -$input-padding-y-sm: .275rem !default; +$input-padding-x-sm: .5rem !default; +$input-padding-y-sm: .25rem !default; -$input-padding-x-lg: 1.25rem !default; +$input-padding-x-lg: 1.5rem !default; $input-padding-y-lg: .75rem !default; -$input-height: (($font-size-base * $line-height) + ($input-padding-y * 2)) !default; +$input-height: (($font-size-base * $line-height-base) + ($input-padding-y * 2)) !default; $input-height-lg: (($font-size-lg * $line-height-lg) + ($input-padding-y-lg * 2)) !default; $input-height-sm: (($font-size-sm * $line-height-sm) + ($input-padding-y-sm * 2)) !default; @@ -348,13 +371,13 @@ $custom-control-active-indicator-bg: #84c6ff !default; $custom-control-active-indicator-box-shadow: none !default; $custom-checkbox-radius: $border-radius !default; -$custom-checkbox-checked-icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTYuNCwxTDUuNywxLjdMMi45LDQuNUwyLjEsMy43TDEuNCwzTDAsNC40bDAuNywwLjdsMS41LDEuNWwwLjcsMC43bDAuNy0wLjdsMy41LTMuNWwwLjctMC43TDYuNCwxTDYuNCwxeiINCgkvPg0KPC9zdmc+DQo=" !default; +$custom-checkbox-checked-icon: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E") !default; $custom-checkbox-indeterminate-bg: #0074d9 !default; -$custom-checkbox-indeterminate-icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iOHB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDggOCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOCA4IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0wLDN2Mmg4VjNIMHoiLz4NCjwvc3ZnPg0K" !default; +$custom-checkbox-indeterminate-icon: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E") !default; $custom-checkbox-indeterminate-box-shadow: none !default; $custom-radio-radius: 50% !default; -$custom-radio-checked-icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTQsMUMyLjMsMSwxLDIuMywxLDRzMS4zLDMsMywzczMtMS4zLDMtM1M1LjcsMSw0LDF6Ii8+DQo8L3N2Zz4NCg==" !default; +$custom-radio-checked-icon: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E") !default; $custom-select-padding-x: .75rem !default; $custom-select-padding-y: .375rem !default; @@ -362,13 +385,13 @@ $custom-select-indicator-padding: 1rem !default; // Extra padding to account fo $custom-select-color: $input-color !default; $custom-select-bg: #fff !default; $custom-select-bg-size: 8px 10px !default; // In pixels because image dimensions -$custom-select-indicator: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAADFBMVEUzMzMzMzMzMzMzMzMKAG/3AAAAA3RSTlMAf4C/aSLHAAAAPElEQVR42q3NMQ4AIAgEQTn//2cLdRKppSGzBYwzVXvznNWs8C58CiussPJj8h6NwgorrKRdTvuV9v16Afn0AYFOB7aYAAAAAElFTkSuQmCC" !default; +$custom-select-indicator: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") !default; $custom-select-border-width: $input-btn-border-width !default; $custom-select-border-color: $input-border-color !default; $custom-select-border-radius: $border-radius !default; $custom-select-focus-border-color: #51a7e8 !default; -$custom-select-focus-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 5px rgba(81, 167, 232, 0.5) !default; +$custom-select-focus-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .075), 0 0 5px rgba(81, 167, 232, .5) !default; $custom-select-sm-padding-y: .2rem !default; $custom-select-sm-font-size: 75% !default; @@ -386,22 +409,31 @@ $custom-file-border-width: $border-width !default; $custom-file-border-color: #ddd !default; $custom-file-border-radius: $border-radius !default; $custom-file-box-shadow: inset 0 .2rem .4rem rgba(0,0,0,.05) !default; -$custom-file-placeholder: "Choose file..." !default; -$custom-file-button-label: "Browse" !default; $custom-file-button-color: $custom-file-color !default; $custom-file-button-bg: #eee !default; +$custom-file-text: ( + placeholder: ( + en: "Choose file..." + ), + button-label: ( + en: "Browse" + ) +) !default; // Form validation icons -$form-icon-success: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjNWNiODVjIiBkPSJNMjMzLjggNjEwYy0xMy4zIDAtMjYtNi0zNC0xNi44TDkwLjUgNDQ4LjhDNzYuMyA0MzAgODAgNDAzLjMgOTguOCAzODljMTguOC0xNC4yIDQ1LjUtMTAuNCA1OS44IDguNGw3MiA5NUw0NTEuMyAyNDJjMTIuNS0yMCAzOC44LTI2LjIgNTguOC0xMy43IDIwIDEyLjQgMjYgMzguNyAxMy43IDU4LjhMMjcwIDU5MGMtNy40IDEyLTIwLjIgMTkuNC0zNC4zIDIwaC0yeiIvPjwvc3ZnPg==" !default; -$form-icon-warning: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjZjBhZDRlIiBkPSJNNjAzIDY0MC4ybC0yNzguNS01MDljLTMuOC02LjYtMTAuOC0xMC42LTE4LjUtMTAuNnMtMTQuNyA0LTE4LjUgMTAuNkw5IDY0MC4yYy0zLjcgNi41LTMuNiAxNC40LjIgMjAuOCAzLjggNi41IDEwLjggMTAuNCAxOC4zIDEwLjRoNTU3YzcuNiAwIDE0LjYtNCAxOC40LTEwLjQgMy41LTYuNCAzLjYtMTQuNCAwLTIwLjh6bS0yNjYuNC0zMGgtNjEuMlY1NDloNjEuMnY2MS4yem0wLTEwN2gtNjEuMlYzMDRoNjEuMnYxOTl6Ii8+PC9zdmc+" !default; -$form-icon-danger: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjZDk1MzRmIiBkPSJNNDQ3IDU0NC40Yy0xNC40IDE0LjQtMzcuNiAxNC40LTUyIDBsLTg5LTkyLjctODkgOTIuN2MtMTQuNSAxNC40LTM3LjcgMTQuNC01MiAwLTE0LjQtMTQuNC0xNC40LTM3LjYgMC01Mmw5Mi40LTk2LjMtOTIuNC05Ni4zYy0xNC40LTE0LjQtMTQuNC0zNy42IDAtNTJzMzcuNi0xNC4zIDUyIDBsODkgOTIuOCA4OS4yLTkyLjdjMTQuNC0xNC40IDM3LjYtMTQuNCA1MiAwIDE0LjMgMTQuNCAxNC4zIDM3LjYgMCA1MkwzNTQuNiAzOTZsOTIuNCA5Ni40YzE0LjQgMTQuNCAxNC40IDM3LjYgMCA1MnoiLz48L3N2Zz4=" !default; +$form-icon-success: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%235cb85c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E") !default; +$form-icon-warning: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23f0ad4e' d='M4.4 5.324h-.8v-2.46h.8zm0 1.42h-.8V5.89h.8zM3.76.63L.04 7.075c-.115.2.016.425.26.426h7.397c.242 0 .372-.226.258-.426C6.726 4.924 5.47 2.79 4.253.63c-.113-.174-.39-.174-.494 0z'/%3E%3C/svg%3E") !default; +$form-icon-danger: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23d9534f' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E") !default; // Dropdowns // // Dropdown menu container and contents. +$dropdown-min-width: 160px !default; +$dropdown-padding-y: 5px !default; +$dropdown-margin-top: 2px !default; $dropdown-bg: #fff !default; $dropdown-border-color: rgba(0,0,0,.15) !default; $dropdown-border-width: $border-width !default; @@ -417,6 +449,8 @@ $dropdown-link-active-bg: $component-active-bg !default; $dropdown-link-disabled-color: $gray-light !default; +$dropdown-item-padding-x: 20px !default; + $dropdown-header-color: $gray-light !default; @@ -441,6 +475,7 @@ $zindex-modal: 1050 !default; $navbar-border-radius: $border-radius !default; $navbar-padding-x: $spacer !default; $navbar-padding-y: ($spacer / 2) !default; +$navbar-brand-padding-y: .25rem !default; $navbar-dark-color: rgba(255,255,255,.5) !default; $navbar-dark-hover-color: rgba(255,255,255,.75) !default; @@ -525,6 +560,7 @@ $state-info-border: darken($state-info-bg, 7%) !default; $state-warning-text: #8a6d3b !default; $state-warning-bg: #fcf8e3 !default; +$mark-bg: $state-warning-bg !default; $state-warning-border: darken($state-warning-bg, 5%) !default; $state-danger-text: #a94442 !default; @@ -537,7 +573,7 @@ $card-spacer-x: 1.25rem !default; $card-spacer-y: .75rem !default; $card-border-width: 1px !default; $card-border-radius: $border-radius !default; -$card-border-color: #e5e5e5 !default; +$card-border-color: rgba(0,0,0,.125) !default; $card-border-radius-inner: $card-border-radius !default; $card-cap-bg: #f5f5f5 !default; $card-bg: #fff !default; @@ -546,6 +582,8 @@ $card-link-hover-color: #fff !default; $card-deck-margin: .625rem !default; +$card-columns-sm-up-column-gap: 1.25rem !default; + // Tooltips @@ -580,33 +618,44 @@ $popover-arrow-width: 10px !default; $popover-arrow-color: $popover-bg !default; $popover-arrow-outer-width: ($popover-arrow-width + 1px) !default; -$popover-arrow-outer-color: fade-in($popover-border-color, 0.05) !default; +$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default; -// Labels +// Tags -$label-default-bg: $gray-light !default; -$label-primary-bg: $brand-primary !default; -$label-success-bg: $brand-success !default; -$label-info-bg: $brand-info !default; -$label-warning-bg: $brand-warning !default; -$label-danger-bg: $brand-danger !default; +$tag-default-bg: $gray-light !default; +$tag-primary-bg: $brand-primary !default; +$tag-success-bg: $brand-success !default; +$tag-info-bg: $brand-info !default; +$tag-warning-bg: $brand-warning !default; +$tag-danger-bg: $brand-danger !default; -$label-color: #fff !default; -$label-link-hover-color: #fff !default; -$label-font-weight: bold !default; +$tag-color: #fff !default; +$tag-link-hover-color: #fff !default; +$tag-font-size: 75% !default; +$tag-font-weight: bold !default; +$tag-padding-x: .4em !default; +$tag-padding-y: .25em !default; +$tag-pill-padding-x: .6em !default; +// Use a higher than normal value to ensure completely rounded edges when +// customizing padding or font-size on labels. +$tag-pill-border-radius: 10rem !default; // Modals // Padding applied to the modal body $modal-inner-padding: 15px !default; +$modal-dialog-margin: 10px !default; +$modal-dialog-sm-up-margin-y: 30px !default; + $modal-title-padding: 15px !default; -$modal-title-line-height: $line-height !default; +$modal-title-line-height: $line-height-base !default; $modal-content-bg: #fff !default; $modal-content-border-color: rgba(0,0,0,.2) !default; +$modal-content-border-width: $border-width !default; $modal-content-xs-box-shadow: 0 3px 9px rgba(0,0,0,.5) !default; $modal-content-sm-up-box-shadow: 0 5px 15px rgba(0,0,0,.5) !default; @@ -614,6 +663,8 @@ $modal-backdrop-bg: #000 !default; $modal-backdrop-opacity: .5 !default; $modal-header-border-color: #e5e5e5 !default; $modal-footer-border-color: $modal-header-border-color !default; +$modal-header-border-width: $modal-content-border-width !default; +$modal-footer-border-width: $modal-header-border-width !default; $modal-lg: 900px !default; $modal-md: 600px !default; @@ -681,6 +732,10 @@ $list-group-link-color: #555 !default; $list-group-link-hover-color: $list-group-link-color !default; $list-group-link-heading-color: #333 !default; +$list-group-item-padding-x: 1.25rem !default; +$list-group-item-padding-y: .75rem !default; +$list-group-item-heading-margin-bottom: 5px !default; + // Image thumbnails @@ -692,6 +747,11 @@ $thumbnail-border-radius: $border-radius !default; $thumbnail-box-shadow: 0 1px 2px rgba(0,0,0,.075) !default; +// Figures + +$figure-caption-font-size: 90% !default; + + // Breadcrumbs $breadcrumb-padding-y: .75rem !default; @@ -717,12 +777,19 @@ $carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6) !default; $carousel-control-color: #fff !default; $carousel-control-width: 15% !default; +$carousel-control-sm-up-size: 30px !default; $carousel-control-opacity: .5 !default; $carousel-control-font-size: 20px !default; +$carousel-indicators-width: 60% !default; + +$carousel-indicator-size: 10px !default; +$carousel-indicator-active-size: 12px !default; $carousel-indicator-active-bg: #fff !default; $carousel-indicator-border-color: #fff !default; +$carousel-caption-width: 70% !default; +$carousel-caption-sm-up-width: 60% !default; $carousel-caption-color: #fff !default; @@ -735,6 +802,9 @@ $close-text-shadow: 0 1px 0 #fff !default; // Code +$code-font-size: 90% !default; +$code-padding-x: .4rem !default; +$code-padding-y: .2rem !default; $code-color: #bd4147 !default; $code-bg: #f7f7f9 !default; diff --git a/assets/stylesheets/bootstrap/mixins/_buttons.scss b/assets/stylesheets/bootstrap/mixins/_buttons.scss index 21240dd..5196ab6 100644 --- a/assets/stylesheets/bootstrap/mixins/_buttons.scss +++ b/assets/stylesheets/bootstrap/mixins/_buttons.scss @@ -64,19 +64,33 @@ background-color: transparent; border-color: $color; + @include hover { + color: #fff; + background-color: $color; + border-color: $color; + } + &:focus, - &.focus, - &:active, - &.active, - .open > &.dropdown-toggle { + &.focus { color: #fff; background-color: $color; border-color: $color; } - @include hover { + + &:active, + &.active, + .open > &.dropdown-toggle { color: #fff; background-color: $color; border-color: $color; + + &:hover, + &:focus, + &.focus { + color: #fff; + background-color: darken($color, 17%); + border-color: darken($color, 25%); + } } &.disabled, @@ -92,9 +106,8 @@ } // Button sizes -@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { +@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) { padding: $padding-y $padding-x; font-size: $font-size; - line-height: $line-height; @include border-radius($border-radius); } diff --git a/assets/stylesheets/bootstrap/mixins/_center-block.scss b/assets/stylesheets/bootstrap/mixins/_center-block.scss deleted file mode 100644 index e06fb5e..0000000 --- a/assets/stylesheets/bootstrap/mixins/_center-block.scss +++ /dev/null @@ -1,7 +0,0 @@ -// Center-align a block level element - -@mixin center-block() { - display: block; - margin-left: auto; - margin-right: auto; -} diff --git a/assets/stylesheets/bootstrap/mixins/_forms.scss b/assets/stylesheets/bootstrap/mixins/_forms.scss index b87429c..fde8295 100644 --- a/assets/stylesheets/bootstrap/mixins/_forms.scss +++ b/assets/stylesheets/bootstrap/mixins/_forms.scss @@ -14,7 +14,8 @@ &.radio label, &.checkbox label, &.radio-inline label, - &.checkbox-inline label { + &.checkbox-inline label, + .custom-control { color: $color; } // Set the border and box shadow on specific inputs to match diff --git a/assets/stylesheets/bootstrap/mixins/_grid-framework.scss b/assets/stylesheets/bootstrap/mixins/_grid-framework.scss index 16c970a..dcdec80 100644 --- a/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +++ b/assets/stylesheets/bootstrap/mixins/_grid-framework.scss @@ -4,47 +4,40 @@ // any value of `$grid-columns`. @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) { - // Common properties for all breakpoints - %grid-column { - position: relative; - // Prevent columns from collapsing when empty - min-height: 1px; - // Inner gutter via padding - padding-left: ($gutter / 2); - padding-right: ($gutter / 2); - } $breakpoint-counter: 0; @each $breakpoint in map-keys($breakpoints) { $breakpoint-counter: ($breakpoint-counter + 1); - @for $i from 1 through $columns { - .col-#{$breakpoint}-#{$i} { - @extend %grid-column; - } - } @include media-breakpoint-up($breakpoint, $breakpoints) { - // Work around cross-media @extend (https://github.com/sass/sass/issues/1050) - %grid-column-float-#{$breakpoint} { - float: left; + @if $enable-flex { + .col-#{$breakpoint} { + position: relative; + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + min-height: 1px; + padding-right: ($gutter / 2); + padding-left: ($gutter / 2); + } } + @for $i from 1 through $columns { .col-#{$breakpoint}-#{$i} { - @if not $enable-flex { - @extend %grid-column-float-#{$breakpoint}; - } - @include make-col-span($i, $columns); + @include make-col($i, $columns, $gutter); } } + @each $modifier in (pull, push) { @for $i from 0 through $columns { - .col-#{$breakpoint}-#{$modifier}-#{$i} { + .#{$modifier}-#{$breakpoint}-#{$i} { @include make-col-modifier($modifier, $i, $columns) } } } + // `$columns - 1` because offsetting by the width of an entire row isn't possible @for $i from 0 through ($columns - 1) { @if $breakpoint-counter != 1 or $i != 0 { // Avoid emitting useless .col-xs-offset-0 - .col-#{$breakpoint}-offset-#{$i} { + .offset-#{$breakpoint}-#{$i} { @include make-col-modifier(offset, $i, $columns) } } diff --git a/assets/stylesheets/bootstrap/mixins/_grid.scss b/assets/stylesheets/bootstrap/mixins/_grid.scss index 230dacc..3ba4f43 100644 --- a/assets/stylesheets/bootstrap/mixins/_grid.scss +++ b/assets/stylesheets/bootstrap/mixins/_grid.scss @@ -33,17 +33,12 @@ margin-right: ($gutter / -2); } -@mixin make-col($gutter: $grid-gutter-width) { +@mixin make-col($size, $columns: $grid-columns, $gutter: $grid-gutter-width) { position: relative; - @if not $enable-flex { - float: left; - } min-height: 1px; - padding-left: ($gutter / 2); padding-right: ($gutter / 2); -} + padding-left: ($gutter / 2); -@mixin make-col-span($size, $columns: $grid-columns) { @if $enable-flex { flex: 0 0 percentage($size / $columns); // Add a `max-width` to ensure content within each column does not blow out @@ -51,6 +46,7 @@ // do not appear to require this. max-width: percentage($size / $columns); } @else { + float: left; width: percentage($size / $columns); } } diff --git a/assets/stylesheets/bootstrap/mixins/_pagination.scss b/assets/stylesheets/bootstrap/mixins/_pagination.scss index ff36eb6..8cd9317 100644 --- a/assets/stylesheets/bootstrap/mixins/_pagination.scss +++ b/assets/stylesheets/bootstrap/mixins/_pagination.scss @@ -4,7 +4,6 @@ .page-link { padding: $padding-y $padding-x; font-size: $font-size; - line-height: $line-height; } .page-item { diff --git a/assets/stylesheets/bootstrap/mixins/_reset-text.scss b/assets/stylesheets/bootstrap/mixins/_reset-text.scss index 014dff5..bb882f2 100644 --- a/assets/stylesheets/bootstrap/mixins/_reset-text.scss +++ b/assets/stylesheets/bootstrap/mixins/_reset-text.scss @@ -1,11 +1,11 @@ @mixin reset-text { font-family: $font-family-base; - // We deliberately do NOT reset font-size. + // We deliberately do NOT reset font-size or word-wrap. font-style: normal; font-weight: normal; letter-spacing: normal; line-break: auto; - line-height: $line-height; + line-height: $line-height-base; text-align: left; // Fallback for where `start` is not supported text-align: start; text-decoration: none; @@ -14,5 +14,4 @@ white-space: normal; word-break: normal; word-spacing: normal; - word-wrap: normal; } diff --git a/assets/stylesheets/bootstrap/mixins/_label.scss b/assets/stylesheets/bootstrap/mixins/_tag.scss index 4bc48c6..900c54e 100644 --- a/assets/stylesheets/bootstrap/mixins/_label.scss +++ b/assets/stylesheets/bootstrap/mixins/_tag.scss @@ -1,6 +1,6 @@ -// Labels +// Tags -@mixin label-variant($color) { +@mixin tag-variant($color) { background-color: $color; &[href] { diff --git a/assets/stylesheets/bootstrap/utilities/_center-block.scss b/assets/stylesheets/bootstrap/utilities/_center-block.scss deleted file mode 100644 index 0c98666..0000000 --- a/assets/stylesheets/bootstrap/utilities/_center-block.scss +++ /dev/null @@ -1,3 +0,0 @@ -.center-block { - @include center-block(); -} diff --git a/assets/stylesheets/bootstrap/utilities/_flex.scss b/assets/stylesheets/bootstrap/utilities/_flex.scss new file mode 100644 index 0000000..a61135c --- /dev/null +++ b/assets/stylesheets/bootstrap/utilities/_flex.scss @@ -0,0 +1,36 @@ +// Flex variation +// +// Custom styles for additional flex alignment options. + +@if $enable-flex { + @each $breakpoint in map-keys($grid-breakpoints) { + // Flex column reordering + @include media-breakpoint-up($breakpoint) { + .flex-#{$breakpoint}-first { order: -1; } + .flex-#{$breakpoint}-last { order: 1; } + } + + // Alignment for every item + @include media-breakpoint-up($breakpoint) { + .flex-items-#{$breakpoint}-top { align-items: flex-start; } + .flex-items-#{$breakpoint}-middle { align-items: center; } + .flex-items-#{$breakpoint}-bottom { align-items: flex-end; } + } + + // Alignment per item + @include media-breakpoint-up($breakpoint) { + .flex-#{$breakpoint}-top { align-self: flex-start; } + .flex-#{$breakpoint}-middle { align-self: center; } + .flex-#{$breakpoint}-bottom { align-self: flex-end; } + } + + // Horizontal alignment of item + @include media-breakpoint-up($breakpoint) { + .flex-items-#{$breakpoint}-left { justify-content: flex-start; } + .flex-items-#{$breakpoint}-center { justify-content: center; } + .flex-items-#{$breakpoint}-right { justify-content: flex-end; } + .flex-items-#{$breakpoint}-around { justify-content: space-around; } + .flex-items-#{$breakpoint}-between { justify-content: space-between; } + } + } +} diff --git a/assets/stylesheets/bootstrap/utilities/_text.scss b/assets/stylesheets/bootstrap/utilities/_text.scss index f3a0c98..901f771 100644 --- a/assets/stylesheets/bootstrap/utilities/_text.scss +++ b/assets/stylesheets/bootstrap/utilities/_text.scss @@ -32,9 +32,7 @@ // Contextual colors -.text-muted { - color: $text-muted; -} +@include text-emphasis-variant('.text-muted', $text-muted); @include text-emphasis-variant('.text-primary', $brand-primary); diff --git a/assets/stylesheets/bootstrap/utilities/_visibility.scss b/assets/stylesheets/bootstrap/utilities/_visibility.scss index cdb1428..6389167 100644 --- a/assets/stylesheets/bootstrap/utilities/_visibility.scss +++ b/assets/stylesheets/bootstrap/utilities/_visibility.scss @@ -1,3 +1,5 @@ +// scss-lint:disable ImportantRule + // // Visibility utilities // |