diff options
Diffstat (limited to 'assets/stylesheets')
37 files changed, 663 insertions, 531 deletions
diff --git a/assets/stylesheets/_bootstrap-grid.scss b/assets/stylesheets/_bootstrap-grid.scss index 64ae965..2d81009 100644 --- a/assets/stylesheets/_bootstrap-grid.scss +++ b/assets/stylesheets/_bootstrap-grid.scss @@ -1,5 +1,5 @@ /*! - * Bootstrap Grid v5.0.0-alpha2 (https://getbootstrap.com/) + * Bootstrap Grid v5.0.0-alpha3 (https://getbootstrap.com/) * Copyright 2011-2020 The Bootstrap Authors * Copyright 2011-2020 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) diff --git a/assets/stylesheets/_bootstrap-reboot.scss b/assets/stylesheets/_bootstrap-reboot.scss index fded39c..384c463 100644 --- a/assets/stylesheets/_bootstrap-reboot.scss +++ b/assets/stylesheets/_bootstrap-reboot.scss @@ -1,5 +1,5 @@ /*! - * Bootstrap Reboot v5.0.0-alpha2 (https://getbootstrap.com/) + * Bootstrap Reboot v5.0.0-alpha3 (https://getbootstrap.com/) * Copyright 2011-2020 The Bootstrap Authors * Copyright 2011-2020 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) diff --git a/assets/stylesheets/_bootstrap.scss b/assets/stylesheets/_bootstrap.scss index beb028d..55a59ee 100644 --- a/assets/stylesheets/_bootstrap.scss +++ b/assets/stylesheets/_bootstrap.scss @@ -1,5 +1,5 @@ /*! - * Bootstrap v5.0.0-alpha2 (https://getbootstrap.com/) + * Bootstrap v5.0.0-alpha3 (https://getbootstrap.com/) * Copyright 2011-2020 The Bootstrap Authors * Copyright 2011-2020 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) @@ -28,6 +28,7 @@ @import "bootstrap/nav"; @import "bootstrap/navbar"; @import "bootstrap/card"; +@import "bootstrap/accordion"; @import "bootstrap/breadcrumb"; @import "bootstrap/pagination"; @import "bootstrap/badge"; diff --git a/assets/stylesheets/bootstrap/_accordion.scss b/assets/stylesheets/bootstrap/_accordion.scss new file mode 100644 index 0000000..a68aaa7 --- /dev/null +++ b/assets/stylesheets/bootstrap/_accordion.scss @@ -0,0 +1,125 @@ +// +// Base styles +// + +.accordion-button { + position: relative; + display: flex; + align-items: center; + width: 100%; + padding: $accordion-button-padding-y $accordion-button-padding-x; + @include font-size($font-size-base); + color: $accordion-button-color; + background-color: $accordion-button-bg; + border: $accordion-border-width solid $accordion-border-color; + @include border-radius(0); + overflow-anchor: none; + @include transition($accordion-transition); + + &.collapsed { + border-bottom-width: 0; + } + + &:not(.collapsed) { + color: $accordion-button-active-color; + background-color: $accordion-button-active-bg; + + &::after { + background-image: escape-svg($accordion-button-active-icon); + transform: $accordion-icon-transform; + } + } + + // Accordion icon + &::after { + flex-shrink: 0; + width: $accordion-icon-width; + height: $accordion-icon-width; + margin-left: auto; + content: ""; + background-image: escape-svg($accordion-button-icon); + background-repeat: no-repeat; + background-size: $accordion-icon-width; + @include transition($accordion-icon-transition); + } + + &:hover { + z-index: 2; + } + + &:focus { + z-index: 3; + border-color: $accordion-button-focus-border-color; + outline: 0; + box-shadow: $accordion-button-focus-box-shadow; + } +} + +.accordion-header { + margin-bottom: 0; +} + +.accordion-item { + &:first-of-type { + .accordion-button { + @include border-top-radius($accordion-border-radius); + } + } + + &:last-of-type { + .accordion-button { + // Only set a border-radius on the last item if the accordion is collapsed + &.collapsed { + border-bottom-width: $accordion-border-width; + @include border-bottom-radius($accordion-border-radius); + } + } + + .accordion-collapse { + border-bottom-width: $accordion-border-width; + @include border-bottom-radius($accordion-border-radius); + } + } +} + +.accordion-collapse { + border: solid $accordion-border-color; + border-width: 0 $accordion-border-width; +} + +.accordion-body { + padding: $accordion-body-padding-y $accordion-body-padding-x; +} + + +// Flush accordion items +// +// Remove borders and border-radius to keep accordion items edge-to-edge. + +.accordion-flush { + .accordion-button { + border-right: 0; + border-left: 0; + @include border-radius(0); + } + + .accordion-collapse { + border-width: 0; + } + + .accordion-item { + &:first-of-type { + .accordion-button { + border-top-width: 0; + @include border-top-radius(0); + } + } + + &:last-of-type { + .accordion-button.collapsed { + border-bottom-width: 0; + @include border-bottom-radius(0); + } + } + } +} diff --git a/assets/stylesheets/bootstrap/_alert.scss b/assets/stylesheets/bootstrap/_alert.scss index d0536f3..24fa2bd 100644 --- a/assets/stylesheets/bootstrap/_alert.scss +++ b/assets/stylesheets/bootstrap/_alert.scss @@ -34,6 +34,7 @@ position: absolute; top: 0; right: 0; + z-index: $stretched-link-z-index + 1; padding: $alert-padding-y * 1.25 $alert-padding-x; } } @@ -42,9 +43,15 @@ // scss-docs-start alert-modifiers // Generate contextual modifier classes for colorizing the alert. -@each $color, $value in $theme-colors { - .alert-#{$color} { - @include alert-variant(color-level($value, $alert-bg-level), color-level($value, $alert-border-level), color-level($value, $alert-color-level)); +@each $state, $value in $theme-colors { + $background: scale-color($value, $alert-bg-scale); + $border: scale-color($value, $alert-border-scale); + $color: scale-color($value, $alert-color-scale); + @if (contrast-ratio($background, $color) < $min-contrast-ratio) { + $color: mix($value, color-contrast($background), abs($alert-color-scale)); + } + .alert-#{$state} { + @include alert-variant($background, $border, $color); } } // scss-docs-end alert-modifiers diff --git a/assets/stylesheets/bootstrap/_breadcrumb.scss b/assets/stylesheets/bootstrap/_breadcrumb.scss index db8e741..b30668b 100644 --- a/assets/stylesheets/bootstrap/_breadcrumb.scss +++ b/assets/stylesheets/bootstrap/_breadcrumb.scss @@ -10,14 +10,12 @@ } .breadcrumb-item { - display: flex; - // The separator between breadcrumbs (by default, a forward-slash: "/") + .breadcrumb-item { padding-left: $breadcrumb-item-padding-x; &::before { - display: inline-block; // Suppress underlining of the separator + float: left; // Suppress inline spacings and underlining of the separator padding-right: $breadcrumb-item-padding-x; color: $breadcrumb-divider-color; content: escape-svg($breadcrumb-divider); diff --git a/assets/stylesheets/bootstrap/_button-group.scss b/assets/stylesheets/bootstrap/_button-group.scss index b15c629..1571d1e 100644 --- a/assets/stylesheets/bootstrap/_button-group.scss +++ b/assets/stylesheets/bootstrap/_button-group.scss @@ -1,5 +1,3 @@ -// stylelint-disable selector-no-qualifying-type - // 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 e17d489..8f28d02 100644 --- a/assets/stylesheets/bootstrap/_buttons.scss +++ b/assets/stylesheets/bootstrap/_buttons.scss @@ -107,18 +107,3 @@ .btn-sm { @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm); } - - -// -// Block button -// - -.btn-block { - display: block; - width: 100%; - - // Vertically space out multiple block buttons - + .btn-block { - margin-top: $btn-block-spacing-y; - } -} diff --git a/assets/stylesheets/bootstrap/_card.scss b/assets/stylesheets/bootstrap/_card.scss index a526ec1..9b0f496 100644 --- a/assets/stylesheets/bootstrap/_card.scss +++ b/assets/stylesheets/bootstrap/_card.scss @@ -213,30 +213,3 @@ } } } - - -// -// Accordion -// - -.accordion { - overflow-anchor: none; - - > .card { - overflow: hidden; - - &:not(:last-of-type) { - border-bottom: 0; - @include border-bottom-radius(0); - } - - &:not(:first-of-type) { - @include border-top-radius(0); - } - - > .card-header { - @include border-radius(0); - margin-bottom: -$card-border-width; - } - } -} diff --git a/assets/stylesheets/bootstrap/_close.scss b/assets/stylesheets/bootstrap/_close.scss index fd1971d..db5d027 100644 --- a/assets/stylesheets/bootstrap/_close.scss +++ b/assets/stylesheets/bootstrap/_close.scss @@ -9,8 +9,7 @@ height: $btn-close-height; padding: $btn-close-padding-y $btn-close-padding-x; color: $btn-close-color; - background: transparent escape-svg($btn-close-bg) no-repeat center center / $btn-close-width auto; // include transparent for button elements - background-clip: content-box; + background: transparent escape-svg($btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements border: 0; // for button elements @include border-radius(); opacity: $btn-close-opacity; diff --git a/assets/stylesheets/bootstrap/_forms.scss b/assets/stylesheets/bootstrap/_forms.scss index 39ba90d..7b17d84 100644 --- a/assets/stylesheets/bootstrap/_forms.scss +++ b/assets/stylesheets/bootstrap/_forms.scss @@ -3,7 +3,7 @@ @import "forms/form-control"; @import "forms/form-select"; @import "forms/form-check"; -@import "forms/form-file"; @import "forms/form-range"; +@import "forms/floating-labels"; @import "forms/input-group"; @import "forms/validation"; diff --git a/assets/stylesheets/bootstrap/_functions.scss b/assets/stylesheets/bootstrap/_functions.scss index fd72c98..b95fbf9 100644 --- a/assets/stylesheets/bootstrap/_functions.scss +++ b/assets/stylesheets/bootstrap/_functions.scss @@ -150,23 +150,23 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100); } -// Request a color level -// scss-docs-start color-level -@function color-level($color: $primary, $level: 0) { - $color-base: if($level > 0, $black, $white); - $level: abs($level); - - @return mix($color-base, $color, $level * $theme-color-interval); +// scss-docs-start color-functions +// Tint a color: mix a color with white +@function tint-color($color, $weight) { + @return mix(white, $color, $weight); } -// scss-docs-end color-level -@function tint-color($color, $level) { - @return mix(white, $color, $level * $theme-color-interval); +// Shade a color: mix a color with black +@function shade-color($color, $weight) { + @return mix(black, $color, $weight); } -@function shade-color($color, $level) { - @return mix(black, $color, $level * $theme-color-interval); +// Scale a color: +// Shade the color if the weight is positive, else tint it +@function scale-color($color, $weight) { + @return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight)); } +// scss-docs-end color-functions // Return valid calc @function add($value1, $value2, $return-calc: true) { diff --git a/assets/stylesheets/bootstrap/_list-group.scss b/assets/stylesheets/bootstrap/_list-group.scss index b193790..2ce0c8b 100644 --- a/assets/stylesheets/bootstrap/_list-group.scss +++ b/assets/stylesheets/bootstrap/_list-group.scss @@ -151,7 +151,13 @@ // Add modifier classes to change text and background color on individual items. // Organizationally, this must come after the `:hover` states. -@each $color, $value in $theme-colors { - @include list-group-item-variant($color, color-level($value, $list-group-item-bg-level), color-level($value, $list-group-item-color-level)); +@each $state, $value in $theme-colors { + $background: scale-color($value, $list-group-item-bg-scale); + $color: scale-color($value, $list-group-item-color-scale); + @if (contrast-ratio($background, $color) < $min-contrast-ratio) { + $color: mix($value, color-contrast($background), abs($alert-color-scale)); + } + + @include list-group-item-variant($state, $background, $color); } // scss-docs-end list-group-modifiers diff --git a/assets/stylesheets/bootstrap/_popover.scss b/assets/stylesheets/bootstrap/_popover.scss index 6ebb2c3..55bfe1f 100644 --- a/assets/stylesheets/bootstrap/_popover.scss +++ b/assets/stylesheets/bootstrap/_popover.scss @@ -156,7 +156,7 @@ @include font-size($font-size-base); color: $popover-header-color; background-color: $popover-header-bg; - border-bottom: $popover-border-width solid darken($popover-header-bg, 5%); + border-bottom: $popover-border-width solid shade-color($popover-header-bg, 10%); @include border-top-radius($popover-inner-border-radius); &:empty { diff --git a/assets/stylesheets/bootstrap/_progress.scss b/assets/stylesheets/bootstrap/_progress.scss index a3fbecf..b48ffc4 100644 --- a/assets/stylesheets/bootstrap/_progress.scss +++ b/assets/stylesheets/bootstrap/_progress.scss @@ -34,7 +34,7 @@ @if $enable-transitions { .progress-bar-animated { - animation: progress-bar-stripes $progress-bar-animation-timing; + animation: $progress-bar-animation-timing progress-bar-stripes; @if $enable-reduced-motion { @media (prefers-reduced-motion: reduce) { diff --git a/assets/stylesheets/bootstrap/_reboot.scss b/assets/stylesheets/bootstrap/_reboot.scss index 223adfd..f64297b 100644 --- a/assets/stylesheets/bootstrap/_reboot.scss +++ b/assets/stylesheets/bootstrap/_reboot.scss @@ -27,6 +27,12 @@ :root { font-size: $font-size-root; + + @if $enable-smooth-scroll { + @media (prefers-reduced-motion: no-preference) { + scroll-behavior: smooth; + } + } } @@ -289,8 +295,6 @@ samp { // 1. Remove browser default top margin // 2. Reset browser default of `1em` to use `rem`s // 3. Don't allow content to break outside -// 4. Disable auto-hiding scrollbar in legacy Edge to avoid overlap, -// making it impossible to interact with the content pre { display: block; @@ -299,7 +303,6 @@ pre { overflow: auto; // 3 @include font-size($code-font-size); color: $pre-color; - -ms-overflow-style: scrollbar; // 4 // Account for some code outputs that place code tags in pre tags code { @@ -411,8 +414,8 @@ button { // Credit https://github.com/suitcss/base/ button:focus { - outline: 1px dotted; - outline: 5px auto -webkit-focus-ring-color; + outline: dotted 1px; + outline: -webkit-focus-ring-color auto 5px; } // 1. Remove the margin in Firefox and Safari @@ -428,13 +431,6 @@ textarea { line-height: inherit; } -// Show the overflow in Edge - -button, -input { - overflow: visible; -} - // Remove the inheritance of text transform in Firefox button, @@ -510,8 +506,7 @@ fieldset { // 1. By using `float: left`, the legend will behave like a block element. // This way the border of a fieldset wraps around the legend if present. -// 2. Correct the text wrapping in Edge. -// 3. Fix wrapping bug. +// 2. Fix wrapping bug. // See https://github.com/twbs/bootstrap/issues/29712 legend { @@ -522,10 +517,9 @@ legend { @include font-size($legend-font-size); font-weight: $legend-font-weight; line-height: inherit; - white-space: normal; // 2 + * { - clear: left; // 3 + clear: left; // 2 } } @@ -569,7 +563,15 @@ legend { padding: 0; } -// 1. Change font properties to `inherit` in Safari. + +// Inherit font family and line height for file input buttons + +// stylelint-disable-next-line selector-pseudo-element-no-unknown +::file-selector-button { + font: inherit; +} + +// 1. Change font properties to `inherit` // 2. Correct the inability to style clickable types in iOS and Safari. ::-webkit-file-upload-button { diff --git a/assets/stylesheets/bootstrap/_root.scss b/assets/stylesheets/bootstrap/_root.scss index 44eff17..768d634 100644 --- a/assets/stylesheets/bootstrap/_root.scss +++ b/assets/stylesheets/bootstrap/_root.scss @@ -1,16 +1,16 @@ :root { // Custom variable values only support SassScript inside `#{}`. @each $color, $value in $colors { - --bs-#{$color}: #{$value}; + --#{$variable-prefix}#{$color}: #{$value}; } @each $color, $value in $theme-colors { - --bs-#{$color}: #{$value}; + --#{$variable-prefix}#{$color}: #{$value}; } // Use `inspect` for lists so that quoted items keep the quotes. // See https://github.com/sass/sass/issues/2383#issuecomment-336349172 - --bs-font-sans-serif: #{inspect($font-family-sans-serif)}; - --bs-font-monospace: #{inspect($font-family-monospace)}; - --bs-gradient: #{$gradient}; + --#{$variable-prefix}font-sans-serif: #{inspect($font-family-sans-serif)}; + --#{$variable-prefix}font-monospace: #{inspect($font-family-monospace)}; + --#{$variable-prefix}gradient: #{$gradient}; } diff --git a/assets/stylesheets/bootstrap/_spinners.scss b/assets/stylesheets/bootstrap/_spinners.scss index 9e083ea..e932aac 100644 --- a/assets/stylesheets/bootstrap/_spinners.scss +++ b/assets/stylesheets/bootstrap/_spinners.scss @@ -15,7 +15,7 @@ border-right-color: transparent; // stylelint-disable-next-line property-disallowed-list border-radius: 50%; - animation: spinner-border $spinner-animation-speed linear infinite; + animation: $spinner-animation-speed linear infinite spinner-border; } .spinner-border-sm { @@ -47,10 +47,19 @@ // stylelint-disable-next-line property-disallowed-list border-radius: 50%; opacity: 0; - animation: spinner-grow $spinner-animation-speed linear infinite; + animation: $spinner-animation-speed linear infinite spinner-grow; } .spinner-grow-sm { width: $spinner-width-sm; height: $spinner-height-sm; } + +@if $enable-reduced-motion { + @media (prefers-reduced-motion: reduce) { + .spinner-border, + .spinner-grow { + animation-duration: $spinner-animation-speed * 2; + } + } +} diff --git a/assets/stylesheets/bootstrap/_tables.scss b/assets/stylesheets/bootstrap/_tables.scss index 47ffde1..1b2db30 100644 --- a/assets/stylesheets/bootstrap/_tables.scss +++ b/assets/stylesheets/bootstrap/_tables.scss @@ -3,14 +3,14 @@ // .table { - --bs-table-bg: #{$table-bg}; - --bs-table-accent-bg: transparent; - --bs-table-striped-color: #{$table-striped-color}; - --bs-table-striped-bg: #{$table-striped-bg}; - --bs-table-active-color: #{$table-active-color}; - --bs-table-active-bg: #{$table-active-bg}; - --bs-table-hover-color: #{$table-hover-color}; - --bs-table-hover-bg: #{$table-hover-bg}; + --#{$variable-prefix}table-bg: #{$table-bg}; + --#{$variable-prefix}table-accent-bg: transparent; + --#{$variable-prefix}table-striped-color: #{$table-striped-color}; + --#{$variable-prefix}table-striped-bg: #{$table-striped-bg}; + --#{$variable-prefix}table-active-color: #{$table-active-color}; + --#{$variable-prefix}table-active-bg: #{$table-active-bg}; + --#{$variable-prefix}table-hover-color: #{$table-hover-color}; + --#{$variable-prefix}table-hover-bg: #{$table-hover-bg}; width: 100%; margin-bottom: $spacer; @@ -25,8 +25,8 @@ // stylelint-disable-next-line selector-max-universal > :not(caption) > * > * { padding: $table-cell-padding-y $table-cell-padding-x; - background-color: var(--bs-table-bg); - background-image: linear-gradient(var(--bs-table-accent-bg), var(--bs-table-accent-bg)); + background-color: var(--#{$variable-prefix}table-bg); + background-image: linear-gradient(var(--#{$variable-prefix}table-accent-bg), var(--#{$variable-prefix}table-accent-bg)); border-bottom-width: $table-border-width; } @@ -99,8 +99,8 @@ .table-striped { > tbody > tr:nth-of-type(#{$table-striped-order}) { - --bs-table-accent-bg: var(--bs-table-striped-bg); - color: var(--bs-table-striped-color); + --#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-striped-bg); + color: var(--#{$variable-prefix}table-striped-color); } } @@ -109,8 +109,8 @@ // The `.table-active` class can be added to highlight rows or cells .table-active { - --bs-table-accent-bg: var(--bs-table-active-bg); - color: var(--bs-table-active-color); + --#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-active-bg); + color: var(--#{$variable-prefix}table-active-color); } // Hover effect @@ -119,8 +119,8 @@ .table-hover { > tbody > tr:hover { - --bs-table-accent-bg: var(--bs-table-hover-bg); - color: var(--bs-table-hover-color); + --#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-hover-bg); + color: var(--#{$variable-prefix}table-hover-color); } } diff --git a/assets/stylesheets/bootstrap/_utilities.scss b/assets/stylesheets/bootstrap/_utilities.scss index e9a9b1e..03c71d1 100644 --- a/assets/stylesheets/bootstrap/_utilities.scss +++ b/assets/stylesheets/bootstrap/_utilities.scss @@ -16,14 +16,14 @@ $utilities: map-merge( ), "overflow": ( property: overflow, - values: auto hidden, + values: auto hidden visible scroll, ), "display": ( responsive: true, print: true, property: display, class: d, - values: inline inline-block block table table-row table-cell flex inline-flex none + values: inline inline-block block grid table table-row table-cell flex inline-flex none ), "shadow": ( property: box-shadow, @@ -196,6 +196,12 @@ $utilities: map-merge( class: flex, values: wrap nowrap wrap-reverse ), + "gap": ( + responsive: true, + property: gap, + class: gap, + values: $spacers + ), "justify-content": ( responsive: true, property: justify-content, @@ -387,8 +393,20 @@ $utilities: map-merge( values: $spacers ), // Text + "font-size": ( + rfs: true, + property: font-size, + class: fs, + values: $font-sizes + ), + "font-style": ( + property: font-style, + class: fst, + values: italic normal + ), "font-weight": ( property: font-weight, + class: fw, values: ( light: $font-weight-light, lighter: $font-weight-lighter, @@ -448,7 +466,7 @@ $utilities: map-merge( "gradient": ( property: background-image, class: bg, - values: (gradient: var(--bs-gradient)) + values: (gradient: var(--#{$variable-prefix}gradient)) ), "white-space": ( property: white-space, @@ -462,11 +480,6 @@ $utilities: map-merge( property: text-decoration, values: none underline line-through ), - "font-style": ( - property: font-style, - class: font, - values: italic normal - ), "word-wrap": ( property: word-wrap word-break, class: text, @@ -475,7 +488,7 @@ $utilities: map-merge( "font-family": ( property: font-family, class: font, - values: (monospace: var(--bs-font-monospace)) + values: (monospace: var(--#{$variable-prefix}font-monospace)) ), "user-select": ( property: user-select, @@ -491,11 +504,12 @@ $utilities: map-merge( class: rounded, values: ( null: $border-radius, - sm: $border-radius-sm, - lg: $border-radius-lg, - circle: 50%, - pill: $rounded-pill, 0: 0, + 1: $border-radius-sm, + 2: $border-radius, + 3: $border-radius-lg, + circle: 50%, + pill: $border-radius-pill ) ), "rounded-top": ( diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss index e4d844f..2a8b45e 100644 --- a/assets/stylesheets/bootstrap/_variables.scss +++ b/assets/stylesheets/bootstrap/_variables.scss @@ -67,7 +67,7 @@ $info: $cyan !default; $warning: $yellow !default; $danger: $red !default; $light: $gray-100 !default; -$dark: $gray-800 !default; +$dark: $gray-900 !default; // scss-docs-start theme-colors-map $theme-colors: ( @@ -82,9 +82,6 @@ $theme-colors: ( ) !default; // scss-docs-end theme-colors-map -// Set a specific jump point for requesting color jumps -$theme-color-interval: 8% !default; - // The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7. // See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast $min-contrast-ratio: 4.5 !default; @@ -94,105 +91,105 @@ $color-contrast-dark: $black !default; $color-contrast-light: $white !default; // fusv-disable -$blue-100: tint-color($blue, 8) !default; -$blue-200: tint-color($blue, 6) !default; -$blue-300: tint-color($blue, 4) !default; -$blue-400: tint-color($blue, 2) !default; +$blue-100: tint-color($blue, 80%) !default; +$blue-200: tint-color($blue, 60%) !default; +$blue-300: tint-color($blue, 40%) !default; +$blue-400: tint-color($blue, 20%) !default; $blue-500: $blue !default; -$blue-600: shade-color($blue, 2) !default; -$blue-700: shade-color($blue, 4) !default; -$blue-800: shade-color($blue, 6) !default; -$blue-900: shade-color($blue, 8) !default; - -$indigo-100: tint-color($indigo, 8) !default; -$indigo-200: tint-color($indigo, 6) !default; -$indigo-300: tint-color($indigo, 4) !default; -$indigo-400: tint-color($indigo, 2) !default; +$blue-600: shade-color($blue, 20%) !default; +$blue-700: shade-color($blue, 40%) !default; +$blue-800: shade-color($blue, 60%) !default; +$blue-900: shade-color($blue, 80%) !default; + +$indigo-100: tint-color($indigo, 80%) !default; +$indigo-200: tint-color($indigo, 60%) !default; +$indigo-300: tint-color($indigo, 40%) !default; +$indigo-400: tint-color($indigo, 20%) !default; $indigo-500: $indigo !default; -$indigo-600: shade-color($indigo, 2) !default; -$indigo-700: shade-color($indigo, 4) !default; -$indigo-800: shade-color($indigo, 6) !default; -$indigo-900: shade-color($indigo, 8) !default; - -$purple-100: tint-color($purple, 8) !default; -$purple-200: tint-color($purple, 6) !default; -$purple-300: tint-color($purple, 4) !default; -$purple-400: tint-color($purple, 2) !default; +$indigo-600: shade-color($indigo, 20%) !default; +$indigo-700: shade-color($indigo, 40%) !default; +$indigo-800: shade-color($indigo, 60%) !default; +$indigo-900: shade-color($indigo, 80%) !default; + +$purple-100: tint-color($purple, 80%) !default; +$purple-200: tint-color($purple, 60%) !default; +$purple-300: tint-color($purple, 40%) !default; +$purple-400: tint-color($purple, 20%) !default; $purple-500: $purple !default; -$purple-600: shade-color($purple, 2) !default; -$purple-700: shade-color($purple, 4) !default; -$purple-800: shade-color($purple, 6) !default; -$purple-900: shade-color($purple, 8) !default; - -$pink-100: tint-color($pink, 8) !default; -$pink-200: tint-color($pink, 6) !default; -$pink-300: tint-color($pink, 4) !default; -$pink-400: tint-color($pink, 2) !default; +$purple-600: shade-color($purple, 20%) !default; +$purple-700: shade-color($purple, 40%) !default; +$purple-800: shade-color($purple, 60%) !default; +$purple-900: shade-color($purple, 80%) !default; + +$pink-100: tint-color($pink, 80%) !default; +$pink-200: tint-color($pink, 60%) !default; +$pink-300: tint-color($pink, 40%) !default; +$pink-400: tint-color($pink, 20%) !default; $pink-500: $pink !default; -$pink-600: shade-color($pink, 2) !default; -$pink-700: shade-color($pink, 4) !default; -$pink-800: shade-color($pink, 6) !default; -$pink-900: shade-color($pink, 8) !default; - -$red-100: tint-color($red, 8) !default; -$red-200: tint-color($red, 6) !default; -$red-300: tint-color($red, 4) !default; -$red-400: tint-color($red, 2) !default; +$pink-600: shade-color($pink, 20%) !default; +$pink-700: shade-color($pink, 40%) !default; +$pink-800: shade-color($pink, 60%) !default; +$pink-900: shade-color($pink, 80%) !default; + +$red-100: tint-color($red, 80%) !default; +$red-200: tint-color($red, 60%) !default; +$red-300: tint-color($red, 40%) !default; +$red-400: tint-color($red, 20%) !default; $red-500: $red !default; -$red-600: shade-color($red, 2) !default; -$red-700: shade-color($red, 4) !default; -$red-800: shade-color($red, 6) !default; -$red-900: shade-color($red, 8) !default; - -$orange-100: tint-color($orange, 8) !default; -$orange-200: tint-color($orange, 6) !default; -$orange-300: tint-color($orange, 4) !default; -$orange-400: tint-color($orange, 2) !default; +$red-600: shade-color($red, 20%) !default; +$red-700: shade-color($red, 40%) !default; +$red-800: shade-color($red, 60%) !default; +$red-900: shade-color($red, 80%) !default; + +$orange-100: tint-color($orange, 80%) !default; +$orange-200: tint-color($orange, 60%) !default; +$orange-300: tint-color($orange, 40%) !default; +$orange-400: tint-color($orange, 20%) !default; $orange-500: $orange !default; -$orange-600: shade-color($orange, 2) !default; -$orange-700: shade-color($orange, 4) !default; -$orange-800: shade-color($orange, 6) !default; -$orange-900: shade-color($orange, 8) !default; - -$yellow-100: tint-color($yellow, 8) !default; -$yellow-200: tint-color($yellow, 6) !default; -$yellow-300: tint-color($yellow, 4) !default; -$yellow-400: tint-color($yellow, 2) !default; +$orange-600: shade-color($orange, 20%) !default; +$orange-700: shade-color($orange, 40%) !default; +$orange-800: shade-color($orange, 60%) !default; +$orange-900: shade-color($orange, 80%) !default; + +$yellow-100: tint-color($yellow, 80%) !default; +$yellow-200: tint-color($yellow, 60%) !default; +$yellow-300: tint-color($yellow, 40%) !default; +$yellow-400: tint-color($yellow, 20%) !default; $yellow-500: $yellow !default; -$yellow-600: shade-color($yellow, 2) !default; -$yellow-700: shade-color($yellow, 4) !default; -$yellow-800: shade-color($yellow, 6) !default; -$yellow-900: shade-color($yellow, 8) !default; - -$green-100: tint-color($green, 8) !default; -$green-200: tint-color($green, 6) !default; -$green-300: tint-color($green, 4) !default; -$green-400: tint-color($green, 2) !default; +$yellow-600: shade-color($yellow, 20%) !default; +$yellow-700: shade-color($yellow, 40%) !default; +$yellow-800: shade-color($yellow, 60%) !default; +$yellow-900: shade-color($yellow, 80%) !default; + +$green-100: tint-color($green, 80%) !default; +$green-200: tint-color($green, 60%) !default; +$green-300: tint-color($green, 40%) !default; +$green-400: tint-color($green, 20%) !default; $green-500: $green !default; -$green-600: shade-color($green, 2) !default; -$green-700: shade-color($green, 4) !default; -$green-800: shade-color($green, 6) !default; -$green-900: shade-color($green, 8) !default; - -$teal-100: tint-color($teal, 8) !default; -$teal-200: tint-color($teal, 6) !default; -$teal-300: tint-color($teal, 4) !default; -$teal-400: tint-color($teal, 2) !default; +$green-600: shade-color($green, 20%) !default; +$green-700: shade-color($green, 40%) !default; +$green-800: shade-color($green, 60%) !default; +$green-900: shade-color($green, 80%) !default; + +$teal-100: tint-color($teal, 80%) !default; +$teal-200: tint-color($teal, 60%) !default; +$teal-300: tint-color($teal, 40%) !default; +$teal-400: tint-color($teal, 20%) !default; $teal-500: $teal !default; -$teal-600: shade-color($teal, 2) !default; -$teal-700: shade-color($teal, 4) !default; -$teal-800: shade-color($teal, 6) !default; -$teal-900: shade-color($teal, 8) !default; - -$cyan-100: tint-color($cyan, 8) !default; -$cyan-200: tint-color($cyan, 6) !default; -$cyan-300: tint-color($cyan, 4) !default; -$cyan-400: tint-color($cyan, 2) !default; +$teal-600: shade-color($teal, 20%) !default; +$teal-700: shade-color($teal, 40%) !default; +$teal-800: shade-color($teal, 60%) !default; +$teal-900: shade-color($teal, 80%) !default; + +$cyan-100: tint-color($cyan, 80%) !default; +$cyan-200: tint-color($cyan, 60%) !default; +$cyan-300: tint-color($cyan, 40%) !default; +$cyan-400: tint-color($cyan, 20%) !default; $cyan-500: $cyan !default; -$cyan-600: shade-color($cyan, 2) !default; -$cyan-700: shade-color($cyan, 4) !default; -$cyan-800: shade-color($cyan, 6) !default; -$cyan-900: shade-color($cyan, 8) !default; +$cyan-600: shade-color($cyan, 20%) !default; +$cyan-700: shade-color($cyan, 40%) !default; +$cyan-800: shade-color($cyan, 60%) !default; +$cyan-900: shade-color($cyan, 80%) !default; // fusv-enable // Characters which are escaped by the escape-svg function @@ -214,6 +211,7 @@ $enable-shadows: false !default; $enable-gradients: false !default; $enable-transitions: true !default; $enable-reduced-motion: true !default; +$enable-smooth-scroll: true !default; $enable-grid-classes: true !default; $enable-button-pointers: true !default; $enable-rfs: true !default; @@ -222,6 +220,10 @@ $enable-negative-margins: false !default; $enable-deprecation-messages: true !default; $enable-important-utilities: true !default; +// Prefix for :root CSS variables + +$variable-prefix: bs- !default; + // Gradient // // The gradient which is added to components if `$enable-gradients` is `true` @@ -272,10 +274,9 @@ $body-text-align: null !default; $link-color: $primary !default; $link-decoration: underline !default; -$link-hover-color: darken($link-color, 15%) !default; +$link-shade-percentage: 20% !default; +$link-hover-color: scale-color($link-color, $link-shade-percentage) !default; $link-hover-decoration: null !default; -// Darken percentage for links with `.text-*` class (e.g. `.text-success`) -$emphasized-link-hover-darken-percentage: 15% !default; $stretched-link-pseudo-element: after !default; $stretched-link-z-index: 1 !default; @@ -344,11 +345,6 @@ $container-padding-x: $grid-gutter-width !default; // Define common padding and border radius sizes and more. $border-width: 1px !default; -$border-color: $gray-300 !default; - -$border-radius: .25rem !default; -$border-radius-sm: .2rem !default; -$border-radius-lg: .3rem !default; $border-widths: ( 0: 0, 1: 1px, @@ -358,7 +354,12 @@ $border-widths: ( 5: 5px ) !default; -$rounded-pill: 50rem !default; +$border-color: $gray-300 !default; + +$border-radius: .25rem !default; +$border-radius-sm: .2rem !default; +$border-radius-lg: .3rem !default; +$border-radius-pill: 50rem !default; $box-shadow: 0 .5rem 1rem rgba($black, .15) !default; $box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default; @@ -392,11 +393,11 @@ $aspect-ratios: ( // Font, line-height, and color for body text, headings, and more. // stylelint-disable value-keyword-case -$font-family-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default; +$font-family-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default; $font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default; // stylelint-enable value-keyword-case -$font-family-base: var(--bs-font-sans-serif) !default; -$font-family-code: var(--bs-font-monospace) !default; +$font-family-base: var(--#{$variable-prefix}font-sans-serif) !default; +$font-family-code: var(--#{$variable-prefix}font-monospace) !default; // $font-size-root effects the value of `rem`, which is used for as well font sizes, paddings and margins // $font-size-base effects the font size of the body text @@ -424,6 +425,17 @@ $h4-font-size: $font-size-base * 1.5 !default; $h5-font-size: $font-size-base * 1.25 !default; $h6-font-size: $font-size-base !default; +// scss-docs-start font-sizes +$font-sizes: ( + 1: $h1-font-size, + 2: $h2-font-size, + 3: $h3-font-size, + 4: $h4-font-size, + 5: $h5-font-size, + 6: $h6-font-size +) !default; +// scss-docs-end font-sizes + $headings-margin-bottom: $spacer / 2 !default; $headings-font-family: null !default; $headings-font-style: null !default; @@ -520,15 +532,15 @@ $table-group-separator-color: currentColor !default; $table-caption-color: $text-muted !default; -$table-bg-level: -9 !default; +$table-bg-scale: -80% !default; $table-variants: ( - "primary": color-level($primary, $table-bg-level), - "secondary": color-level($secondary, $table-bg-level), - "success": color-level($success, $table-bg-level), - "info": color-level($info, $table-bg-level), - "warning": color-level($warning, $table-bg-level), - "danger": color-level($danger, $table-bg-level), + "primary": scale-color($primary, $table-bg-scale), + "secondary": scale-color($secondary, $table-bg-scale), + "success": scale-color($success, $table-bg-scale), + "info": scale-color($info, $table-bg-scale), + "warning": scale-color($warning, $table-bg-scale), + "danger": scale-color($danger, $table-bg-scale), "light": $light, "dark": $dark, ) !default; @@ -593,8 +605,6 @@ $btn-link-color: $link-color !default; $btn-link-hover-color: $link-hover-color !default; $btn-link-disabled-color: $gray-600 !default; -$btn-block-spacing-y: .5rem !default; - // Allows for customizing button radius independently from global border radius $btn-border-radius: $border-radius !default; $btn-border-radius-sm: $border-radius-sm !default; @@ -636,7 +646,7 @@ $input-bg: $white !default; $input-disabled-bg: $gray-200 !default; $input-disabled-border-color: null !default; -$input-color: $gray-700 !default; +$input-color: $body-color !default; $input-border-color: $gray-400 !default; $input-border-width: $input-btn-border-width !default; $input-box-shadow: $box-shadow-inset !default; @@ -646,7 +656,7 @@ $input-border-radius-sm: $border-radius-sm !default; $input-border-radius-lg: $border-radius-lg !default; $input-focus-bg: $input-bg !default; -$input-focus-border-color: lighten($component-active-bg, 25%) !default; +$input-focus-border-color: tint-color($component-active-bg, 50%) !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; @@ -695,6 +705,10 @@ $form-check-input-indeterminate-bg-color: $component-active-bg !default; $form-check-input-indeterminate-border-color: $form-check-input-indeterminate-bg-color !default; $form-check-input-indeterminate-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#{$form-check-input-indeterminate-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/></svg>") !default; +$form-check-input-disabled-opacity: .5 !default; +$form-check-label-disabled-opacity: $form-check-input-disabled-opacity !default; +$form-check-btn-check-disabled-opacity: $btn-disabled-opacity !default; + $form-switch-color: rgba(0, 0, 0, .25) !default; $form-switch-width: 2em !default; $form-switch-padding-left: $form-switch-width + .5em !default; @@ -717,12 +731,10 @@ $input-group-addon-color: $input-color !default; $input-group-addon-bg: $gray-200 !default; $input-group-addon-border-color: $input-border-color !default; - $form-select-padding-y: $input-padding-y !default; $form-select-padding-x: $input-padding-x !default; $form-select-font-family: $input-font-family !default; $form-select-font-size: $input-font-size !default; -$form-select-height: $input-height !default; $form-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator $form-select-font-weight: $input-font-weight !default; $form-select-line-height: $input-line-height !default; @@ -752,12 +764,10 @@ $form-select-focus-box-shadow: 0 0 0 $form-select-focus-width $input-btn-focu $form-select-padding-y-sm: $input-padding-y-sm !default; $form-select-padding-x-sm: $input-padding-x-sm !default; $form-select-font-size-sm: $input-font-size-sm !default; -$form-select-height-sm: $input-height-sm !default; $form-select-padding-y-lg: $input-padding-y-lg !default; $form-select-padding-x-lg: $input-padding-x-lg !default; $form-select-font-size-lg: $input-font-size-lg !default; -$form-select-height-lg: $input-height-lg !default; $form-range-track-width: 100% !default; $form-range-track-height: .5rem !default; @@ -774,40 +784,22 @@ $form-range-thumb-border-radius: 1rem !default; $form-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default; $form-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-focus-box-shadow !default; $form-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in Edge -$form-range-thumb-active-bg: lighten($component-active-bg, 35%) !default; +$form-range-thumb-active-bg: tint-color($component-active-bg, 70%) !default; $form-range-thumb-disabled-bg: $gray-500 !default; $form-range-thumb-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; -$form-file-height: $input-height !default; -$form-file-focus-border-color: $input-focus-border-color !default; -$form-file-focus-box-shadow: $input-focus-box-shadow !default; -$form-file-disabled-bg: $input-disabled-bg !default; -$form-file-disabled-border-color: $input-disabled-border-color !default; - -$form-file-padding-y: $input-padding-y !default; -$form-file-padding-x: $input-padding-x !default; -$form-file-line-height: $input-line-height !default; -$form-file-font-family: $input-font-family !default; -$form-file-font-weight: $input-font-weight !default; -$form-file-color: $input-color !default; -$form-file-bg: $input-bg !default; -$form-file-border-width: $input-border-width !default; -$form-file-border-color: $input-border-color !default; -$form-file-border-radius: $input-border-radius !default; -$form-file-box-shadow: $input-box-shadow !default; -$form-file-button-color: $form-file-color !default; +$form-file-button-color: $input-color !default; $form-file-button-bg: $input-group-addon-bg !default; +$form-file-button-hover-bg: shade-color($form-file-button-bg, 5%) !default; -$form-file-padding-y-sm: $input-padding-y-sm !default; -$form-file-padding-x-sm: $input-padding-x-sm !default; -$form-file-font-size-sm: $input-font-size-sm !default; -$form-file-height-sm: $input-height-sm !default; - -$form-file-padding-y-lg: $input-padding-y-lg !default; -$form-file-padding-x-lg: $input-padding-x-lg !default; -$form-file-font-size-lg: $input-font-size-lg !default; -$form-file-height-lg: $input-height-lg !default; - +$form-floating-height: add(3.5rem, $input-height-border) !default; +$form-floating-padding-x: $input-padding-x !default; +$form-floating-padding-y: 1rem !default; +$form-floating-input-padding-t: 1.625rem !default; +$form-floating-input-padding-b: .625rem !default; +$form-floating-label-opacity: .65 !default; +$form-floating-label-transform: scale(.85) translateY(-.5rem) translateX(.15rem) !default; +$form-floating-transition: opacity .1s ease-in-out, transform .1s ease-in-out !default; // Form validation @@ -820,7 +812,7 @@ $form-feedback-invalid-color: $danger !default; $form-feedback-icon-valid-color: $form-feedback-valid-color !default; $form-feedback-icon-valid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='#{$form-feedback-icon-valid-color}' 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'/></svg>") !default; $form-feedback-icon-invalid-color: $form-feedback-invalid-color !default; -$form-feedback-icon-invalid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='#{$form-feedback-icon-invalid-color}' viewBox='0 0 12 12'><circle cx='6' cy='6' r='4.5'/><path stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/><circle cx='6' cy='8.2' r='.6' fill='#{$form-feedback-icon-invalid-color}' stroke='none'/></svg>") !default; +$form-feedback-icon-invalid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='#{$form-feedback-icon-invalid-color}'><circle cx='6' cy='6' r='4.5'/><path stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/><circle cx='6' cy='8.2' r='.6' fill='#{$form-feedback-icon-invalid-color}' stroke='none'/></svg>") !default; // scss-docs-start form-validation-states $form-validation-states: ( @@ -936,7 +928,7 @@ $dropdown-divider-margin-y: $spacer / 2 !default; $dropdown-box-shadow: $box-shadow !default; $dropdown-link-color: $gray-900 !default; -$dropdown-link-hover-color: darken($gray-900, 5%) !default; +$dropdown-link-hover-color: shade-color($gray-900, 10%) !default; $dropdown-link-hover-bg: $gray-100 !default; $dropdown-link-active-color: $component-active-color !default; @@ -1020,6 +1012,37 @@ $card-img-overlay-padding: $spacer !default; $card-group-margin: $grid-gutter-width / 2 !default; +// Accordion +$accordion-padding-y: 1rem !default; +$accordion-padding-x: 1.25rem !default; +$accordion-color: $body-color !default; +$accordion-bg: transparent !default; +$accordion-border-width: $border-width !default; +$accordion-border-color: rgba($black, .125) !default; +$accordion-border-radius: $border-radius !default; + +$accordion-body-padding-y: $accordion-padding-y !default; +$accordion-body-padding-x: $accordion-padding-x !default; + +$accordion-button-padding-y: $accordion-padding-y !default; +$accordion-button-padding-x: $accordion-padding-x !default; +$accordion-button-color: $accordion-color !default; +$accordion-button-bg: $accordion-bg !default; +$accordion-transition: $btn-transition, border-radius .15s ease !default; +$accordion-button-active-bg: tint-color($component-active-bg, 90%) !default; +$accordion-button-active-color: shade-color($primary, 10%) !default; + +$accordion-button-focus-border-color: $input-focus-border-color !default; +$accordion-button-focus-box-shadow: $btn-focus-box-shadow !default; + +$accordion-icon-width: 1.25rem !default; +$accordion-icon-color: $accordion-color !default; +$accordion-icon-active-color: $accordion-button-active-color !default; +$accordion-icon-transition: transform .2s ease-in-out !default; +$accordion-icon-transform: rotate(180deg) !default; + +$accordion-button-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-color}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>") !default; +$accordion-button-active-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-active-color}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>") !default; // Tooltips @@ -1057,7 +1080,7 @@ $popover-border-radius: $border-radius-lg !default; $popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default; $popover-box-shadow: $box-shadow !default; -$popover-header-bg: darken($popover-bg, 3%) !default; +$popover-header-bg: shade-color($popover-bg, 6%) !default; $popover-header-color: $headings-color !default; $popover-header-padding-y: .5rem !default; $popover-header-padding-x: $spacer !default; @@ -1155,9 +1178,9 @@ $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; +$alert-bg-scale: -80% !default; +$alert-border-scale: -70% !default; +$alert-color-scale: 40% !default; $alert-dismissible-padding-r: $alert-padding-x * 3 !default; // 3x covers width of x plus default padding on either side @@ -1185,8 +1208,8 @@ $list-group-border-radius: $border-radius !default; $list-group-item-padding-y: $spacer / 2 !default; $list-group-item-padding-x: $spacer !default; -$list-group-item-bg-level: -9 !default; -$list-group-item-color-level: 6 !default; +$list-group-item-bg-scale: -80% !default; +$list-group-item-color-scale: 40% !default; $list-group-hover-bg: $gray-100 !default; $list-group-active-color: $component-active-color !default; @@ -1256,8 +1279,8 @@ $carousel-caption-spacer: 1.25rem !default; $carousel-control-icon-width: 2rem !default; -$carousel-control-prev-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 16 16'><path d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/></svg>") !default; -$carousel-control-next-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 16 16'><path d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/></svg>") !default; +$carousel-control-prev-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$carousel-control-color}'><path d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/></svg>") !default; +$carousel-control-next-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$carousel-control-color}'><path d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/></svg>") !default; $carousel-transition-duration: .6s !default; $carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`) @@ -1286,7 +1309,7 @@ $btn-close-height: $btn-close-width !default; $btn-close-padding-x: .25em !default; $btn-close-padding-y: $btn-close-padding-x !default; $btn-close-color: $black !default; -$btn-close-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='#{$btn-close-color}' viewBox='0 0 16 16'><path d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/></svg>") !default; +$btn-close-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$btn-close-color}'><path d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/></svg>") !default; $btn-close-focus-shadow: $input-btn-focus-box-shadow !default; $btn-close-opacity: .5 !default; $btn-close-hover-opacity: .75 !default; diff --git a/assets/stylesheets/bootstrap/bootstrap-utilities.scss b/assets/stylesheets/bootstrap/bootstrap-utilities.scss index 3edb9fd..9ae1684 100644 --- a/assets/stylesheets/bootstrap/bootstrap-utilities.scss +++ b/assets/stylesheets/bootstrap/bootstrap-utilities.scss @@ -1,5 +1,5 @@ /*! - * Bootstrap Utilities v5.0.0-alpha2 (https://getbootstrap.com/) + * Bootstrap Utilities v5.0.0-alpha3 (https://getbootstrap.com/) * Copyright 2011-2020 The Bootstrap Authors * Copyright 2011-2020 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) diff --git a/assets/stylesheets/bootstrap/forms/_floating-labels.scss b/assets/stylesheets/bootstrap/forms/_floating-labels.scss new file mode 100644 index 0000000..8b2e2b8 --- /dev/null +++ b/assets/stylesheets/bootstrap/forms/_floating-labels.scss @@ -0,0 +1,61 @@ +.form-floating { + position: relative; + + > .form-control, + > .form-select { + height: $form-floating-height; + padding: $form-floating-padding-y $form-floating-padding-x; + } + + > label { + position: absolute; + top: 0; + left: 0; + height: 100%; // allow textareas + padding: $form-floating-padding-y $form-floating-padding-x; + pointer-events: none; + border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model + transform-origin: 0 0; + @include transition($form-floating-transition); + } + + // stylelint-disable no-duplicate-selectors + > .form-control { + &::placeholder { + color: transparent; + } + + &:focus, + &:not(:placeholder-shown) { + padding-top: $form-floating-input-padding-t; + padding-bottom: $form-floating-input-padding-b; + } + // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped + &:-webkit-autofill { + padding-top: $form-floating-input-padding-t; + padding-bottom: $form-floating-input-padding-b; + } + } + + > .form-select { + padding-top: $form-floating-input-padding-t; + padding-bottom: $form-floating-input-padding-b; + } + + > .form-control:focus, + > .form-control:not(:placeholder-shown), + > .form-select { + ~ label { + opacity: $form-floating-label-opacity; + transform: $form-floating-label-transform; + } + } + // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped + > .form-control:-webkit-autofill { + ~ label { + opacity: $form-floating-label-opacity; + transform: $form-floating-label-transform; + } + } + // stylelint-enable no-duplicate-selectors +} diff --git a/assets/stylesheets/bootstrap/forms/_form-check.scss b/assets/stylesheets/bootstrap/forms/_form-check.scss index 84e3e57..77af825 100644 --- a/assets/stylesheets/bootstrap/forms/_form-check.scss +++ b/assets/stylesheets/bootstrap/forms/_form-check.scss @@ -53,7 +53,7 @@ &[type="checkbox"] { @if $enable-gradients { - background-image: escape-svg($form-check-input-checked-bg-image), var(--bs-gradient); + background-image: escape-svg($form-check-input-checked-bg-image), var(--#{$variable-prefix}gradient); } @else { background-image: escape-svg($form-check-input-checked-bg-image); } @@ -61,7 +61,7 @@ &[type="radio"] { @if $enable-gradients { - background-image: escape-svg($form-check-radio-checked-bg-image), var(--bs-gradient); + background-image: escape-svg($form-check-radio-checked-bg-image), var(--#{$variable-prefix}gradient); } @else { background-image: escape-svg($form-check-radio-checked-bg-image); } @@ -73,7 +73,7 @@ border-color: $form-check-input-indeterminate-border-color; @if $enable-gradients { - background-image: escape-svg($form-check-input-indeterminate-bg-image), var(--bs-gradient); + background-image: escape-svg($form-check-input-indeterminate-bg-image), var(--#{$variable-prefix}gradient); } @else { background-image: escape-svg($form-check-input-indeterminate-bg-image); } @@ -82,7 +82,7 @@ &:disabled { pointer-events: none; filter: none; - opacity: .5; + opacity: $form-check-input-disabled-opacity; } // Use disabled attribute in addition of :disabled pseudo-class @@ -90,7 +90,7 @@ &[disabled], &:disabled { ~ .form-check-label { - opacity: .5; + opacity: $form-check-label-disabled-opacity; } } } @@ -122,7 +122,7 @@ background-position: $form-switch-checked-bg-position; @if $enable-gradients { - background-image: escape-svg($form-switch-checked-bg-image), var(--bs-gradient); + background-image: escape-svg($form-switch-checked-bg-image), var(--#{$variable-prefix}gradient); } @else { background-image: escape-svg($form-switch-checked-bg-image); } @@ -139,4 +139,13 @@ position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; + + &[disabled], + &:disabled { + + .btn { + pointer-events: none; + filter: none; + opacity: $form-check-btn-check-disabled-opacity; + } + } } diff --git a/assets/stylesheets/bootstrap/forms/_form-control.scss b/assets/stylesheets/bootstrap/forms/_form-control.scss index 6686ecf..bac416f 100644 --- a/assets/stylesheets/bootstrap/forms/_form-control.scss +++ b/assets/stylesheets/bootstrap/forms/_form-control.scss @@ -1,11 +1,10 @@ // -// Textual form controls +// General form controls (plus a few specific high-level interventions) // .form-control { display: block; width: 100%; - min-height: $input-height; padding: $input-padding-y $input-padding-x; font-family: $input-font-family; @include font-size($input-font-size); @@ -23,6 +22,14 @@ @include box-shadow($input-box-shadow); @include transition($input-transition); + &[type="file"] { + overflow: hidden; // prevent pseudo element button overlap + + &:not(:disabled):not([readonly]) { + cursor: pointer; + } + } + // Customize the `:focus` state to imitate native WebKit styles. &:focus { color: $input-focus-color; @@ -37,6 +44,14 @@ } } + // Add some height to date inputs on iOS + // https://github.com/twbs/bootstrap/issues/23307 + // TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved + &::-webkit-date-and-time-value { + // Multiply line-height by 1em if it has no unit + height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height); + } + // Placeholder &::placeholder { color: $input-placeholder-color; @@ -56,6 +71,47 @@ // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655. opacity: 1; } + + // File input buttons theming + // stylelint-disable-next-line selector-pseudo-element-no-unknown + &::file-selector-button { + padding: $input-padding-y $input-padding-x; + margin: (-$input-padding-y) (-$input-padding-x); + margin-inline-end: $input-padding-x; + color: $form-file-button-color; + @include gradient-bg($form-file-button-bg); + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: $input-border-width; + border-radius: 0; // stylelint-disable-line property-disallowed-list + @include transition($btn-transition); + } + + // stylelint-disable-next-line selector-pseudo-element-no-unknown + &:hover:not(:disabled):not([readonly])::file-selector-button { + background-color: $form-file-button-hover-bg; + } + + &::-webkit-file-upload-button { + padding: $input-padding-y $input-padding-x; + margin: (-$input-padding-y) (-$input-padding-x); + margin-inline-end: $input-padding-x; + color: $form-file-button-color; + @include gradient-bg($form-file-button-bg); + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: $input-border-width; + border-radius: 0; // stylelint-disable-line property-disallowed-list + @include transition($btn-transition); + } + + &:hover:not(:disabled):not([readonly])::-webkit-file-upload-button { + background-color: $form-file-button-hover-bg; + } } // Readonly controls as plain text @@ -93,6 +149,19 @@ padding: $input-padding-y-sm $input-padding-x-sm; @include font-size($input-font-size-sm); @include border-radius($input-border-radius-sm); + + // stylelint-disable-next-line selector-pseudo-element-no-unknown + &::file-selector-button { + padding: $input-padding-y-sm $input-padding-x-sm; + margin: (-$input-padding-y-sm) (-$input-padding-x-sm); + margin-inline-end: $input-padding-x-sm; + } + + &::-webkit-file-upload-button { + padding: $input-padding-y-sm $input-padding-x-sm; + margin: (-$input-padding-y-sm) (-$input-padding-x-sm); + margin-inline-end: $input-padding-x-sm; + } } .form-control-lg { @@ -100,17 +169,55 @@ padding: $input-padding-y-lg $input-padding-x-lg; @include font-size($input-font-size-lg); @include border-radius($input-border-radius-lg); + + // stylelint-disable-next-line selector-pseudo-element-no-unknown + &::file-selector-button { + padding: $input-padding-y-lg $input-padding-x-lg; + margin: (-$input-padding-y-lg) (-$input-padding-x-lg); + margin-inline-end: $input-padding-x-lg; + } + + &::-webkit-file-upload-button { + padding: $input-padding-y-lg $input-padding-x-lg; + margin: (-$input-padding-y-lg) (-$input-padding-x-lg); + margin-inline-end: $input-padding-x-lg; + } +} + +// Make sure textareas don't shrink too much when resized +// https://github.com/twbs/bootstrap/pull/29124 +// stylelint-disable selector-no-qualifying-type +textarea { + &.form-control { + min-height: $input-height; + } + + &.form-control-sm { + min-height: $input-height-sm; + } + + &.form-control-lg { + min-height: $input-height-lg; + } } +// stylelint-enable selector-no-qualifying-type .form-control-color { max-width: 3rem; + height: auto; // Override fixed browser height padding: $input-padding-y; -} -.form-control-color::-moz-color-swatch { - @include border-radius($input-border-radius); -} + &:not(:disabled):not([readonly]) { + cursor: pointer; + } + + &::-moz-color-swatch { + height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height); + @include border-radius($input-border-radius); + } -.form-control-color::-webkit-color-swatch { - @include border-radius($input-border-radius); + &::-webkit-color-swatch { + height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height); + @include border-radius($input-border-radius); + } } diff --git a/assets/stylesheets/bootstrap/forms/_form-file.scss b/assets/stylesheets/bootstrap/forms/_form-file.scss deleted file mode 100644 index 5bc4afc..0000000 --- a/assets/stylesheets/bootstrap/forms/_form-file.scss +++ /dev/null @@ -1,91 +0,0 @@ -.form-file { - --bs-form-file-height: #{$form-file-height}; - position: relative; -} - -.form-file-input { - position: relative; - z-index: 2; - width: 100%; - height: var(--bs-form-file-height); - margin: 0; - opacity: 0; - - &:focus-within ~ .form-file-label { - border-color: $form-file-focus-border-color; - box-shadow: $form-file-focus-box-shadow; - } - - // Use disabled attribute in addition of :disabled pseudo-class - // See: https://github.com/twbs/bootstrap/issues/28247 - &[disabled] ~ .form-file-label .form-file-text, - &:disabled ~ .form-file-label .form-file-text { - background-color: $form-file-disabled-bg; - border-color: $form-file-disabled-border-color; - } -} - -.form-file-label { - position: absolute; - top: 0; - right: 0; - left: 0; - z-index: 1; - display: flex; - height: var(--bs-form-file-height); - border-color: $form-file-border-color; - @include border-radius($form-file-border-radius); - @include box-shadow($form-file-box-shadow); -} - -.form-file-text { - display: block; - flex-grow: 1; - padding: $form-file-padding-y $form-file-padding-x; - overflow: hidden; - font-family: $form-file-font-family; - font-weight: $form-file-font-weight; - line-height: $form-file-line-height; - color: $form-file-color; - text-overflow: ellipsis; - white-space: nowrap; - background-color: $form-file-bg; - border-color: inherit; - border-style: solid; - border-width: $form-file-border-width; - @include border-left-radius(inherit); -} - -.form-file-button { - display: block; - flex-shrink: 0; - padding: $form-file-padding-y $form-file-padding-x; - margin-left: -$form-file-border-width; - line-height: $form-file-line-height; - color: $form-file-button-color; - @include gradient-bg($form-file-button-bg); - border-color: inherit; - border-style: solid; - border-width: $form-file-border-width; - @include border-right-radius(inherit); -} - -.form-file-sm { - --bs-form-file-height: #{$form-file-height-sm}; - @include font-size($form-file-font-size-sm); - - .form-file-text, - .form-file-button { - padding: $form-file-padding-y-sm $form-file-padding-x-sm; - } -} - -.form-file-lg { - --bs-form-file-height: #{$form-file-height-lg}; - @include font-size($form-file-font-size-lg); - - .form-file-text, - .form-file-button { - padding: $form-file-padding-y-lg $form-file-padding-x-lg; - } -} diff --git a/assets/stylesheets/bootstrap/forms/_form-range.scss b/assets/stylesheets/bootstrap/forms/_form-range.scss index 6cf9013..b603a7b 100644 --- a/assets/stylesheets/bootstrap/forms/_form-range.scss +++ b/assets/stylesheets/bootstrap/forms/_form-range.scss @@ -18,7 +18,6 @@ // No box-shadow() mixin for focus accessibility. &::-webkit-slider-thumb { box-shadow: $form-range-thumb-focus-box-shadow; } &::-moz-range-thumb { box-shadow: $form-range-thumb-focus-box-shadow; } - &::-ms-thumb { box-shadow: $form-range-thumb-focus-box-shadow; } } &::-moz-focus-outer { @@ -78,46 +77,6 @@ @include box-shadow($form-range-track-box-shadow); } - &::-ms-thumb { - width: $form-range-thumb-width; - height: $form-range-thumb-height; - margin-top: 0; // Edge specific - margin-right: $form-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden. - margin-left: $form-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden. - @include gradient-bg($form-range-thumb-bg); - border: $form-range-thumb-border; - @include border-radius($form-range-thumb-border-radius); - @include box-shadow($form-range-thumb-box-shadow); - @include transition($form-range-thumb-transition); - appearance: none; - - &:active { - @include gradient-bg($form-range-thumb-active-bg); - } - } - - &::-ms-track { - width: $form-range-track-width; - height: $form-range-track-height; - color: transparent; - cursor: $form-range-track-cursor; - background-color: transparent; - border-color: transparent; - border-width: $form-range-thumb-height / 2; - @include box-shadow($form-range-track-box-shadow); - } - - &::-ms-fill-lower { - background-color: $form-range-track-bg; - @include border-radius($form-range-track-border-radius); - } - - &::-ms-fill-upper { - margin-right: 15px; // arbitrary? - background-color: $form-range-track-bg; - @include border-radius($form-range-track-border-radius); - } - &:disabled { pointer-events: none; @@ -128,9 +87,5 @@ &::-moz-range-thumb { background-color: $form-range-thumb-disabled-bg; } - - &::-ms-thumb { - background-color: $form-range-thumb-disabled-bg; - } } } diff --git a/assets/stylesheets/bootstrap/forms/_form-select.scss b/assets/stylesheets/bootstrap/forms/_form-select.scss index e4cab08..1866da9 100644 --- a/assets/stylesheets/bootstrap/forms/_form-select.scss +++ b/assets/stylesheets/bootstrap/forms/_form-select.scss @@ -6,7 +6,6 @@ .form-select { display: block; width: 100%; - height: $form-select-height; padding: $form-select-padding-y ($form-select-padding-x + $form-select-indicator-padding) $form-select-padding-y $form-select-padding-x; font-family: $form-select-font-family; @include font-size($form-select-font-size); @@ -33,21 +32,10 @@ // Avoid using mixin so we can pass custom focus shadow properly box-shadow: $form-select-focus-box-shadow; } - - &::-ms-value { - // For visual consistency with other platforms/browsers, - // suppress the default white text on blue background highlight given to - // the selected option text when the (still closed) <select> receives focus - // in Edge. - // See https://github.com/twbs/bootstrap/issues/19398. - color: $input-color; - background-color: $input-bg; - } } &[multiple], &[size]:not([size="1"]) { - height: auto; padding-right: $form-select-padding-x; background-image: none; } @@ -66,7 +54,6 @@ } .form-select-sm { - height: $form-select-height-sm; padding-top: $form-select-padding-y-sm; padding-bottom: $form-select-padding-y-sm; padding-left: $form-select-padding-x-sm; @@ -74,7 +61,6 @@ } .form-select-lg { - height: $form-select-height-lg; padding-top: $form-select-padding-y-lg; padding-bottom: $form-select-padding-y-lg; padding-left: $form-select-padding-x-lg; diff --git a/assets/stylesheets/bootstrap/forms/_input-group.scss b/assets/stylesheets/bootstrap/forms/_input-group.scss index 7a9a14d..2729ecc 100644 --- a/assets/stylesheets/bootstrap/forms/_input-group.scss +++ b/assets/stylesheets/bootstrap/forms/_input-group.scss @@ -10,8 +10,7 @@ width: 100%; > .form-control, - > .form-select, - > .form-file { + > .form-select { position: relative; // For focus state's z-index flex: 1 1 auto; width: 1%; @@ -20,26 +19,10 @@ // Bring the "active" form control to the top of surrounding elements > .form-control:focus, - > .form-select:focus, - > .form-file .form-file-input:focus ~ .form-file-label { + > .form-select:focus { z-index: 3; } - // Bring the custom file input above the label - > .form-file { - > .form-file-input:focus { - z-index: 4; - } - - &:not(:last-child) > .form-file-label { - @include border-right-radius(0); - } - - &:not(:first-child) > .form-file-label { - @include border-left-radius(0); - } - } - // 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 // as our inputs. @@ -80,14 +63,6 @@ // Remix the default form control sizing classes into new ones for easier // manipulation. -.input-group-lg > .form-control { - min-height: $input-height-lg; -} - -.input-group-lg > .form-select { - height: $input-height-lg; -} - .input-group-lg > .form-control, .input-group-lg > .form-select, .input-group-lg > .input-group-text, @@ -97,14 +72,6 @@ @include border-radius($input-border-radius-lg); } -.input-group-sm > .form-control { - min-height: $input-height-sm; -} - -.input-group-sm > .form-select { - height: $input-height-sm; -} - .input-group-sm > .form-control, .input-group-sm > .form-select, .input-group-sm > .input-group-text, @@ -128,12 +95,26 @@ // stylelint-disable-next-line no-duplicate-selectors .input-group { - > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu), - > .dropdown-toggle:nth-last-child(n + 3) { - @include border-right-radius(0); + &:not(.has-validation) { + > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu), + > .dropdown-toggle:nth-last-child(n + 3) { + @include border-right-radius(0); + } + } + + &.has-validation { + > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu), + > .dropdown-toggle:nth-last-child(n + 4) { + @include border-right-radius(0); + } + } + + $validation-messages: ""; + @each $state in map-keys($form-validation-states) { + $validation-messages: $validation-messages + ":not(." + unquote($state) + "-tooltip)" + ":not(." + unquote($state) + "-feedback)"; } - > :not(:first-child):not(.dropdown-menu) { + > :not(:first-child):not(.dropdown-menu)#{$validation-messages} { margin-left: -$input-border-width; @include border-left-radius(0); } diff --git a/assets/stylesheets/bootstrap/helpers/_colored-links.scss b/assets/stylesheets/bootstrap/helpers/_colored-links.scss index d135194..8c167de 100644 --- a/assets/stylesheets/bootstrap/helpers/_colored-links.scss +++ b/assets/stylesheets/bootstrap/helpers/_colored-links.scss @@ -2,10 +2,10 @@ .link-#{$color} { color: $value; - @if $emphasized-link-hover-darken-percentage != 0 { + @if $link-shade-percentage != 0 { &:hover, &:focus { - color: if(color-contrast($value) == $color-contrast-light, darken($value, $emphasized-link-hover-darken-percentage), lighten($value, $emphasized-link-hover-darken-percentage)); + color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage)); } } } diff --git a/assets/stylesheets/bootstrap/mixins/_alert.scss b/assets/stylesheets/bootstrap/mixins/_alert.scss index 20da83a..99ebbc3 100644 --- a/assets/stylesheets/bootstrap/mixins/_alert.scss +++ b/assets/stylesheets/bootstrap/mixins/_alert.scss @@ -4,6 +4,6 @@ border-color: $border; .alert-link { - color: darken($color, 10%); + color: shade-color($color, 20%); } } diff --git a/assets/stylesheets/bootstrap/mixins/_buttons.scss b/assets/stylesheets/bootstrap/mixins/_buttons.scss index eeade6a..3aabd89 100644 --- a/assets/stylesheets/bootstrap/mixins/_buttons.scss +++ b/assets/stylesheets/bootstrap/mixins/_buttons.scss @@ -7,11 +7,11 @@ $background, $border, $color: color-contrast($background), - $hover-background: if($color == $color-contrast-light, darken($background, 7.5%), lighten($background, 7.5%)), - $hover-border: if($color == $color-contrast-light, darken($border, 10%), lighten($border, 5%)), + $hover-background: if($color == $color-contrast-light, shade-color($background, 15%), tint-color($background, 15%)), + $hover-border: if($color == $color-contrast-light, shade-color($border, 20%), tint-color($border, 10%)), $hover-color: color-contrast($hover-background), - $active-background: if($color == $color-contrast-light, darken($background, 10%), lighten($background, 10%)), - $active-border: if($color == $color-contrast-light, darken($border, 12.5%), lighten($border, 5%)), + $active-background: if($color == $color-contrast-light, shade-color($background, 20%), tint-color($background, 20%)), + $active-border: if($color == $color-contrast-light, shade-color($border, 25%), tint-color($border, 10%)), $active-color: color-contrast($active-background), $disabled-background: $background, $disabled-border: $border, diff --git a/assets/stylesheets/bootstrap/mixins/_forms.scss b/assets/stylesheets/bootstrap/mixins/_forms.scss index 99ca559..9adc0de 100644 --- a/assets/stylesheets/bootstrap/mixins/_forms.scss +++ b/assets/stylesheets/bootstrap/mixins/_forms.scss @@ -114,20 +114,4 @@ margin-left: .5em; } } - - // custom file - .form-file-input { - @include form-validation-state-selector($state) { - ~ .form-file-label { - border-color: $color; - } - - &:focus { - ~ .form-file-label { - border-color: $color; - box-shadow: 0 0 0 $input-focus-width rgba($color, .25); - } - } - } - } } diff --git a/assets/stylesheets/bootstrap/mixins/_gradients.scss b/assets/stylesheets/bootstrap/mixins/_gradients.scss index 8b87c0f..ec38ca1 100644 --- a/assets/stylesheets/bootstrap/mixins/_gradients.scss +++ b/assets/stylesheets/bootstrap/mixins/_gradients.scss @@ -4,7 +4,7 @@ background-color: $color; @if $enable-gradients { - background-image: var(--bs-gradient); + background-image: var(--#{$variable-prefix}gradient); } } diff --git a/assets/stylesheets/bootstrap/mixins/_grid.scss b/assets/stylesheets/bootstrap/mixins/_grid.scss index a229199..92bb88a 100644 --- a/assets/stylesheets/bootstrap/mixins/_grid.scss +++ b/assets/stylesheets/bootstrap/mixins/_grid.scss @@ -3,13 +3,13 @@ // Generate semantic grid columns with these mixins. @mixin make-row($gutter: $grid-gutter-width) { - --bs-gutter-x: #{$gutter}; - --bs-gutter-y: 0; + --#{$variable-prefix}gutter-x: #{$gutter}; + --#{$variable-prefix}gutter-y: 0; display: flex; flex-wrap: wrap; - margin-top: calc(var(--bs-gutter-y) * -1); // stylelint-disable-line function-disallowed-list - margin-right: calc(var(--bs-gutter-x) / -2); // stylelint-disable-line function-disallowed-list - margin-left: calc(var(--bs-gutter-x) / -2); // stylelint-disable-line function-disallowed-list + margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list + margin-right: calc(var(--#{$variable-prefix}gutter-x) / -2); // stylelint-disable-line function-disallowed-list + margin-left: calc(var(--#{$variable-prefix}gutter-x) / -2); // stylelint-disable-line function-disallowed-list } @mixin make-col-ready($gutter: $grid-gutter-width) { @@ -21,9 +21,9 @@ flex-shrink: 0; width: 100%; max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid - padding-right: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-disallowed-list - padding-left: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-disallowed-list - margin-top: var(--bs-gutter-y); + padding-right: calc(var(--#{$variable-prefix}gutter-x) / 2); // stylelint-disable-line function-disallowed-list + padding-left: calc(var(--#{$variable-prefix}gutter-x) / 2); // stylelint-disable-line function-disallowed-list + margin-top: var(--#{$variable-prefix}gutter-y); } @mixin make-col($size, $columns: $grid-columns) { @@ -107,12 +107,12 @@ @each $key, $value in $gutters { .g#{$infix}-#{$key}, .gx#{$infix}-#{$key} { - --bs-gutter-x: #{$value}; + --#{$variable-prefix}gutter-x: #{$value}; } .g#{$infix}-#{$key}, .gy#{$infix}-#{$key} { - --bs-gutter-y: #{$value}; + --#{$variable-prefix}gutter-y: #{$value}; } } } diff --git a/assets/stylesheets/bootstrap/mixins/_list-group.scss b/assets/stylesheets/bootstrap/mixins/_list-group.scss index 965fc4b..351e910 100644 --- a/assets/stylesheets/bootstrap/mixins/_list-group.scss +++ b/assets/stylesheets/bootstrap/mixins/_list-group.scss @@ -9,7 +9,7 @@ &:hover, &:focus { color: $color; - background-color: darken($background, 5%); + background-color: shade-color($background, 10%); } &.active { diff --git a/assets/stylesheets/bootstrap/mixins/_table-variants.scss b/assets/stylesheets/bootstrap/mixins/_table-variants.scss index 89f482c..9fd0fb0 100644 --- a/assets/stylesheets/bootstrap/mixins/_table-variants.scss +++ b/assets/stylesheets/bootstrap/mixins/_table-variants.scss @@ -6,13 +6,13 @@ $striped-bg: mix($color, $background, percentage($table-striped-bg-factor)); $active-bg: mix($color, $background, percentage($table-active-bg-factor)); - --bs-table-bg: #{$background}; - --bs-table-striped-bg: #{$striped-bg}; - --bs-table-striped-color: #{color-contrast($striped-bg)}; - --bs-table-active-bg: #{$active-bg}; - --bs-table-active-color: #{color-contrast($active-bg)}; - --bs-table-hover-bg: #{$hover-bg}; - --bs-table-hover-color: #{color-contrast($hover-bg)}; + --#{$variable-prefix}table-bg: #{$background}; + --#{$variable-prefix}table-striped-bg: #{$striped-bg}; + --#{$variable-prefix}table-striped-color: #{color-contrast($striped-bg)}; + --#{$variable-prefix}table-active-bg: #{$active-bg}; + --#{$variable-prefix}table-active-color: #{color-contrast($active-bg)}; + --#{$variable-prefix}table-hover-bg: #{$hover-bg}; + --#{$variable-prefix}table-hover-color: #{color-contrast($hover-bg)}; color: $color; border-color: mix($color, $background, percentage($table-border-factor)); |