diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2018-01-19 02:02:42 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2018-01-19 02:02:42 +0300 |
commit | bbb8b796ca6225ce90e53665edb4f370535c45a8 (patch) | |
tree | c72b65dc83c43851ea10e158dde77e289d33f73e /assets/stylesheets | |
parent | 176cbf4fbf07e29783b0726f8426da0a7ebe5ead (diff) |
rake update[v4.0.0]
Diffstat (limited to 'assets/stylesheets')
23 files changed, 207 insertions, 204 deletions
diff --git a/assets/stylesheets/_bootstrap-grid.scss b/assets/stylesheets/_bootstrap-grid.scss index 94d40a4..68e0000 100644 --- a/assets/stylesheets/_bootstrap-grid.scss +++ b/assets/stylesheets/_bootstrap-grid.scss @@ -1,7 +1,7 @@ /*! - * Bootstrap Grid v4.0.0-beta.3 (https://getbootstrap.com) - * Copyright 2011-2017 The Bootstrap Authors - * Copyright 2011-2017 Twitter, Inc. + * Bootstrap Grid v4.0.0 (https://getbootstrap.com) + * Copyright 2011-2018 The Bootstrap Authors + * Copyright 2011-2018 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ @@ -23,13 +23,10 @@ html { @import "bootstrap/functions"; @import "bootstrap/variables"; -// -// Grid mixins -// - @import "bootstrap/mixins/breakpoints"; @import "bootstrap/mixins/grid-framework"; @import "bootstrap/mixins/grid"; @import "bootstrap/grid"; +@import "bootstrap/utilities/display"; @import "bootstrap/utilities/flex"; diff --git a/assets/stylesheets/_bootstrap-reboot.scss b/assets/stylesheets/_bootstrap-reboot.scss index b285bc7..4c36143 100644 --- a/assets/stylesheets/_bootstrap-reboot.scss +++ b/assets/stylesheets/_bootstrap-reboot.scss @@ -1,7 +1,7 @@ /*! - * Bootstrap Reboot v4.0.0-beta.3 (https://getbootstrap.com) - * Copyright 2011-2017 The Bootstrap Authors - * Copyright 2011-2017 Twitter, Inc. + * Bootstrap Reboot v4.0.0 (https://getbootstrap.com) + * Copyright 2011-2018 The Bootstrap Authors + * Copyright 2011-2018 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) */ diff --git a/assets/stylesheets/_bootstrap.scss b/assets/stylesheets/_bootstrap.scss index 966cb67..082e67b 100644 --- a/assets/stylesheets/_bootstrap.scss +++ b/assets/stylesheets/_bootstrap.scss @@ -1,7 +1,7 @@ /*! - * Bootstrap v4.0.0-beta.3 (https://getbootstrap.com) - * Copyright 2011-2017 The Bootstrap Authors - * Copyright 2011-2017 Twitter, Inc. + * Bootstrap v4.0.0 (https://getbootstrap.com) + * Copyright 2011-2018 The Bootstrap Authors + * Copyright 2011-2018 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ diff --git a/assets/stylesheets/bootstrap/_alert.scss b/assets/stylesheets/bootstrap/_alert.scss index c2d5c81..dd43e23 100644 --- a/assets/stylesheets/bootstrap/_alert.scss +++ b/assets/stylesheets/bootstrap/_alert.scss @@ -46,6 +46,6 @@ @each $color, $value in $theme-colors { .alert-#{$color} { - @include alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6)); + @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level)); } } diff --git a/assets/stylesheets/bootstrap/_buttons.scss b/assets/stylesheets/bootstrap/_buttons.scss index 3a5f5ee..da6d879 100644 --- a/assets/stylesheets/bootstrap/_buttons.scss +++ b/assets/stylesheets/bootstrap/_buttons.scss @@ -34,12 +34,12 @@ } // Opinionated: add "hand" cursor to non-disabled .btn elements - &:not([disabled]):not(.disabled) { + &:not(:disabled):not(.disabled) { cursor: pointer; } - &:not([disabled]):not(.disabled):active, - &:not([disabled]):not(.disabled).active { + &:not(:disabled):not(.disabled):active, + &:not(:disabled):not(.disabled).active { background-image: none; @include box-shadow($btn-active-box-shadow); @@ -51,7 +51,7 @@ // Future-proof disabling of clicks on `<a>` elements a.btn.disabled, -fieldset[disabled] a.btn { +fieldset:disabled a.btn { pointer-events: none; } @@ -68,11 +68,7 @@ fieldset[disabled] a.btn { @each $color, $value in $theme-colors { .btn-outline-#{$color} { - @if $color == "light" { - @include button-outline-variant($value, $gray-900); - } @else { - @include button-outline-variant($value, $white); - } + @include button-outline-variant($value); } } diff --git a/assets/stylesheets/bootstrap/_close.scss b/assets/stylesheets/bootstrap/_close.scss index f1763cc..871cb08 100644 --- a/assets/stylesheets/bootstrap/_close.scss +++ b/assets/stylesheets/bootstrap/_close.scss @@ -14,7 +14,7 @@ } // Opinionated: add "hand" cursor to non-disabled .close elements - &:not([disabled]):not(.disabled) { + &:not(:disabled):not(.disabled) { cursor: pointer; } } diff --git a/assets/stylesheets/bootstrap/_custom-forms.scss b/assets/stylesheets/bootstrap/_custom-forms.scss index d99a86d..2d83f7e 100644 --- a/assets/stylesheets/bootstrap/_custom-forms.scss +++ b/assets/stylesheets/bootstrap/_custom-forms.scss @@ -117,6 +117,15 @@ background-image: $custom-checkbox-indicator-icon-indeterminate; } } + + .custom-control-input:disabled { + &:checked ~ .custom-control-label::before { + background-color: $custom-control-indicator-checked-disabled-bg; + } + &:indeterminate ~ .custom-control-label::before { + background-color: $custom-control-indicator-checked-disabled-bg; + } + } } // Radios @@ -136,6 +145,12 @@ background-image: $custom-radio-indicator-icon-checked; } } + + .custom-control-input:disabled { + &:checked ~ .custom-control-label::before { + background-color: $custom-control-indicator-checked-disabled-bg; + } + } } @@ -148,7 +163,7 @@ .custom-select { display: inline-block; width: 100%; - height: $input-height; + height: $custom-select-height; padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x; line-height: $custom-select-line-height; color: $custom-select-color; diff --git a/assets/stylesheets/bootstrap/_input-group.scss b/assets/stylesheets/bootstrap/_input-group.scss index 7ef0267..2f7b05d 100644 --- a/assets/stylesheets/bootstrap/_input-group.scss +++ b/assets/stylesheets/bootstrap/_input-group.scss @@ -11,9 +11,9 @@ align-items: stretch; width: 100%; - .form-control, - .custom-select, - .custom-file { + > .form-control, + > .custom-select, + > .custom-file { position: relative; // For focus state's z-index flex: 1 1 auto; // Add width 1% and flex-basis auto to ensure that button will not wrap out @@ -26,27 +26,29 @@ z-index: 3; } - + .form-control { + + .form-control, + + .custom-select, + + .custom-file { margin-left: -$input-border-width; } } - .form-control, - .custom-select { + > .form-control, + > .custom-select { &:not(:last-child) { @include border-right-radius(0); } &:not(:first-child) { @include border-left-radius(0); } } // Custom file inputs have more complex markup, thus requiring different // border-radius overrides. - .custom-file { + > .custom-file { display: flex; align-items: center; - &:not(:last-child) .custom-file-control, - &:not(:last-child) .custom-file-control::before { @include border-right-radius(0); } - &:not(:first-child) .custom-file-control, - &:not(:first-child) .custom-file-control::before { @include border-left-radius(0); } + &:not(:last-child) .custom-file-label, + &:not(:last-child) .custom-file-label::before { @include border-right-radius(0); } + &:not(:first-child) .custom-file-label, + &:not(:first-child) .custom-file-label::before { @include border-left-radius(0); } } } @@ -60,7 +62,6 @@ .input-group-prepend, .input-group-append { display: flex; - align-items: center; // Ensure buttons are always above inputs for more visually pleasing borders. // This isn't needed for `.input-group-text` since it shares the same border-color @@ -88,6 +89,8 @@ // to prepend or append to an input. .input-group-text { + display: flex; + align-items: center; 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; // Match inputs diff --git a/assets/stylesheets/bootstrap/_navbar.scss b/assets/stylesheets/bootstrap/_navbar.scss index 6b76649..8d68c6c 100644 --- a/assets/stylesheets/bootstrap/_navbar.scss +++ b/assets/stylesheets/bootstrap/_navbar.scss @@ -118,7 +118,7 @@ } // Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements - &:not([disabled]):not(.disabled) { + &:not(:disabled):not(.disabled) { cursor: pointer; } } @@ -168,8 +168,8 @@ } .nav-link { - padding-right: .5rem; - padding-left: .5rem; + padding-right: $navbar-nav-link-padding-x; + padding-left: $navbar-nav-link-padding-x; } } diff --git a/assets/stylesheets/bootstrap/_pagination.scss b/assets/stylesheets/bootstrap/_pagination.scss index 286febc..959b2eb 100644 --- a/assets/stylesheets/bootstrap/_pagination.scss +++ b/assets/stylesheets/bootstrap/_pagination.scss @@ -14,16 +14,21 @@ background-color: $pagination-bg; border: $pagination-border-width solid $pagination-border-color; - @include hover-focus { + &:hover { color: $pagination-hover-color; text-decoration: none; background-color: $pagination-hover-bg; border-color: $pagination-hover-border-color; } + &:focus { + z-index: 2; + outline: 0; + box-shadow: $pagination-focus-box-shadow; + } // Opinionated: add "hand" cursor to non-disabled .page-link elements - &:not([disabled]):not(.disabled) { + &:not(:disabled):not(.disabled) { cursor: pointer; } } diff --git a/assets/stylesheets/bootstrap/_popover.scss b/assets/stylesheets/bootstrap/_popover.scss index 3e41643..3ef5f62 100644 --- a/assets/stylesheets/bootstrap/_popover.scss +++ b/assets/stylesheets/bootstrap/_popover.scss @@ -8,13 +8,13 @@ // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element. // So reset our font and text properties to avoid inheriting weird values. @include reset-text(); - font-size: $font-size-sm; + font-size: $popover-font-size; // 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; - @include border-radius($border-radius-lg); + @include border-radius($popover-border-radius); @include box-shadow($popover-box-shadow); .arrow { diff --git a/assets/stylesheets/bootstrap/_print.scss b/assets/stylesheets/bootstrap/_print.scss index 6505d3e..5e2ce3a 100644 --- a/assets/stylesheets/bootstrap/_print.scss +++ b/assets/stylesheets/bootstrap/_print.scss @@ -20,9 +20,10 @@ box-shadow: none !important; } - a, - a:visited { - text-decoration: underline; + a { + &:not(.btn) { + text-decoration: underline; + } } // Bootstrap specific; comment the following selector out @@ -82,6 +83,19 @@ // Bootstrap specific changes start + // Specify a size and min-width to make printing closer across browsers. + // We don't set margin here because it breaks `size` in Chrome. We also + // don't use `!important` on `size` as it breaks in Chrome. + @page { + size: $print-page-size; + } + body { + min-width: $print-body-min-width !important; + } + .container { + min-width: $print-body-min-width !important; + } + // Bootstrap components .navbar { display: none; diff --git a/assets/stylesheets/bootstrap/_reboot.scss b/assets/stylesheets/bootstrap/_reboot.scss index 5393413..c79fa47 100644 --- a/assets/stylesheets/bootstrap/_reboot.scss +++ b/assets/stylesheets/bootstrap/_reboot.scss @@ -279,29 +279,6 @@ svg:not(:root) { } -// Avoid 300ms click delay on touch devices that support the `touch-action` CSS property. -// -// In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11 -// DON'T remove the click delay when `<meta name="viewport" content="width=device-width">` is present. -// However, they DO support removing the click delay via `touch-action: manipulation`. -// See: -// * https://getbootstrap.com/docs/4.0/content/reboot/#click-delay-optimization-for-touch -// * https://caniuse.com/#feat=css-touch-action -// * https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay - -a, -area, -button, -[role="button"], -input:not([type="range"]), -label, -select, -summary, -textarea { - touch-action: manipulation; -} - - // // Tables // diff --git a/assets/stylesheets/bootstrap/_tooltip.scss b/assets/stylesheets/bootstrap/_tooltip.scss index a03de57..1286ebf 100644 --- a/assets/stylesheets/bootstrap/_tooltip.scss +++ b/assets/stylesheets/bootstrap/_tooltip.scss @@ -7,7 +7,7 @@ // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element. // So reset our font and text properties to avoid inheriting weird values. @include reset-text(); - font-size: $font-size-sm; + font-size: $tooltip-font-size; // Allow breaking very long words so they don't overflow the tooltip's bounds word-wrap: break-word; opacity: 0; @@ -111,5 +111,5 @@ color: $tooltip-color; text-align: center; background-color: $tooltip-bg; - @include border-radius($border-radius); + @include border-radius($tooltip-border-radius); } diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss index 1c6ca3a..be580de 100644 --- a/assets/stylesheets/bootstrap/_variables.scss +++ b/assets/stylesheets/bootstrap/_variables.scss @@ -15,7 +15,7 @@ $gray-200: #e9ecef !default; $gray-300: #dee2e6 !default; $gray-400: #ced4da !default; $gray-500: #adb5bd !default; -$gray-600: #868e96 !default; +$gray-600: #6c757d !default; $gray-700: #495057 !default; $gray-800: #343a40 !default; $gray-900: #212529 !default; @@ -103,7 +103,7 @@ $enable-rounded: true !default; $enable-shadows: false !default; $enable-gradients: false !default; $enable-transitions: true !default; -$enable-hover-media-query: false !default; +$enable-hover-media-query: false !default; // Deprecated, no longer affects any compiled CSS $enable-grid-classes: true !default; $enable-print-styles: true !default; @@ -114,23 +114,27 @@ $enable-print-styles: true !default; // variables. Mostly focused on spacing. // You can add more entries to the $spacers map, should you need more variation. +// stylelint-disable $spacer: 1rem !default; -$spacers: ( +$spacers: () !default; +$spacers: map-merge(( 0: 0, 1: ($spacer * .25), 2: ($spacer * .5), 3: $spacer, 4: ($spacer * 1.5), 5: ($spacer * 3) -) !default; +), $spacers); // This variable affects the `.h-*` and `.w-*` classes. -$sizes: ( +$sizes: () !default; +$sizes: map-merge(( 25: 25%, 50: 50%, 75: 75%, 100: 100% -) !default; +), $sizes); +// stylelint-enable // Body // @@ -201,7 +205,7 @@ $line-height-lg: 1.5 !default; $line-height-sm: 1.5 !default; $border-width: 1px !default; -$border-color: $gray-200 !default; +$border-color: $gray-300 !default; $border-radius: .25rem !default; $border-radius-lg: .3rem !default; @@ -323,7 +327,7 @@ $input-btn-padding-x: .75rem !default; $input-btn-line-height: $line-height-base !default; $input-btn-focus-width: .2rem !default; -$input-btn-focus-color: rgba(theme-color("primary"), .25) !default; +$input-btn-focus-color: rgba($component-active-bg, .25) !default; $input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color !default; $input-btn-padding-y-sm: .25rem !default; @@ -401,14 +405,14 @@ $input-border-radius-lg: $border-radius-lg !default; $input-border-radius-sm: $border-radius-sm !default; $input-focus-bg: $input-bg !default; -$input-focus-border-color: lighten(theme-color("primary"), 25%) !default; +$input-focus-border-color: lighten($component-active-bg, 25%) !default; $input-focus-color: $input-color !default; $input-focus-width: $input-btn-focus-width !default; $input-focus-box-shadow: $input-btn-focus-box-shadow !default; $input-placeholder-color: $gray-600 !default; -$input-height-border: $input-btn-border-width * 2 !default; +$input-height-border: $input-border-width * 2 !default; $input-height-inner: ($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2) !default; $input-height: calc(#{$input-height-inner} + #{$input-height-border}) !default; @@ -447,20 +451,21 @@ $custom-control-indicator-box-shadow: inset 0 .25rem .25rem rgba($black, .1) ! $custom-control-indicator-disabled-bg: $gray-200 !default; $custom-control-label-disabled-color: $gray-600 !default; -$custom-control-indicator-checked-color: $white !default; -$custom-control-indicator-checked-bg: theme-color("primary") !default; +$custom-control-indicator-checked-color: $component-active-color !default; +$custom-control-indicator-checked-bg: $component-active-bg !default; +$custom-control-indicator-checked-disabled-bg: rgba(theme-color("primary"), .5) !default; $custom-control-indicator-checked-box-shadow: none !default; $custom-control-indicator-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default; -$custom-control-indicator-active-color: $white !default; -$custom-control-indicator-active-bg: lighten(theme-color("primary"), 35%) !default; +$custom-control-indicator-active-color: $component-active-color !default; +$custom-control-indicator-active-bg: lighten($component-active-bg, 35%) !default; $custom-control-indicator-active-box-shadow: none !default; $custom-checkbox-indicator-border-radius: $border-radius !default; $custom-checkbox-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-indicator-checked-color}' 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"), "#", "%23") !default; -$custom-checkbox-indicator-indeterminate-bg: theme-color("primary") !default; +$custom-checkbox-indicator-indeterminate-bg: $component-active-bg !default; $custom-checkbox-indicator-indeterminate-color: $custom-control-indicator-checked-color !default; $custom-checkbox-indicator-icon-indeterminate: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='#{$custom-checkbox-indicator-indeterminate-color}' d='M0 2h4'/%3E%3C/svg%3E"), "#", "%23") !default; $custom-checkbox-indicator-indeterminate-box-shadow: none !default; @@ -485,7 +490,7 @@ $custom-select-border-color: $input-border-color !default; $custom-select-border-radius: $border-radius !default; $custom-select-focus-border-color: $input-focus-border-color !default; -$custom-select-focus-box-shadow: inset 0 1px 2px rgba($black, .075), $input-btn-focus-box-shadow !default; +$custom-select-focus-box-shadow: inset 0 1px 2px rgba($black, .075), 0 0 5px rgba($custom-select-focus-border-color, .5) !default; $custom-select-font-size-sm: 75% !default; $custom-select-height-sm: $input-height-sm !default; @@ -585,6 +590,8 @@ $nav-pills-link-active-bg: $component-active-bg !default; $navbar-padding-y: ($spacer / 2) !default; $navbar-padding-x: $spacer !default; +$navbar-nav-link-padding-x: .5rem !default; + $navbar-brand-font-size: $font-size-lg !default; // Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link $nav-link-height: ($font-size-base * $line-height-base + $nav-link-padding-y * 2) !default; @@ -625,13 +632,15 @@ $pagination-bg: $white !default; $pagination-border-width: $border-width !default; $pagination-border-color: $gray-300 !default; +$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default; + $pagination-hover-color: $link-hover-color !default; $pagination-hover-bg: $gray-200 !default; $pagination-hover-border-color: $gray-300 !default; -$pagination-active-color: $white !default; -$pagination-active-bg: theme-color("primary") !default; -$pagination-active-border-color: theme-color("primary") !default; +$pagination-active-color: $component-active-color !default; +$pagination-active-bg: $component-active-bg !default; +$pagination-active-border-color: $pagination-active-bg !default; $pagination-disabled-color: $gray-600 !default; $pagination-disabled-bg: $white !default; @@ -667,9 +676,11 @@ $card-columns-margin: $card-spacer-y !default; // Tooltips +$tooltip-font-size: $font-size-sm !default; $tooltip-max-width: 200px !default; $tooltip-color: $white !default; $tooltip-bg: $black !default; +$tooltip-border-radius: $border-radius !default; $tooltip-opacity: .9 !default; $tooltip-padding-y: .25rem !default; $tooltip-padding-x: .5rem !default; @@ -682,10 +693,12 @@ $tooltip-arrow-color: $tooltip-bg !default; // Popovers +$popover-font-size: $font-size-sm !default; $popover-bg: $white !default; $popover-max-width: 276px !default; $popover-border-width: $border-width !default; $popover-border-color: rgba($black, .2) !default; +$popover-border-radius: $border-radius-lg !default; $popover-box-shadow: 0 .25rem .5rem rgba($black, .2) !default; $popover-header-bg: darken($popover-bg, 3%) !default; @@ -760,6 +773,10 @@ $alert-border-radius: $border-radius !default; $alert-link-font-weight: $font-weight-bold !default; $alert-border-width: $border-width !default; +$alert-bg-level: -10 !default; +$alert-border-level: -9 !default; +$alert-color-level: 6 !default; + // Progress bars @@ -870,3 +887,8 @@ $kbd-bg: $gray-900 !default; $pre-color: $gray-900 !default; $pre-scrollable-max-height: 340px !default; + + +// Printing +$print-page-size: a3 !default; +$print-body-min-width: map-get($grid-breakpoints, "lg") !default; diff --git a/assets/stylesheets/bootstrap/mixins/_breakpoints.scss b/assets/stylesheets/bootstrap/mixins/_breakpoints.scss index 7c95c68..d1ad684 100644 --- a/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +++ b/assets/stylesheets/bootstrap/mixins/_breakpoints.scss @@ -29,15 +29,17 @@ } // Maximum breakpoint width. Null for the largest (last) breakpoint. -// The maximum value is calculated as the minimum of the next one less 0.01px +// The maximum value is calculated as the minimum of the next one less 0.02px // to work around the limitations of `min-` and `max-` prefixes and viewports with fractional widths. // See https://www.w3.org/TR/mediaqueries-4/#mq-min-max +// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari. +// See https://bugs.webkit.org/show_bug.cgi?id=178261 // // >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) -// 767px +// 767.98px @function breakpoint-max($name, $breakpoints: $grid-breakpoints) { $next: breakpoint-next($name, $breakpoints); - @return if($next, breakpoint-min($next, $breakpoints) - .01px, null); + @return if($next, breakpoint-min($next, $breakpoints) - .02px, null); } // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront. @@ -88,11 +90,11 @@ @content; } } @else if $max == null { - @include media-breakpoint-up($lower) { + @include media-breakpoint-up($lower, $breakpoints) { @content; } } @else if $min == null { - @include media-breakpoint-down($upper) { + @include media-breakpoint-down($upper, $breakpoints) { @content; } } @@ -110,11 +112,11 @@ @content; } } @else if $max == null { - @include media-breakpoint-up($name) { + @include media-breakpoint-up($name, $breakpoints) { @content; } } @else if $min == null { - @include media-breakpoint-down($name) { + @include media-breakpoint-down($name, $breakpoints) { @content; } } diff --git a/assets/stylesheets/bootstrap/mixins/_buttons.scss b/assets/stylesheets/bootstrap/mixins/_buttons.scss index 252e26a..06ad677 100644 --- a/assets/stylesheets/bootstrap/mixins/_buttons.scss +++ b/assets/stylesheets/bootstrap/mixins/_buttons.scss @@ -28,12 +28,13 @@ // Disabled comes first so active can properly restyle &.disabled, &:disabled { + color: color-yiq($background); background-color: $background; border-color: $border; } - &:not([disabled]):not(.disabled):active, - &:not([disabled]):not(.disabled).active, + &:not(:disabled):not(.disabled):active, + &:not(:disabled):not(.disabled).active, .show > &.dropdown-toggle { color: color-yiq($active-background); background-color: $active-background; @@ -53,14 +54,14 @@ } } -@mixin button-outline-variant($color, $color-hover: #fff, $active-background: $color, $active-border: $color) { +@mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) { color: $color; background-color: transparent; background-image: none; border-color: $color; &:hover { - color: color-yiq($color); + color: $color-hover; background-color: $active-background; border-color: $active-border; } @@ -76,14 +77,21 @@ background-color: transparent; } - &:not([disabled]):not(.disabled):active, - &:not([disabled]):not(.disabled).active, + &:not(:disabled):not(.disabled):active, + &:not(:disabled):not(.disabled).active, .show > &.dropdown-toggle { - color: color-yiq($color-hover); + color: color-yiq($active-background); background-color: $active-background; border-color: $active-border; - // Avoid using mixin so we can pass custom focus shadow properly - box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); + + &:focus { + // Avoid using mixin so we can pass custom focus shadow properly + @if $enable-shadows and $btn-active-box-shadow != none { + box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5); + } @else { + box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); + } + } } } diff --git a/assets/stylesheets/bootstrap/mixins/_forms.scss b/assets/stylesheets/bootstrap/mixins/_forms.scss index d25df18..2290682 100644 --- a/assets/stylesheets/bootstrap/mixins/_forms.scss +++ b/assets/stylesheets/bootstrap/mixins/_forms.scss @@ -27,7 +27,6 @@ @mixin form-validation-state($state, $color) { - .#{$state}-feedback { display: none; width: 100%; @@ -41,7 +40,7 @@ top: 100%; z-index: 5; display: none; - width: 250px; + max-width: 100%; // Contain to parent when possible padding: .5rem; margin-top: .1rem; font-size: .875rem; @@ -75,6 +74,11 @@ ~ .form-check-label { color: $color; } + + ~ .#{$state}-feedback, + ~ .#{$state}-tooltip { + display: block; + } } } diff --git a/assets/stylesheets/bootstrap/mixins/_grid-framework.scss b/assets/stylesheets/bootstrap/mixins/_grid-framework.scss index 41bdf46..7b37f86 100644 --- a/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +++ b/assets/stylesheets/bootstrap/mixins/_grid-framework.scss @@ -46,14 +46,12 @@ } } - .order#{$infix}-first { - order: -1; - } + .order#{$infix}-first { order: -1; } - @for $i from 1 through $columns { - .order#{$infix}-#{$i} { - order: $i; - } + .order#{$infix}-last { order: $columns + 1; } + + @for $i from 0 through $columns { + .order#{$infix}-#{$i} { order: $i; } } // `$columns - 1` because offsetting by the width of an entire row isn't possible diff --git a/assets/stylesheets/bootstrap/mixins/_hover.scss b/assets/stylesheets/bootstrap/mixins/_hover.scss index fd2f1e2..ec2e328 100644 --- a/assets/stylesheets/bootstrap/mixins/_hover.scss +++ b/assets/stylesheets/bootstrap/mixins/_hover.scss @@ -1,61 +1,39 @@ // stylelint-disable indentation + +// Hover mixin and `$enable-hover-media-query` are deprecated. +// +// Origally added during our alphas and maintained during betas, this mixin was +// designed to prevent `:hover` stickiness on iOS—an issue where hover styles +// would persist after initial touch. +// +// For backward compatibility, we've kept these mixins and updated them to +// always return their regular psuedo-classes instead of a shimmed media query. +// +// Issue: https://github.com/twbs/bootstrap/issues/25195 + @mixin hover { - // TODO: re-enable along with mq4-hover-shim -// @if $enable-hover-media-query { -// // See Media Queries Level 4: https://drafts.csswg.org/mediaqueries/#hover -// // Currently shimmed by https://github.com/twbs/mq4-hover-shim -// @media (hover: hover) { -// &:hover { @content } -// } -// } -// @else { - &:hover { @content; } -// } + &:hover { @content; } } - @mixin hover-focus { - @if $enable-hover-media-query { - &:focus { - @content; - } - @include hover { @content; } - } @else { - &:focus, - &:hover { - @content; - } + &:hover, + &:focus { + @content; } } @mixin plain-hover-focus { - @if $enable-hover-media-query { - &, - &:focus { - @content; - } - @include hover { @content; } - } @else { - &, - &:focus, - &:hover { - @content; - } + &, + &:hover, + &:focus { + @content; } } @mixin hover-focus-active { - @if $enable-hover-media-query { - &:focus, - &:active { - @content; - } - @include hover { @content; } - } @else { - &:focus, - &:active, - &:hover { - @content; - } + &:hover, + &:focus, + &:active { + @content; } } diff --git a/assets/stylesheets/bootstrap/mixins/_list-group.scss b/assets/stylesheets/bootstrap/mixins/_list-group.scss index 278787b..607ffcb 100644 --- a/assets/stylesheets/bootstrap/mixins/_list-group.scss +++ b/assets/stylesheets/bootstrap/mixins/_list-group.scss @@ -4,21 +4,18 @@ .list-group-item-#{$state} { color: $color; background-color: $background; - } - - a.list-group-item-#{$state}, - button.list-group-item-#{$state} { - color: $color; - @include hover-focus { - color: $color; - background-color: darken($background, 5%); - } + &.list-group-item-action { + @include hover-focus { + color: $color; + background-color: darken($background, 5%); + } - &.active { - color: #fff; - background-color: $color; - border-color: $color; + &.active { + color: #fff; + background-color: $color; + border-color: $color; + } } } } diff --git a/assets/stylesheets/bootstrap/utilities/_borders.scss b/assets/stylesheets/bootstrap/utilities/_borders.scss index ba02f04..b8832ef 100644 --- a/assets/stylesheets/bootstrap/utilities/_borders.scss +++ b/assets/stylesheets/bootstrap/utilities/_borders.scss @@ -4,7 +4,12 @@ // Border // -.border { border: $border-width solid $border-color !important; } +.border { border: $border-width solid $border-color !important; } +.border-top { border-top: $border-width solid $border-color !important; } +.border-right { border-right: $border-width solid $border-color !important; } +.border-bottom { border-bottom: $border-width solid $border-color !important; } +.border-left { border-left: $border-width solid $border-color !important; } + .border-0 { border: 0 !important; } .border-top-0 { border-top: 0 !important; } .border-right-0 { border-right: 0 !important; } diff --git a/assets/stylesheets/bootstrap/utilities/_display.scss b/assets/stylesheets/bootstrap/utilities/_display.scss index 893b638..20aeeb5 100644 --- a/assets/stylesheets/bootstrap/utilities/_display.scss +++ b/assets/stylesheets/bootstrap/utilities/_display.scss @@ -25,32 +25,14 @@ // Utilities for toggling `display` in print // -.d-print-block { - display: none !important; - - @media print { - display: block !important; - } -} - -.d-print-inline { - display: none !important; - - @media print { - display: inline !important; - } -} - -.d-print-inline-block { - display: none !important; - - @media print { - display: inline-block !important; - } -} - -.d-print-none { - @media print { - display: none !important; - } +@media print { + .d-print-none { display: none !important; } + .d-print-inline { display: inline !important; } + .d-print-inline-block { display: inline-block !important; } + .d-print-block { display: block !important; } + .d-print-table { display: table !important; } + .d-print-table-row { display: table-row !important; } + .d-print-table-cell { display: table-cell !important; } + .d-print-flex { display: flex !important; } + .d-print-inline-flex { display: inline-flex !important; } } |