diff --git a/src/assets/scss/dashboard/bootstrap/_card.scss b/src/assets/scss/dashboard/bootstrap/_card.scss index 4c4845c0b..c4b9a725d 100755 --- a/src/assets/scss/dashboard/bootstrap/_card.scss +++ b/src/assets/scss/dashboard/bootstrap/_card.scss @@ -268,3 +268,32 @@ } } } + + +// +// Accordion +// + +.accordion { + .card:not(:first-of-type):not(:last-of-type) { + border-bottom: 0; + border-radius: 0; + } + + .card:not(:first-of-type) { + .card-header:first-child { + border-radius: 0; + } + } + + .card:first-of-type { + border-bottom: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .card:last-of-type { + border-top-left-radius: 0; + border-top-right-radius: 0; + } +} diff --git a/src/assets/scss/dashboard/bootstrap/_carousel.scss b/src/assets/scss/dashboard/bootstrap/_carousel.scss index 72a503445..3b048e0d1 100755 --- a/src/assets/scss/dashboard/bootstrap/_carousel.scss +++ b/src/assets/scss/dashboard/bootstrap/_carousel.scss @@ -1,4 +1,13 @@ -// Wrapper for the slide container and indicators +// Notes on the classes: +// +// 1. The .carousel-item-left and .carousel-item-right is used to indicate where +// the active slide is heading. +// 2. .active.carousel-item is the current slide. +// 3. .active.carousel-item-left and .active.carousel-item-right is the current +// slide in it's in-transition state. Only one of these occur at a time. +// 4. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right +// is the upcoming slide in transition. + .carousel { position: relative; } @@ -31,7 +40,6 @@ top: 0; } -// CSS3 transforms when supported by the browser .carousel-item-next.carousel-item-left, .carousel-item-prev.carousel-item-right { transform: translateX(0); @@ -60,6 +68,42 @@ } +// +// Alternate transitions +// + +.carousel-fade { + .carousel-item { + opacity: 0; + transition-duration: .6s; + transition-property: opacity; + } + + .carousel-item.active, + .carousel-item-next.carousel-item-left, + .carousel-item-prev.carousel-item-right { + opacity: 1; + } + + .active.carousel-item-left, + .active.carousel-item-right { + opacity: 0; + } + + .carousel-item-next, + .carousel-item-prev, + .carousel-item.active, + .active.carousel-item-left, + .active.carousel-item-prev { + transform: translateX(0); + + @supports (transform-style: preserve-3d) { + transform: translate3d(0, 0, 0); + } + } +} + + // // Left/right controls for nav // diff --git a/src/assets/scss/dashboard/bootstrap/_custom-forms.scss b/src/assets/scss/dashboard/bootstrap/_custom-forms.scss index 2d83f7ea6..27de8769a 100755 --- a/src/assets/scss/dashboard/bootstrap/_custom-forms.scss +++ b/src/assets/scss/dashboard/bootstrap/_custom-forms.scss @@ -295,3 +295,126 @@ @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0); } } + +// Range +// +// Style range inputs the same across browsers. Vendor-specific rules for psuedo +// elements cannot be mixed. As such, there are no shared styles for focus or +// active states on prefixed selectors. + +.custom-range { + width: 100%; + padding-left: 0; // Firefox specific + background-color: transparent; + appearance: none; + + &:focus { + outline: none; + } + + &::-moz-focus-outer { + border: 0; + } + + &::-webkit-slider-thumb { + width: $custom-range-thumb-width; + height: $custom-range-thumb-height; + margin-top: -($custom-range-thumb-width * .25); // Webkit specific? + @include gradient-bg($custom-range-thumb-bg); + border: $custom-range-thumb-border; + @include border-radius($custom-range-thumb-border-radius); + @include box-shadow($custom-range-thumb-box-shadow); + appearance: none; + + &:focus { + outline: none; + box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility + } + + &:active { + @include gradient-bg($custom-range-thumb-active-bg); + } + } + + &::-webkit-slider-runnable-track { + width: $custom-range-track-width; + height: $custom-range-track-height; + color: transparent; // Why? + cursor: $custom-range-track-cursor; + background-color: $custom-range-track-bg; + border-color: transparent; + @include border-radius($custom-range-track-border-radius); + @include box-shadow($custom-range-track-box-shadow); + } + + &::-moz-range-thumb { + width: $custom-range-thumb-width; + height: $custom-range-thumb-height; + @include gradient-bg($custom-range-thumb-bg); + border: $custom-range-thumb-border; + @include border-radius($custom-range-thumb-border-radius); + @include box-shadow($custom-range-thumb-box-shadow); + appearance: none; + + &:focus { + outline: none; + box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility + } + + &:active { + @include gradient-bg($custom-range-thumb-active-bg); + } + } + + &::-moz-range-track { + width: $custom-range-track-width; + height: $custom-range-track-height; + color: transparent; + cursor: $custom-range-track-cursor; + background-color: $custom-range-track-bg; + border-color: transparent; // Firefox specific? + @include border-radius($custom-range-track-border-radius); + @include box-shadow($custom-range-track-box-shadow); + } + + &::-ms-thumb { + width: $custom-range-thumb-width; + height: $custom-range-thumb-height; + @include gradient-bg($custom-range-thumb-bg); + border: $custom-range-thumb-border; + @include border-radius($custom-range-thumb-border-radius); + @include box-shadow($custom-range-thumb-box-shadow); + appearance: none; + + &:focus { + outline: none; + box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility + } + + &:active { + @include gradient-bg($custom-range-thumb-active-bg); + } + } + + &::-ms-track { + width: $custom-range-track-width; + height: $custom-range-track-height; + color: transparent; + cursor: $custom-range-track-cursor; + background-color: transparent; + border-color: transparent; + border-width: ($custom-range-thumb-height * .5); + @include box-shadow($custom-range-track-box-shadow); + } + + &::-ms-fill-lower { + background-color: $custom-range-track-bg; + @include border-radius($custom-range-track-border-radius); + } + + &::-ms-fill-upper { + margin-right: 15px; // arbitrary? + background-color: $custom-range-track-bg; + @include border-radius($custom-range-track-border-radius); + } +} diff --git a/src/assets/scss/dashboard/bootstrap/_dropdown.scss b/src/assets/scss/dashboard/bootstrap/_dropdown.scss index a9d4cfed2..8d96c1ba6 100755 --- a/src/assets/scss/dashboard/bootstrap/_dropdown.scss +++ b/src/assets/scss/dashboard/bootstrap/_dropdown.scss @@ -129,3 +129,10 @@ color: $dropdown-header-color; white-space: nowrap; // as with > li > a } + +// Dropdown text +.dropdown-item-text { + display: block; + padding: $dropdown-item-padding-y $dropdown-item-padding-x; + color: $dropdown-link-color; +} diff --git a/src/assets/scss/dashboard/bootstrap/_forms.scss b/src/assets/scss/dashboard/bootstrap/_forms.scss index b0954f8c2..c079bd5c4 100755 --- a/src/assets/scss/dashboard/bootstrap/_forms.scss +++ b/src/assets/scss/dashboard/bootstrap/_forms.scss @@ -121,6 +121,7 @@ select.form-control { padding-bottom: $input-padding-y; margin-bottom: 0; // match inputs if this class comes on inputs with default margins line-height: $input-line-height; + color: $input-plaintext-color; background-color: transparent; border: solid transparent; border-width: $input-border-width 0; @@ -302,7 +303,8 @@ select.form-control-lg { display: inline-block; } - .input-group { + .input-group, + .custom-select { width: auto; } diff --git a/src/assets/scss/dashboard/bootstrap/_functions.scss b/src/assets/scss/dashboard/bootstrap/_functions.scss index 1266d34bd..b44d7d998 100755 --- a/src/assets/scss/dashboard/bootstrap/_functions.scss +++ b/src/assets/scss/dashboard/bootstrap/_functions.scss @@ -79,7 +79,7 @@ // Request a theme color level @function theme-color-level($color-name: "primary", $level: 0) { $color: theme-color($color-name); - $color-base: if($level > 0, #000, #fff); + $color-base: if($level > 0, $black, $white); $level: abs($level); @return mix($color-base, $color, $level * $theme-color-interval); diff --git a/src/assets/scss/dashboard/bootstrap/_input-group.scss b/src/assets/scss/dashboard/bootstrap/_input-group.scss index 2f7b05d5d..78d7bc99a 100755 --- a/src/assets/scss/dashboard/bootstrap/_input-group.scss +++ b/src/assets/scss/dashboard/bootstrap/_input-group.scss @@ -46,9 +46,9 @@ align-items: center; &:not(:last-child) .custom-file-label, - &:not(:last-child) .custom-file-label::before { @include border-right-radius(0); } + &:not(:last-child) .custom-file-label::after { @include border-right-radius(0); } &:not(:first-child) .custom-file-label, - &:not(:first-child) .custom-file-label::before { @include border-left-radius(0); } + &:not(:first-child) .custom-file-label::after { @include border-left-radius(0); } } } diff --git a/src/assets/scss/dashboard/bootstrap/_pagination.scss b/src/assets/scss/dashboard/bootstrap/_pagination.scss index 959b2eb4b..e610d27e2 100755 --- a/src/assets/scss/dashboard/bootstrap/_pagination.scss +++ b/src/assets/scss/dashboard/bootstrap/_pagination.scss @@ -15,6 +15,7 @@ border: $pagination-border-width solid $pagination-border-color; &:hover { + z-index: 2; color: $pagination-hover-color; text-decoration: none; background-color: $pagination-hover-bg; diff --git a/src/assets/scss/dashboard/bootstrap/_progress.scss b/src/assets/scss/dashboard/bootstrap/_progress.scss index a58111689..0ac3e0c93 100755 --- a/src/assets/scss/dashboard/bootstrap/_progress.scss +++ b/src/assets/scss/dashboard/bootstrap/_progress.scss @@ -19,6 +19,7 @@ justify-content: center; color: $progress-bar-color; text-align: center; + white-space: nowrap; background-color: $progress-bar-bg; @include transition($progress-bar-transition); } diff --git a/src/assets/scss/dashboard/bootstrap/_reboot.scss b/src/assets/scss/dashboard/bootstrap/_reboot.scss index c79fa4740..5ee563f93 100755 --- a/src/assets/scss/dashboard/bootstrap/_reboot.scss +++ b/src/assets/scss/dashboard/bootstrap/_reboot.scss @@ -290,7 +290,7 @@ table { caption { padding-top: $table-cell-padding; padding-bottom: $table-cell-padding; - color: $text-muted; + color: $table-caption-color; text-align: left; caption-side: bottom; } @@ -309,7 +309,7 @@ th { label { // Allow labels to use `margin` for spacing. display: inline-block; - margin-bottom: .5rem; + margin-bottom: $label-margin-bottom; } // Remove the default `border-radius` that macOS Chrome adds. diff --git a/src/assets/scss/dashboard/bootstrap/_tables.scss b/src/assets/scss/dashboard/bootstrap/_tables.scss index 0e3b1198e..b32732f23 100755 --- a/src/assets/scss/dashboard/bootstrap/_tables.scss +++ b/src/assets/scss/dashboard/bootstrap/_tables.scss @@ -42,9 +42,9 @@ } -// Bordered version +// Border versions // -// Add borders all around the table and between all the columns. +// Add or remove borders all around the table and between all the columns. .table-bordered { border: $table-border-width solid $table-border-color; @@ -62,13 +62,21 @@ } } +.table-borderless { + th, + td, + thead th, + tbody + tbody { + border: 0; + } +} // Zebra-striping // // Default zebra-stripe styles (alternating gray and transparent backgrounds) .table-striped { - tbody tr:nth-of-type(odd) { + tbody tr:nth-of-type(#{$table-striped-order}) { background-color: $table-accent-bg; } } diff --git a/src/assets/scss/dashboard/bootstrap/_variables.scss b/src/assets/scss/dashboard/bootstrap/_variables.scss index be580deb3..11f325530 100755 --- a/src/assets/scss/dashboard/bootstrap/_variables.scss +++ b/src/assets/scss/dashboard/bootstrap/_variables.scss @@ -132,7 +132,8 @@ $sizes: map-merge(( 25: 25%, 50: 50%, 75: 75%, - 100: 100% + 100: 100%, + auto: auto ), $sizes); // stylelint-enable @@ -317,6 +318,9 @@ $table-dark-hover-bg: rgba($white, .075) !default; $table-dark-border-color: lighten($gray-900, 7.5%) !default; $table-dark-color: $body-bg !default; +$table-striped-order: odd !default; + +$table-caption-color: $text-muted !default; // Buttons + Forms // @@ -380,6 +384,8 @@ $btn-transition: color .15s ease-in-out, background-color .15s ease // Forms +$label-margin-bottom: .5rem !default; + $input-padding-y: $input-btn-padding-y !default; $input-padding-x: $input-btn-padding-x !default; $input-line-height: $input-btn-line-height !default; @@ -411,6 +417,7 @@ $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-plaintext-color: $body-color !default; $input-height-border: $input-border-width * 2 !default; @@ -480,7 +487,7 @@ $custom-select-indicator-padding: 1rem !default; // Extra padding to account f $custom-select-line-height: $input-btn-line-height !default; $custom-select-color: $input-color !default; $custom-select-disabled-color: $gray-600 !default; -$custom-select-bg: $white !default; +$custom-select-bg: $input-bg !default; $custom-select-disabled-bg: $gray-200 !default; $custom-select-bg-size: 8px 10px !default; // In pixels because image dimensions $custom-select-indicator-color: $gray-800 !default; @@ -498,6 +505,22 @@ $custom-select-height-sm: $input-height-sm !default; $custom-select-font-size-lg: 125% !default; $custom-select-height-lg: $input-height-lg !default; +$custom-range-track-width: 100% !default; +$custom-range-track-height: .5rem !default; +$custom-range-track-cursor: pointer !default; +$custom-range-track-bg: $gray-300 !default; +$custom-range-track-border-radius: 1rem !default; +$custom-range-track-box-shadow: inset 0 .25rem .25rem rgba($black, .1) !default; + +$custom-range-thumb-width: 1rem !default; +$custom-range-thumb-height: $custom-range-thumb-width !default; +$custom-range-thumb-bg: $component-active-bg !default; +$custom-range-thumb-border: 0 !default; +$custom-range-thumb-border-radius: 1rem !default; +$custom-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default; +$custom-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default; +$custom-range-thumb-active-bg: lighten($component-active-bg, 35%) !default; + $custom-file-height: $input-height !default; $custom-file-focus-border-color: $input-focus-border-color !default; $custom-file-focus-box-shadow: $input-btn-focus-box-shadow !default; @@ -585,6 +608,8 @@ $nav-pills-border-radius: $border-radius !default; $nav-pills-link-active-color: $component-active-color !default; $nav-pills-link-active-bg: $component-active-bg !default; +$nav-divider-margin-y: ($spacer / 2) !default; + // Navbar $navbar-padding-y: ($spacer / 2) !default; @@ -864,7 +889,7 @@ $carousel-control-icon-width: 20px !default; $carousel-control-prev-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"), "#", "%23") !default; $carousel-control-next-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"), "#", "%23") !default; -$carousel-transition: transform .6s ease !default; +$carousel-transition: transform .6s ease !default; // Define transform transition first if using multiple transitons (e.g., `transform 2s ease, opacity .5s ease-out`) // Close diff --git a/src/assets/scss/dashboard/bootstrap/mixins/_hover.scss b/src/assets/scss/dashboard/bootstrap/mixins/_hover.scss index ec2e328a4..57823e34b 100755 --- a/src/assets/scss/dashboard/bootstrap/mixins/_hover.scss +++ b/src/assets/scss/dashboard/bootstrap/mixins/_hover.scss @@ -1,9 +1,7 @@ -// 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 +// 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 diff --git a/src/assets/scss/dashboard/bootstrap/mixins/_nav-divider.scss b/src/assets/scss/dashboard/bootstrap/mixins/_nav-divider.scss index 493de03a3..3505d412f 100755 --- a/src/assets/scss/dashboard/bootstrap/mixins/_nav-divider.scss +++ b/src/assets/scss/dashboard/bootstrap/mixins/_nav-divider.scss @@ -2,9 +2,9 @@ // // Dividers (basically an hr) within dropdowns and nav lists -@mixin nav-divider($color: #e5e5e5) { +@mixin nav-divider($color: #e5e5e5, $margin-y: $nav-divider-margin-y) { height: 0; - margin: ($spacer / 2) 0; + margin: $margin-y 0; overflow: hidden; border-top: 1px solid $color; } diff --git a/src/assets/scss/dashboard/bootstrap/mixins/_screen-reader.scss b/src/assets/scss/dashboard/bootstrap/mixins/_screen-reader.scss index 8f3eb1b19..f9cd35cff 100755 --- a/src/assets/scss/dashboard/bootstrap/mixins/_screen-reader.scss +++ b/src/assets/scss/dashboard/bootstrap/mixins/_screen-reader.scss @@ -11,7 +11,6 @@ overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; - clip-path: inset(50%); border: 0; } @@ -30,6 +29,5 @@ overflow: visible; clip: auto; white-space: normal; - clip-path: none; } } diff --git a/src/assets/scss/dashboard/bootstrap/utilities/_flex.scss b/src/assets/scss/dashboard/bootstrap/utilities/_flex.scss index 8e4703843..1f898c1b1 100755 --- a/src/assets/scss/dashboard/bootstrap/utilities/_flex.scss +++ b/src/assets/scss/dashboard/bootstrap/utilities/_flex.scss @@ -16,6 +16,7 @@ .flex#{$infix}-wrap { flex-wrap: wrap !important; } .flex#{$infix}-nowrap { flex-wrap: nowrap !important; } .flex#{$infix}-wrap-reverse { flex-wrap: wrap-reverse !important; } + .flex#{$infix}-fill { flex: 1 1 auto !important; } .justify-content#{$infix}-start { justify-content: flex-start !important; } .justify-content#{$infix}-end { justify-content: flex-end !important; } diff --git a/src/assets/scss/dashboard/bootstrap/utilities/_position.scss b/src/assets/scss/dashboard/bootstrap/utilities/_position.scss index ef962eddb..9ecdeeb9b 100755 --- a/src/assets/scss/dashboard/bootstrap/utilities/_position.scss +++ b/src/assets/scss/dashboard/bootstrap/utilities/_position.scss @@ -3,6 +3,7 @@ // Common values // Sass list not in variables since it's not intended for customization. +// stylelint-disable-next-line scss/dollar-variable-default $positions: static, relative, absolute, fixed, sticky; @each $position in $positions {