forked from fleg/hswro_org
update to bootstrap 5.3.2
This commit is contained in:
parent
03b84d43f4
commit
a323305ac5
2
Gemfile
2
Gemfile
|
@ -1,5 +1,5 @@
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "webrick", "~> 1.7"
|
gem "webrick", "~> 1.7"
|
||||||
gem "jekyll", "~> 4.2"
|
gem "jekyll", "~> 4.3"
|
||||||
gem "jekyll-environment-variables"
|
gem "jekyll-environment-variables"
|
|
@ -0,0 +1,158 @@
|
||||||
|
//
|
||||||
|
// Base styles
|
||||||
|
//
|
||||||
|
|
||||||
|
.accordion {
|
||||||
|
// scss-docs-start accordion-css-vars
|
||||||
|
--#{$prefix}accordion-color: #{$accordion-color};
|
||||||
|
--#{$prefix}accordion-bg: #{$accordion-bg};
|
||||||
|
--#{$prefix}accordion-transition: #{$accordion-transition};
|
||||||
|
--#{$prefix}accordion-border-color: #{$accordion-border-color};
|
||||||
|
--#{$prefix}accordion-border-width: #{$accordion-border-width};
|
||||||
|
--#{$prefix}accordion-border-radius: #{$accordion-border-radius};
|
||||||
|
--#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
|
||||||
|
--#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x};
|
||||||
|
--#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
|
||||||
|
--#{$prefix}accordion-btn-color: #{$accordion-button-color};
|
||||||
|
--#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
|
||||||
|
--#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
|
||||||
|
--#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width};
|
||||||
|
--#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform};
|
||||||
|
--#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition};
|
||||||
|
--#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)};
|
||||||
|
--#{$prefix}accordion-btn-focus-border-color: #{$accordion-button-focus-border-color};
|
||||||
|
--#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow};
|
||||||
|
--#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x};
|
||||||
|
--#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y};
|
||||||
|
--#{$prefix}accordion-active-color: #{$accordion-button-active-color};
|
||||||
|
--#{$prefix}accordion-active-bg: #{$accordion-button-active-bg};
|
||||||
|
// scss-docs-end accordion-css-vars
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-button {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x);
|
||||||
|
@include font-size($font-size-base);
|
||||||
|
color: var(--#{$prefix}accordion-btn-color);
|
||||||
|
text-align: left; // Reset button style
|
||||||
|
background-color: var(--#{$prefix}accordion-btn-bg);
|
||||||
|
border: 0;
|
||||||
|
@include border-radius(0);
|
||||||
|
overflow-anchor: none;
|
||||||
|
@include transition(var(--#{$prefix}accordion-transition));
|
||||||
|
|
||||||
|
&:not(.collapsed) {
|
||||||
|
color: var(--#{$prefix}accordion-active-color);
|
||||||
|
background-color: var(--#{$prefix}accordion-active-bg);
|
||||||
|
box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
background-image: var(--#{$prefix}accordion-btn-active-icon);
|
||||||
|
transform: var(--#{$prefix}accordion-btn-icon-transform);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Accordion icon
|
||||||
|
&::after {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: var(--#{$prefix}accordion-btn-icon-width);
|
||||||
|
height: var(--#{$prefix}accordion-btn-icon-width);
|
||||||
|
margin-left: auto;
|
||||||
|
content: "";
|
||||||
|
background-image: var(--#{$prefix}accordion-btn-icon);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: var(--#{$prefix}accordion-btn-icon-width);
|
||||||
|
@include transition(var(--#{$prefix}accordion-btn-icon-transition));
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
z-index: 3;
|
||||||
|
border-color: var(--#{$prefix}accordion-btn-focus-border-color);
|
||||||
|
outline: 0;
|
||||||
|
box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-header {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-item {
|
||||||
|
color: var(--#{$prefix}accordion-color);
|
||||||
|
background-color: var(--#{$prefix}accordion-bg);
|
||||||
|
border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color);
|
||||||
|
|
||||||
|
&:first-of-type {
|
||||||
|
@include border-top-radius(var(--#{$prefix}accordion-border-radius));
|
||||||
|
|
||||||
|
.accordion-button {
|
||||||
|
@include border-top-radius(var(--#{$prefix}accordion-inner-border-radius));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:first-of-type) {
|
||||||
|
border-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only set a border-radius on the last item if the accordion is collapsed
|
||||||
|
&:last-of-type {
|
||||||
|
@include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
|
||||||
|
|
||||||
|
.accordion-button {
|
||||||
|
&.collapsed {
|
||||||
|
@include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-collapse {
|
||||||
|
@include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-body {
|
||||||
|
padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Flush accordion items
|
||||||
|
//
|
||||||
|
// Remove borders and border-radius to keep accordion items edge-to-edge.
|
||||||
|
|
||||||
|
.accordion-flush {
|
||||||
|
.accordion-collapse {
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-item {
|
||||||
|
border-right: 0;
|
||||||
|
border-left: 0;
|
||||||
|
@include border-radius(0);
|
||||||
|
|
||||||
|
&:first-child { border-top: 0; }
|
||||||
|
&:last-child { border-bottom: 0; }
|
||||||
|
|
||||||
|
.accordion-button {
|
||||||
|
&,
|
||||||
|
&.collapsed {
|
||||||
|
@include border-radius(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $enable-dark-mode {
|
||||||
|
@include color-mode(dark) {
|
||||||
|
.accordion-button::after {
|
||||||
|
--#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon-dark)};
|
||||||
|
--#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon-dark)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,11 +3,25 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
.alert {
|
.alert {
|
||||||
|
// scss-docs-start alert-css-vars
|
||||||
|
--#{$prefix}alert-bg: transparent;
|
||||||
|
--#{$prefix}alert-padding-x: #{$alert-padding-x};
|
||||||
|
--#{$prefix}alert-padding-y: #{$alert-padding-y};
|
||||||
|
--#{$prefix}alert-margin-bottom: #{$alert-margin-bottom};
|
||||||
|
--#{$prefix}alert-color: inherit;
|
||||||
|
--#{$prefix}alert-border-color: transparent;
|
||||||
|
--#{$prefix}alert-border: #{$alert-border-width} solid var(--#{$prefix}alert-border-color);
|
||||||
|
--#{$prefix}alert-border-radius: #{$alert-border-radius};
|
||||||
|
--#{$prefix}alert-link-color: inherit;
|
||||||
|
// scss-docs-end alert-css-vars
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: $alert-padding-y $alert-padding-x;
|
padding: var(--#{$prefix}alert-padding-y) var(--#{$prefix}alert-padding-x);
|
||||||
margin-bottom: $alert-margin-bottom;
|
margin-bottom: var(--#{$prefix}alert-margin-bottom);
|
||||||
border: $alert-border-width solid transparent;
|
color: var(--#{$prefix}alert-color);
|
||||||
@include border-radius($alert-border-radius);
|
background-color: var(--#{$prefix}alert-bg);
|
||||||
|
border: var(--#{$prefix}alert-border);
|
||||||
|
@include border-radius(var(--#{$prefix}alert-border-radius));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Headings for larger alerts
|
// Headings for larger alerts
|
||||||
|
@ -19,6 +33,7 @@
|
||||||
// Provide class for links that match alerts
|
// Provide class for links that match alerts
|
||||||
.alert-link {
|
.alert-link {
|
||||||
font-weight: $alert-link-font-weight;
|
font-weight: $alert-link-font-weight;
|
||||||
|
color: var(--#{$prefix}alert-link-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,26 +42,27 @@
|
||||||
// Expand the right padding and account for the close button's positioning.
|
// Expand the right padding and account for the close button's positioning.
|
||||||
|
|
||||||
.alert-dismissible {
|
.alert-dismissible {
|
||||||
padding-right: $close-font-size + $alert-padding-x * 2;
|
padding-right: $alert-dismissible-padding-r;
|
||||||
|
|
||||||
// Adjust close link position
|
// Adjust close link position
|
||||||
.close {
|
.btn-close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 2;
|
z-index: $stretched-link-z-index + 1;
|
||||||
padding: $alert-padding-y $alert-padding-x;
|
padding: $alert-padding-y * 1.25 $alert-padding-x;
|
||||||
color: inherit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Alternate styles
|
// scss-docs-start alert-modifiers
|
||||||
//
|
// Generate contextual modifier classes for colorizing the alert
|
||||||
// Generate contextual modifier classes for colorizing the alert.
|
@each $state in map-keys($theme-colors) {
|
||||||
|
.alert-#{$state} {
|
||||||
@each $color, $value in $theme-colors {
|
--#{$prefix}alert-color: var(--#{$prefix}#{$state}-text-emphasis);
|
||||||
.alert-#{$color} {
|
--#{$prefix}alert-bg: var(--#{$prefix}#{$state}-bg-subtle);
|
||||||
@include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
|
--#{$prefix}alert-border-color: var(--#{$prefix}#{$state}-border-subtle);
|
||||||
|
--#{$prefix}alert-link-color: var(--#{$prefix}#{$state}-text-emphasis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end alert-modifiers
|
||||||
|
|
|
@ -4,22 +4,26 @@
|
||||||
// `background-color`.
|
// `background-color`.
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
|
// scss-docs-start badge-css-vars
|
||||||
|
--#{$prefix}badge-padding-x: #{$badge-padding-x};
|
||||||
|
--#{$prefix}badge-padding-y: #{$badge-padding-y};
|
||||||
|
@include rfs($badge-font-size, --#{$prefix}badge-font-size);
|
||||||
|
--#{$prefix}badge-font-weight: #{$badge-font-weight};
|
||||||
|
--#{$prefix}badge-color: #{$badge-color};
|
||||||
|
--#{$prefix}badge-border-radius: #{$badge-border-radius};
|
||||||
|
// scss-docs-end badge-css-vars
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: $badge-padding-y $badge-padding-x;
|
padding: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x);
|
||||||
@include font-size($badge-font-size);
|
@include font-size(var(--#{$prefix}badge-font-size));
|
||||||
font-weight: $badge-font-weight;
|
font-weight: var(--#{$prefix}badge-font-weight);
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
color: var(--#{$prefix}badge-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
@include border-radius($badge-border-radius);
|
@include border-radius(var(--#{$prefix}badge-border-radius));
|
||||||
@include transition($badge-transition);
|
@include gradient-bg();
|
||||||
|
|
||||||
@at-root a#{&} {
|
|
||||||
@include hover-focus() {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Empty badges collapse automatically
|
// Empty badges collapse automatically
|
||||||
&:empty {
|
&:empty {
|
||||||
|
@ -32,23 +36,3 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -1px;
|
top: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pill badges
|
|
||||||
//
|
|
||||||
// Make them extra rounded with a modifier to replace v3's badges.
|
|
||||||
|
|
||||||
.badge-pill {
|
|
||||||
padding-right: $badge-pill-padding-x;
|
|
||||||
padding-left: $badge-pill-padding-x;
|
|
||||||
@include border-radius($badge-pill-border-radius);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Colors
|
|
||||||
//
|
|
||||||
// Contextual variations (linked badges get darker on :hover).
|
|
||||||
|
|
||||||
@each $color, $value in $theme-colors {
|
|
||||||
.badge-#{$color} {
|
|
||||||
@include badge-variant($value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,42 +1,40 @@
|
||||||
.breadcrumb {
|
.breadcrumb {
|
||||||
|
// scss-docs-start breadcrumb-css-vars
|
||||||
|
--#{$prefix}breadcrumb-padding-x: #{$breadcrumb-padding-x};
|
||||||
|
--#{$prefix}breadcrumb-padding-y: #{$breadcrumb-padding-y};
|
||||||
|
--#{$prefix}breadcrumb-margin-bottom: #{$breadcrumb-margin-bottom};
|
||||||
|
@include rfs($breadcrumb-font-size, --#{$prefix}breadcrumb-font-size);
|
||||||
|
--#{$prefix}breadcrumb-bg: #{$breadcrumb-bg};
|
||||||
|
--#{$prefix}breadcrumb-border-radius: #{$breadcrumb-border-radius};
|
||||||
|
--#{$prefix}breadcrumb-divider-color: #{$breadcrumb-divider-color};
|
||||||
|
--#{$prefix}breadcrumb-item-padding-x: #{$breadcrumb-item-padding-x};
|
||||||
|
--#{$prefix}breadcrumb-item-active-color: #{$breadcrumb-active-color};
|
||||||
|
// scss-docs-end breadcrumb-css-vars
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
|
padding: var(--#{$prefix}breadcrumb-padding-y) var(--#{$prefix}breadcrumb-padding-x);
|
||||||
margin-bottom: $breadcrumb-margin-bottom;
|
margin-bottom: var(--#{$prefix}breadcrumb-margin-bottom);
|
||||||
@include font-size($breadcrumb-font-size);
|
@include font-size(var(--#{$prefix}breadcrumb-font-size));
|
||||||
list-style: none;
|
list-style: none;
|
||||||
background-color: $breadcrumb-bg;
|
background-color: var(--#{$prefix}breadcrumb-bg);
|
||||||
@include border-radius($breadcrumb-border-radius);
|
@include border-radius(var(--#{$prefix}breadcrumb-border-radius));
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb-item {
|
.breadcrumb-item {
|
||||||
// The separator between breadcrumbs (by default, a forward-slash: "/")
|
// The separator between breadcrumbs (by default, a forward-slash: "/")
|
||||||
+ .breadcrumb-item {
|
+ .breadcrumb-item {
|
||||||
padding-left: $breadcrumb-item-padding;
|
padding-left: var(--#{$prefix}breadcrumb-item-padding-x);
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
float: left; // Suppress inline spacings and underlining of the separator
|
float: left; // Suppress inline spacings and underlining of the separator
|
||||||
padding-right: $breadcrumb-item-padding;
|
padding-right: var(--#{$prefix}breadcrumb-item-padding-x);
|
||||||
color: $breadcrumb-divider-color;
|
color: var(--#{$prefix}breadcrumb-divider-color);
|
||||||
content: escape-svg($breadcrumb-divider);
|
content: var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
|
|
||||||
// without `<ul>`s. The `::before` pseudo-element generates an element
|
|
||||||
// *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
|
|
||||||
//
|
|
||||||
// To trick IE into suppressing the underline, we give the pseudo-element an
|
|
||||||
// underline and then immediately remove it.
|
|
||||||
+ .breadcrumb-item:hover::before {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
// stylelint-disable-next-line no-duplicate-selectors
|
|
||||||
+ .breadcrumb-item:hover::before {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
color: $breadcrumb-active-color;
|
color: var(--#{$prefix}breadcrumb-item-active-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// stylelint-disable selector-no-qualifying-type
|
|
||||||
|
|
||||||
// Make the div behave like a button
|
// Make the div behave like a button
|
||||||
.btn-group,
|
.btn-group,
|
||||||
.btn-group-vertical {
|
.btn-group-vertical {
|
||||||
|
@ -10,18 +8,18 @@
|
||||||
> .btn {
|
> .btn {
|
||||||
position: relative;
|
position: relative;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
// Bring the hover, focused, and "active" buttons to the front to overlay
|
// Bring the hover, focused, and "active" buttons to the front to overlay
|
||||||
// the borders properly
|
// the borders properly
|
||||||
@include hover() {
|
> .btn-check:checked + .btn,
|
||||||
|
> .btn-check:focus + .btn,
|
||||||
|
> .btn:hover,
|
||||||
|
> .btn:focus,
|
||||||
|
> .btn:active,
|
||||||
|
> .btn.active {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
&:focus,
|
|
||||||
&:active,
|
|
||||||
&.active {
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optional: Group multiple button groups together for a toolbar
|
// Optional: Group multiple button groups together for a toolbar
|
||||||
|
@ -36,21 +34,29 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group {
|
.btn-group {
|
||||||
|
@include border-radius($btn-border-radius);
|
||||||
|
|
||||||
// Prevent double borders when buttons are next to each other
|
// Prevent double borders when buttons are next to each other
|
||||||
> .btn:not(:first-child),
|
> :not(.btn-check:first-child) + .btn,
|
||||||
> .btn-group:not(:first-child) {
|
> .btn-group:not(:first-child) {
|
||||||
margin-left: -$btn-border-width;
|
margin-left: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset rounded corners
|
// Reset rounded corners
|
||||||
> .btn:not(:last-child):not(.dropdown-toggle),
|
> .btn:not(:last-child):not(.dropdown-toggle),
|
||||||
|
> .btn.dropdown-toggle-split:first-child,
|
||||||
> .btn-group:not(:last-child) > .btn {
|
> .btn-group:not(:last-child) > .btn {
|
||||||
@include border-right-radius(0);
|
@include border-end-radius(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
> .btn:not(:first-child),
|
// The left radius should be 0 if the button is:
|
||||||
|
// - the "third or more" child
|
||||||
|
// - the second child and the previous element isn't `.btn-check` (making it the first child visually)
|
||||||
|
// - part of a btn-group which isn't the first child
|
||||||
|
> .btn:nth-child(n + 3),
|
||||||
|
> :not(.btn-check) + .btn,
|
||||||
> .btn-group:not(:first-child) > .btn {
|
> .btn-group:not(:first-child) > .btn {
|
||||||
@include border-left-radius(0);
|
@include border-start-radius(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,11 +78,11 @@
|
||||||
|
|
||||||
&::after,
|
&::after,
|
||||||
.dropup &::after,
|
.dropup &::after,
|
||||||
.dropright &::after {
|
.dropend &::after {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropleft &::before {
|
.dropstart &::before {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,7 +126,7 @@
|
||||||
|
|
||||||
> .btn:not(:first-child),
|
> .btn:not(:first-child),
|
||||||
> .btn-group:not(:first-child) {
|
> .btn-group:not(:first-child) {
|
||||||
margin-top: -$btn-border-width;
|
margin-top: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset rounded corners
|
// Reset rounded corners
|
||||||
|
@ -129,35 +135,8 @@
|
||||||
@include border-bottom-radius(0);
|
@include border-bottom-radius(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
> .btn:not(:first-child),
|
> .btn ~ .btn,
|
||||||
> .btn-group:not(:first-child) > .btn {
|
> .btn-group:not(:first-child) > .btn {
|
||||||
@include border-top-radius(0);
|
@include border-top-radius(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Checkbox and radio options
|
|
||||||
//
|
|
||||||
// In order to support the browser's form validation feedback, powered by the
|
|
||||||
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
|
|
||||||
// `display: none;` or `visibility: hidden;` as that also hides the popover.
|
|
||||||
// Simply visually hiding the inputs via `opacity` would leave them clickable in
|
|
||||||
// certain cases which is prevented by using `clip` and `pointer-events`.
|
|
||||||
// This way, we ensure a DOM element is visible to position the popover from.
|
|
||||||
//
|
|
||||||
// See https://github.com/twbs/bootstrap/pull/12794 and
|
|
||||||
// https://github.com/twbs/bootstrap/pull/14559 for more information.
|
|
||||||
|
|
||||||
.btn-group-toggle {
|
|
||||||
> .btn,
|
|
||||||
> .btn-group > .btn {
|
|
||||||
margin-bottom: 0; // Override default `<label>` value
|
|
||||||
|
|
||||||
input[type="radio"],
|
|
||||||
input[type="checkbox"] {
|
|
||||||
position: absolute;
|
|
||||||
clip: rect(0, 0, 0, 0);
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,60 +1,116 @@
|
||||||
// stylelint-disable selector-no-qualifying-type
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Base styles
|
// Base styles
|
||||||
//
|
//
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
|
// scss-docs-start btn-css-vars
|
||||||
|
--#{$prefix}btn-padding-x: #{$btn-padding-x};
|
||||||
|
--#{$prefix}btn-padding-y: #{$btn-padding-y};
|
||||||
|
--#{$prefix}btn-font-family: #{$btn-font-family};
|
||||||
|
@include rfs($btn-font-size, --#{$prefix}btn-font-size);
|
||||||
|
--#{$prefix}btn-font-weight: #{$btn-font-weight};
|
||||||
|
--#{$prefix}btn-line-height: #{$btn-line-height};
|
||||||
|
--#{$prefix}btn-color: #{$btn-color};
|
||||||
|
--#{$prefix}btn-bg: transparent;
|
||||||
|
--#{$prefix}btn-border-width: #{$btn-border-width};
|
||||||
|
--#{$prefix}btn-border-color: transparent;
|
||||||
|
--#{$prefix}btn-border-radius: #{$btn-border-radius};
|
||||||
|
--#{$prefix}btn-hover-border-color: transparent;
|
||||||
|
--#{$prefix}btn-box-shadow: #{$btn-box-shadow};
|
||||||
|
--#{$prefix}btn-disabled-opacity: #{$btn-disabled-opacity};
|
||||||
|
--#{$prefix}btn-focus-box-shadow: 0 0 0 #{$btn-focus-width} rgba(var(--#{$prefix}btn-focus-shadow-rgb), .5);
|
||||||
|
// scss-docs-end btn-css-vars
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-family: $btn-font-family;
|
padding: var(--#{$prefix}btn-padding-y) var(--#{$prefix}btn-padding-x);
|
||||||
font-weight: $btn-font-weight;
|
font-family: var(--#{$prefix}btn-font-family);
|
||||||
color: $body-color;
|
@include font-size(var(--#{$prefix}btn-font-size));
|
||||||
|
font-weight: var(--#{$prefix}btn-font-weight);
|
||||||
|
line-height: var(--#{$prefix}btn-line-height);
|
||||||
|
color: var(--#{$prefix}btn-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: if($link-decoration == none, null, none);
|
text-decoration: if($link-decoration == none, null, none);
|
||||||
white-space: $btn-white-space;
|
white-space: $btn-white-space;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
cursor: if($enable-button-pointers, pointer, null);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
background-color: transparent;
|
border: var(--#{$prefix}btn-border-width) solid var(--#{$prefix}btn-border-color);
|
||||||
border: $btn-border-width solid transparent;
|
@include border-radius(var(--#{$prefix}btn-border-radius));
|
||||||
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
|
@include gradient-bg(var(--#{$prefix}btn-bg));
|
||||||
|
@include box-shadow(var(--#{$prefix}btn-box-shadow));
|
||||||
@include transition($btn-transition);
|
@include transition($btn-transition);
|
||||||
|
|
||||||
@include hover() {
|
&:hover {
|
||||||
color: $body-color;
|
color: var(--#{$prefix}btn-hover-color);
|
||||||
text-decoration: none;
|
text-decoration: if($link-hover-decoration == underline, none, null);
|
||||||
|
background-color: var(--#{$prefix}btn-hover-bg);
|
||||||
|
border-color: var(--#{$prefix}btn-hover-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus,
|
.btn-check + &:hover {
|
||||||
&.focus {
|
// override for the checkbox/radio buttons
|
||||||
|
color: var(--#{$prefix}btn-color);
|
||||||
|
background-color: var(--#{$prefix}btn-bg);
|
||||||
|
border-color: var(--#{$prefix}btn-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
color: var(--#{$prefix}btn-hover-color);
|
||||||
|
@include gradient-bg(var(--#{$prefix}btn-hover-bg));
|
||||||
|
border-color: var(--#{$prefix}btn-hover-border-color);
|
||||||
outline: 0;
|
outline: 0;
|
||||||
box-shadow: $btn-focus-box-shadow;
|
// Avoid using mixin so we can pass custom focus shadow properly
|
||||||
|
@if $enable-shadows {
|
||||||
|
box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow);
|
||||||
|
} @else {
|
||||||
|
box-shadow: var(--#{$prefix}btn-focus-box-shadow);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disabled comes first so active can properly restyle
|
.btn-check:focus-visible + & {
|
||||||
|
border-color: var(--#{$prefix}btn-hover-border-color);
|
||||||
|
outline: 0;
|
||||||
|
// Avoid using mixin so we can pass custom focus shadow properly
|
||||||
|
@if $enable-shadows {
|
||||||
|
box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow);
|
||||||
|
} @else {
|
||||||
|
box-shadow: var(--#{$prefix}btn-focus-box-shadow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-check:checked + &,
|
||||||
|
:not(.btn-check) + &:active,
|
||||||
|
&:first-child:active,
|
||||||
|
&.active,
|
||||||
|
&.show {
|
||||||
|
color: var(--#{$prefix}btn-active-color);
|
||||||
|
background-color: var(--#{$prefix}btn-active-bg);
|
||||||
|
// Remove CSS gradients if they're enabled
|
||||||
|
background-image: if($enable-gradients, none, null);
|
||||||
|
border-color: var(--#{$prefix}btn-active-border-color);
|
||||||
|
@include box-shadow(var(--#{$prefix}btn-active-shadow));
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
// Avoid using mixin so we can pass custom focus shadow properly
|
||||||
|
@if $enable-shadows {
|
||||||
|
box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow);
|
||||||
|
} @else {
|
||||||
|
box-shadow: var(--#{$prefix}btn-focus-box-shadow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled,
|
||||||
&.disabled,
|
&.disabled,
|
||||||
&:disabled {
|
fieldset:disabled & {
|
||||||
opacity: $btn-disabled-opacity;
|
color: var(--#{$prefix}btn-disabled-color);
|
||||||
|
pointer-events: none;
|
||||||
|
background-color: var(--#{$prefix}btn-disabled-bg);
|
||||||
|
background-image: if($enable-gradients, none, null);
|
||||||
|
border-color: var(--#{$prefix}btn-disabled-border-color);
|
||||||
|
opacity: var(--#{$prefix}btn-disabled-opacity);
|
||||||
@include box-shadow(none);
|
@include box-shadow(none);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(:disabled):not(.disabled) {
|
|
||||||
cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
|
|
||||||
|
|
||||||
&:active,
|
|
||||||
&.active {
|
|
||||||
@include box-shadow($btn-active-box-shadow);
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Future-proof disabling of clicks on `<a>` elements
|
|
||||||
a.btn.disabled,
|
|
||||||
fieldset:disabled a.btn {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,10 +118,31 @@ fieldset:disabled a.btn {
|
||||||
// Alternate buttons
|
// Alternate buttons
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// scss-docs-start btn-variant-loops
|
||||||
@each $color, $value in $theme-colors {
|
@each $color, $value in $theme-colors {
|
||||||
.btn-#{$color} {
|
.btn-#{$color} {
|
||||||
|
@if $color == "light" {
|
||||||
|
@include button-variant(
|
||||||
|
$value,
|
||||||
|
$value,
|
||||||
|
$hover-background: shade-color($value, $btn-hover-bg-shade-amount),
|
||||||
|
$hover-border: shade-color($value, $btn-hover-border-shade-amount),
|
||||||
|
$active-background: shade-color($value, $btn-active-bg-shade-amount),
|
||||||
|
$active-border: shade-color($value, $btn-active-border-shade-amount)
|
||||||
|
);
|
||||||
|
} @else if $color == "dark" {
|
||||||
|
@include button-variant(
|
||||||
|
$value,
|
||||||
|
$value,
|
||||||
|
$hover-background: tint-color($value, $btn-hover-bg-tint-amount),
|
||||||
|
$hover-border: tint-color($value, $btn-hover-border-tint-amount),
|
||||||
|
$active-background: tint-color($value, $btn-active-bg-tint-amount),
|
||||||
|
$active-border: tint-color($value, $btn-active-border-tint-amount)
|
||||||
|
);
|
||||||
|
} @else {
|
||||||
@include button-variant($value, $value);
|
@include button-variant($value, $value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@each $color, $value in $theme-colors {
|
@each $color, $value in $theme-colors {
|
||||||
|
@ -73,6 +150,7 @@ fieldset:disabled a.btn {
|
||||||
@include button-outline-variant($value);
|
@include button-outline-variant($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end btn-variant-loops
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -81,24 +159,35 @@ fieldset:disabled a.btn {
|
||||||
|
|
||||||
// Make a button look and behave like a link
|
// Make a button look and behave like a link
|
||||||
.btn-link {
|
.btn-link {
|
||||||
font-weight: $font-weight-normal;
|
--#{$prefix}btn-font-weight: #{$font-weight-normal};
|
||||||
color: $link-color;
|
--#{$prefix}btn-color: #{$btn-link-color};
|
||||||
|
--#{$prefix}btn-bg: transparent;
|
||||||
|
--#{$prefix}btn-border-color: transparent;
|
||||||
|
--#{$prefix}btn-hover-color: #{$btn-link-hover-color};
|
||||||
|
--#{$prefix}btn-hover-border-color: transparent;
|
||||||
|
--#{$prefix}btn-active-color: #{$btn-link-hover-color};
|
||||||
|
--#{$prefix}btn-active-border-color: transparent;
|
||||||
|
--#{$prefix}btn-disabled-color: #{$btn-link-disabled-color};
|
||||||
|
--#{$prefix}btn-disabled-border-color: transparent;
|
||||||
|
--#{$prefix}btn-box-shadow: 0 0 0 #000; // Can't use `none` as keyword negates all values when used with multiple shadows
|
||||||
|
--#{$prefix}btn-focus-shadow-rgb: #{$btn-link-focus-shadow-rgb};
|
||||||
|
|
||||||
text-decoration: $link-decoration;
|
text-decoration: $link-decoration;
|
||||||
|
@if $enable-gradients {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
|
||||||
@include hover() {
|
&:hover,
|
||||||
color: $link-hover-color;
|
&:focus-visible {
|
||||||
text-decoration: $link-hover-decoration;
|
text-decoration: $link-hover-decoration;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus,
|
&:focus-visible {
|
||||||
&.focus {
|
color: var(--#{$prefix}btn-color);
|
||||||
text-decoration: $link-hover-decoration;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:disabled,
|
&:hover {
|
||||||
&.disabled {
|
color: var(--#{$prefix}btn-hover-color);
|
||||||
color: $btn-link-disabled-color;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// No need for an active state here
|
// No need for an active state here
|
||||||
|
@ -110,33 +199,9 @@ fieldset:disabled a.btn {
|
||||||
//
|
//
|
||||||
|
|
||||||
.btn-lg {
|
.btn-lg {
|
||||||
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
|
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-sm {
|
.btn-sm {
|
||||||
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Specificity overrides
|
|
||||||
input[type="submit"],
|
|
||||||
input[type="reset"],
|
|
||||||
input[type="button"] {
|
|
||||||
&.btn-block {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,40 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
|
// scss-docs-start card-css-vars
|
||||||
|
--#{$prefix}card-spacer-y: #{$card-spacer-y};
|
||||||
|
--#{$prefix}card-spacer-x: #{$card-spacer-x};
|
||||||
|
--#{$prefix}card-title-spacer-y: #{$card-title-spacer-y};
|
||||||
|
--#{$prefix}card-title-color: #{$card-title-color};
|
||||||
|
--#{$prefix}card-subtitle-color: #{$card-subtitle-color};
|
||||||
|
--#{$prefix}card-border-width: #{$card-border-width};
|
||||||
|
--#{$prefix}card-border-color: #{$card-border-color};
|
||||||
|
--#{$prefix}card-border-radius: #{$card-border-radius};
|
||||||
|
--#{$prefix}card-box-shadow: #{$card-box-shadow};
|
||||||
|
--#{$prefix}card-inner-border-radius: #{$card-inner-border-radius};
|
||||||
|
--#{$prefix}card-cap-padding-y: #{$card-cap-padding-y};
|
||||||
|
--#{$prefix}card-cap-padding-x: #{$card-cap-padding-x};
|
||||||
|
--#{$prefix}card-cap-bg: #{$card-cap-bg};
|
||||||
|
--#{$prefix}card-cap-color: #{$card-cap-color};
|
||||||
|
--#{$prefix}card-height: #{$card-height};
|
||||||
|
--#{$prefix}card-color: #{$card-color};
|
||||||
|
--#{$prefix}card-bg: #{$card-bg};
|
||||||
|
--#{$prefix}card-img-overlay-padding: #{$card-img-overlay-padding};
|
||||||
|
--#{$prefix}card-group-margin: #{$card-group-margin};
|
||||||
|
// scss-docs-end card-css-vars
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
|
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
|
||||||
height: $card-height;
|
height: var(--#{$prefix}card-height);
|
||||||
|
color: var(--#{$prefix}body-color);
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
background-color: $card-bg;
|
background-color: var(--#{$prefix}card-bg);
|
||||||
background-clip: border-box;
|
background-clip: border-box;
|
||||||
border: $card-border-width solid $card-border-color;
|
border: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
|
||||||
@include border-radius($card-border-radius);
|
@include border-radius(var(--#{$prefix}card-border-radius));
|
||||||
|
@include box-shadow(var(--#{$prefix}card-box-shadow));
|
||||||
|
|
||||||
> hr {
|
> hr {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
|
@ -25,12 +49,12 @@
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-top-width: 0;
|
border-top-width: 0;
|
||||||
@include border-top-radius($card-inner-border-radius);
|
@include border-top-radius(var(--#{$prefix}card-inner-border-radius));
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-bottom-width: 0;
|
border-bottom-width: 0;
|
||||||
@include border-bottom-radius($card-inner-border-radius);
|
@include border-bottom-radius(var(--#{$prefix}card-inner-border-radius));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,20 +70,19 @@
|
||||||
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
|
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
|
||||||
// as much space as possible, ensuring footers are aligned to the bottom.
|
// as much space as possible, ensuring footers are aligned to the bottom.
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
// Workaround for the image size bug in IE
|
padding: var(--#{$prefix}card-spacer-y) var(--#{$prefix}card-spacer-x);
|
||||||
// See: https://github.com/twbs/bootstrap/pull/28855
|
color: var(--#{$prefix}card-color);
|
||||||
min-height: 1px;
|
|
||||||
padding: $card-spacer-x;
|
|
||||||
color: $card-color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
margin-bottom: $card-spacer-y;
|
margin-bottom: var(--#{$prefix}card-title-spacer-y);
|
||||||
|
color: var(--#{$prefix}card-title-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-subtitle {
|
.card-subtitle {
|
||||||
margin-top: -$card-spacer-y / 2;
|
margin-top: calc(-.5 * var(--#{$prefix}card-title-spacer-y)); // stylelint-disable-line function-disallowed-list
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
color: var(--#{$prefix}card-subtitle-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-text:last-child {
|
.card-text:last-child {
|
||||||
|
@ -67,12 +90,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-link {
|
.card-link {
|
||||||
@include hover() {
|
&:hover {
|
||||||
text-decoration: none;
|
text-decoration: if($link-hover-decoration == underline, none, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ .card-link {
|
+ .card-link {
|
||||||
margin-left: $card-spacer-x;
|
margin-left: var(--#{$prefix}card-spacer-x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,25 +104,25 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
.card-header {
|
.card-header {
|
||||||
padding: $card-spacer-y $card-spacer-x;
|
padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x);
|
||||||
margin-bottom: 0; // Removes the default margin-bottom of <hN>
|
margin-bottom: 0; // Removes the default margin-bottom of <hN>
|
||||||
color: $card-cap-color;
|
color: var(--#{$prefix}card-cap-color);
|
||||||
background-color: $card-cap-bg;
|
background-color: var(--#{$prefix}card-cap-bg);
|
||||||
border-bottom: $card-border-width solid $card-border-color;
|
border-bottom: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
@include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
|
@include border-radius(var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius) 0 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-footer {
|
.card-footer {
|
||||||
padding: $card-spacer-y $card-spacer-x;
|
padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x);
|
||||||
color: $card-cap-color;
|
color: var(--#{$prefix}card-cap-color);
|
||||||
background-color: $card-cap-bg;
|
background-color: var(--#{$prefix}card-cap-bg);
|
||||||
border-top: $card-border-width solid $card-border-color;
|
border-top: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
@include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
|
@include border-radius(0 0 var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,15 +132,20 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
.card-header-tabs {
|
.card-header-tabs {
|
||||||
margin-right: -$card-spacer-x / 2;
|
margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
|
||||||
margin-bottom: -$card-spacer-y;
|
margin-bottom: calc(-1 * var(--#{$prefix}card-cap-padding-y)); // stylelint-disable-line function-disallowed-list
|
||||||
margin-left: -$card-spacer-x / 2;
|
margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
|
|
||||||
|
.nav-link.active {
|
||||||
|
background-color: var(--#{$prefix}card-bg);
|
||||||
|
border-bottom-color: var(--#{$prefix}card-bg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header-pills {
|
.card-header-pills {
|
||||||
margin-right: -$card-spacer-x / 2;
|
margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
|
||||||
margin-left: -$card-spacer-x / 2;
|
margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
|
||||||
}
|
}
|
||||||
|
|
||||||
// Card image
|
// Card image
|
||||||
|
@ -127,49 +155,24 @@
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
padding: $card-img-overlay-padding;
|
padding: var(--#{$prefix}card-img-overlay-padding);
|
||||||
@include border-radius($card-inner-border-radius);
|
@include border-radius(var(--#{$prefix}card-inner-border-radius));
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-img,
|
.card-img,
|
||||||
.card-img-top,
|
.card-img-top,
|
||||||
.card-img-bottom {
|
.card-img-bottom {
|
||||||
flex-shrink: 0; // For IE: https://github.com/twbs/bootstrap/issues/29396
|
|
||||||
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
|
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-img,
|
.card-img,
|
||||||
.card-img-top {
|
.card-img-top {
|
||||||
@include border-top-radius($card-inner-border-radius);
|
@include border-top-radius(var(--#{$prefix}card-inner-border-radius));
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-img,
|
.card-img,
|
||||||
.card-img-bottom {
|
.card-img-bottom {
|
||||||
@include border-bottom-radius($card-inner-border-radius);
|
@include border-bottom-radius(var(--#{$prefix}card-inner-border-radius));
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Card deck
|
|
||||||
|
|
||||||
.card-deck {
|
|
||||||
.card {
|
|
||||||
margin-bottom: $card-deck-margin;
|
|
||||||
}
|
|
||||||
|
|
||||||
@include media-breakpoint-up(sm) {
|
|
||||||
display: flex;
|
|
||||||
flex-flow: row wrap;
|
|
||||||
margin-right: -$card-deck-margin;
|
|
||||||
margin-left: -$card-deck-margin;
|
|
||||||
|
|
||||||
.card {
|
|
||||||
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
|
||||||
flex: 1 0 0%;
|
|
||||||
margin-right: $card-deck-margin;
|
|
||||||
margin-bottom: 0; // Override the default
|
|
||||||
margin-left: $card-deck-margin;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -181,7 +184,7 @@
|
||||||
// The child selector allows nested `.card` within `.card-group`
|
// The child selector allows nested `.card` within `.card-group`
|
||||||
// to display properly.
|
// to display properly.
|
||||||
> .card {
|
> .card {
|
||||||
margin-bottom: $card-group-margin;
|
margin-bottom: var(--#{$prefix}card-group-margin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@include media-breakpoint-up(sm) {
|
@include media-breakpoint-up(sm) {
|
||||||
|
@ -202,7 +205,7 @@
|
||||||
// Handle rounded corners
|
// Handle rounded corners
|
||||||
@if $enable-rounded {
|
@if $enable-rounded {
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
@include border-right-radius(0);
|
@include border-end-radius(0);
|
||||||
|
|
||||||
.card-img-top,
|
.card-img-top,
|
||||||
.card-header {
|
.card-header {
|
||||||
|
@ -217,7 +220,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(:first-child) {
|
&:not(:first-child) {
|
||||||
@include border-left-radius(0);
|
@include border-start-radius(0);
|
||||||
|
|
||||||
.card-img-top,
|
.card-img-top,
|
||||||
.card-header {
|
.card-header {
|
||||||
|
@ -234,53 +237,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Columns
|
|
||||||
//
|
|
||||||
|
|
||||||
.card-columns {
|
|
||||||
.card {
|
|
||||||
margin-bottom: $card-columns-margin;
|
|
||||||
}
|
|
||||||
|
|
||||||
@include media-breakpoint-up(sm) {
|
|
||||||
column-count: $card-columns-count;
|
|
||||||
column-gap: $card-columns-gap;
|
|
||||||
orphans: 1;
|
|
||||||
widows: 1;
|
|
||||||
|
|
||||||
.card {
|
|
||||||
display: inline-block; // Don't let them vertically span multiple columns
|
|
||||||
width: 100%; // Don't let their width change
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
|
// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
|
||||||
// even when their scroll action started on a carousel, but for compatibility (with Firefox)
|
// even when their scroll action started on a carousel, but for compatibility (with Firefox)
|
||||||
// we're preventing all actions instead
|
// we're preventing all actions instead
|
||||||
// 2. The .carousel-item-left and .carousel-item-right is used to indicate where
|
// 2. The .carousel-item-start and .carousel-item-end is used to indicate where
|
||||||
// the active slide is heading.
|
// the active slide is heading.
|
||||||
// 3. .active.carousel-item is the current slide.
|
// 3. .active.carousel-item is the current slide.
|
||||||
// 4. .active.carousel-item-left and .active.carousel-item-right is the current
|
// 4. .active.carousel-item-start and .active.carousel-item-end is the current
|
||||||
// slide in its in-transition state. Only one of these occurs at a time.
|
// slide in its in-transition state. Only one of these occurs at a time.
|
||||||
// 5. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
|
// 5. .carousel-item-next.carousel-item-start and .carousel-item-prev.carousel-item-end
|
||||||
// is the upcoming slide in transition.
|
// is the upcoming slide in transition.
|
||||||
|
|
||||||
.carousel {
|
.carousel {
|
||||||
|
@ -42,13 +42,13 @@
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel-item-next:not(.carousel-item-left),
|
.carousel-item-next:not(.carousel-item-start),
|
||||||
.active.carousel-item-right {
|
.active.carousel-item-end {
|
||||||
transform: translateX(100%);
|
transform: translateX(100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel-item-prev:not(.carousel-item-right),
|
.carousel-item-prev:not(.carousel-item-end),
|
||||||
.active.carousel-item-left {
|
.active.carousel-item-start {
|
||||||
transform: translateX(-100%);
|
transform: translateX(-100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,14 +65,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel-item.active,
|
.carousel-item.active,
|
||||||
.carousel-item-next.carousel-item-left,
|
.carousel-item-next.carousel-item-start,
|
||||||
.carousel-item-prev.carousel-item-right {
|
.carousel-item-prev.carousel-item-end {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active.carousel-item-left,
|
.active.carousel-item-start,
|
||||||
.active.carousel-item-right {
|
.active.carousel-item-end {
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@include transition(opacity 0s $carousel-transition-duration);
|
@include transition(opacity 0s $carousel-transition-duration);
|
||||||
|
@ -95,13 +95,17 @@
|
||||||
align-items: center; // 2. vertically center contents
|
align-items: center; // 2. vertically center contents
|
||||||
justify-content: center; // 3. horizontally center contents
|
justify-content: center; // 3. horizontally center contents
|
||||||
width: $carousel-control-width;
|
width: $carousel-control-width;
|
||||||
|
padding: 0;
|
||||||
color: $carousel-control-color;
|
color: $carousel-control-color;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
background: none;
|
||||||
|
border: 0;
|
||||||
opacity: $carousel-control-opacity;
|
opacity: $carousel-control-opacity;
|
||||||
@include transition($carousel-control-transition);
|
@include transition($carousel-control-transition);
|
||||||
|
|
||||||
// Hover/focus state
|
// Hover/focus state
|
||||||
@include hover-focus() {
|
&:hover,
|
||||||
|
&:focus {
|
||||||
color: $carousel-control-color;
|
color: $carousel-control-color;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
@ -110,15 +114,11 @@
|
||||||
}
|
}
|
||||||
.carousel-control-prev {
|
.carousel-control-prev {
|
||||||
left: 0;
|
left: 0;
|
||||||
@if $enable-gradients {
|
background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
|
||||||
background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.carousel-control-next {
|
.carousel-control-next {
|
||||||
right: 0;
|
right: 0;
|
||||||
@if $enable-gradients {
|
background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
|
||||||
background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Icons for within
|
// Icons for within
|
||||||
|
@ -127,8 +127,19 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: $carousel-control-icon-width;
|
width: $carousel-control-icon-width;
|
||||||
height: $carousel-control-icon-width;
|
height: $carousel-control-icon-width;
|
||||||
background: 50% / 100% 100% no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
background-position: 50%;
|
||||||
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* rtl:options: {
|
||||||
|
"autoRename": true,
|
||||||
|
"stringMap":[ {
|
||||||
|
"name" : "prev-next",
|
||||||
|
"search" : "prev",
|
||||||
|
"replace" : "next"
|
||||||
|
} ]
|
||||||
|
} */
|
||||||
.carousel-control-prev-icon {
|
.carousel-control-prev-icon {
|
||||||
background-image: escape-svg($carousel-control-prev-icon-bg);
|
background-image: escape-svg($carousel-control-prev-icon-bg);
|
||||||
}
|
}
|
||||||
|
@ -136,46 +147,47 @@
|
||||||
background-image: escape-svg($carousel-control-next-icon-bg);
|
background-image: escape-svg($carousel-control-next-icon-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Optional indicator pips/controls
|
||||||
// Optional indicator pips
|
|
||||||
//
|
//
|
||||||
// Add an ordered list with the following class and add a list item for each
|
// Add a container (such as a list) with the following class and add an item (ideally a focusable control,
|
||||||
// slide your carousel holds.
|
// like a button) with data-bs-target for each slide your carousel holds.
|
||||||
|
|
||||||
.carousel-indicators {
|
.carousel-indicators {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 15;
|
z-index: 2;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-left: 0; // override <ol> default
|
padding: 0;
|
||||||
// Use the .carousel-control's width as margin so we don't overlay those
|
// Use the .carousel-control's width as margin so we don't overlay those
|
||||||
margin-right: $carousel-control-width;
|
margin-right: $carousel-control-width;
|
||||||
|
margin-bottom: 1rem;
|
||||||
margin-left: $carousel-control-width;
|
margin-left: $carousel-control-width;
|
||||||
list-style: none;
|
|
||||||
|
|
||||||
li {
|
[data-bs-target] {
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
flex: 0 1 auto;
|
flex: 0 1 auto;
|
||||||
width: $carousel-indicator-width;
|
width: $carousel-indicator-width;
|
||||||
height: $carousel-indicator-height;
|
height: $carousel-indicator-height;
|
||||||
|
padding: 0;
|
||||||
margin-right: $carousel-indicator-spacer;
|
margin-right: $carousel-indicator-spacer;
|
||||||
margin-left: $carousel-indicator-spacer;
|
margin-left: $carousel-indicator-spacer;
|
||||||
text-indent: -999px;
|
text-indent: -999px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: $carousel-indicator-active-bg;
|
background-color: $carousel-indicator-active-bg;
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
|
border: 0;
|
||||||
// Use transparent borders to increase the hit area by 10px on top and bottom.
|
// Use transparent borders to increase the hit area by 10px on top and bottom.
|
||||||
border-top: $carousel-indicator-hit-area-height solid transparent;
|
border-top: $carousel-indicator-hit-area-height solid transparent;
|
||||||
border-bottom: $carousel-indicator-hit-area-height solid transparent;
|
border-bottom: $carousel-indicator-hit-area-height solid transparent;
|
||||||
opacity: .5;
|
opacity: $carousel-indicator-opacity;
|
||||||
@include transition($carousel-indicator-transition);
|
@include transition($carousel-indicator-transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
opacity: 1;
|
opacity: $carousel-indicator-active-opacity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,12 +198,47 @@
|
||||||
|
|
||||||
.carousel-caption {
|
.carousel-caption {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: (100% - $carousel-caption-width) / 2;
|
right: (100% - $carousel-caption-width) * .5;
|
||||||
bottom: 20px;
|
bottom: $carousel-caption-spacer;
|
||||||
left: (100% - $carousel-caption-width) / 2;
|
left: (100% - $carousel-caption-width) * .5;
|
||||||
z-index: 10;
|
padding-top: $carousel-caption-padding-y;
|
||||||
padding-top: 20px;
|
padding-bottom: $carousel-caption-padding-y;
|
||||||
padding-bottom: 20px;
|
|
||||||
color: $carousel-caption-color;
|
color: $carousel-caption-color;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dark mode carousel
|
||||||
|
|
||||||
|
@mixin carousel-dark() {
|
||||||
|
.carousel-control-prev-icon,
|
||||||
|
.carousel-control-next-icon {
|
||||||
|
filter: $carousel-dark-control-icon-filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-indicators [data-bs-target] {
|
||||||
|
background-color: $carousel-dark-indicator-active-bg;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-caption {
|
||||||
|
color: $carousel-dark-caption-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-dark {
|
||||||
|
@include carousel-dark();
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $enable-dark-mode {
|
||||||
|
@include color-mode(dark) {
|
||||||
|
@if $color-mode-type == "media-query" {
|
||||||
|
.carousel {
|
||||||
|
@include carousel-dark();
|
||||||
|
}
|
||||||
|
} @else {
|
||||||
|
.carousel,
|
||||||
|
&.carousel {
|
||||||
|
@include carousel-dark();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,40 +1,63 @@
|
||||||
.close {
|
// Transparent background and border properties included for button version.
|
||||||
float: right;
|
|
||||||
@include font-size($close-font-size);
|
|
||||||
font-weight: $close-font-weight;
|
|
||||||
line-height: 1;
|
|
||||||
color: $close-color;
|
|
||||||
text-shadow: $close-text-shadow;
|
|
||||||
opacity: .5;
|
|
||||||
|
|
||||||
// Override <a>'s hover style
|
|
||||||
@include hover() {
|
|
||||||
color: $close-color;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(:disabled):not(.disabled) {
|
|
||||||
@include hover-focus() {
|
|
||||||
opacity: .75;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Additional properties for button version
|
|
||||||
// iOS requires the button element instead of an anchor tag.
|
// iOS requires the button element instead of an anchor tag.
|
||||||
// If you want the anchor version, it requires `href="#"`.
|
// If you want the anchor version, it requires `href="#"`.
|
||||||
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
||||||
|
|
||||||
// stylelint-disable-next-line selector-no-qualifying-type
|
.btn-close {
|
||||||
button.close {
|
// scss-docs-start close-css-vars
|
||||||
padding: 0;
|
--#{$prefix}btn-close-color: #{$btn-close-color};
|
||||||
background-color: transparent;
|
--#{$prefix}btn-close-bg: #{ escape-svg($btn-close-bg) };
|
||||||
border: 0;
|
--#{$prefix}btn-close-opacity: #{$btn-close-opacity};
|
||||||
}
|
--#{$prefix}btn-close-hover-opacity: #{$btn-close-hover-opacity};
|
||||||
|
--#{$prefix}btn-close-focus-shadow: #{$btn-close-focus-shadow};
|
||||||
|
--#{$prefix}btn-close-focus-opacity: #{$btn-close-focus-opacity};
|
||||||
|
--#{$prefix}btn-close-disabled-opacity: #{$btn-close-disabled-opacity};
|
||||||
|
--#{$prefix}btn-close-white-filter: #{$btn-close-white-filter};
|
||||||
|
// scss-docs-end close-css-vars
|
||||||
|
|
||||||
// Future-proof disabling of clicks on `<a>` elements
|
box-sizing: content-box;
|
||||||
|
width: $btn-close-width;
|
||||||
|
height: $btn-close-height;
|
||||||
|
padding: $btn-close-padding-y $btn-close-padding-x;
|
||||||
|
color: var(--#{$prefix}btn-close-color);
|
||||||
|
background: transparent var(--#{$prefix}btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
|
||||||
|
border: 0; // for button elements
|
||||||
|
@include border-radius();
|
||||||
|
opacity: var(--#{$prefix}btn-close-opacity);
|
||||||
|
|
||||||
// stylelint-disable-next-line selector-no-qualifying-type
|
// Override <a>'s hover style
|
||||||
a.close.disabled {
|
&:hover {
|
||||||
|
color: var(--#{$prefix}btn-close-color);
|
||||||
|
text-decoration: none;
|
||||||
|
opacity: var(--#{$prefix}btn-close-hover-opacity);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: 0;
|
||||||
|
box-shadow: var(--#{$prefix}btn-close-focus-shadow);
|
||||||
|
opacity: var(--#{$prefix}btn-close-focus-opacity);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled,
|
||||||
|
&.disabled {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
user-select: none;
|
||||||
|
opacity: var(--#{$prefix}btn-close-disabled-opacity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin btn-close-white() {
|
||||||
|
filter: var(--#{$prefix}btn-close-white-filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-close-white {
|
||||||
|
@include btn-close-white();
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $enable-dark-mode {
|
||||||
|
@include color-mode(dark) {
|
||||||
|
.btn-close {
|
||||||
|
@include btn-close-white();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
// Inline code
|
|
||||||
code {
|
|
||||||
@include font-size($code-font-size);
|
|
||||||
color: $code-color;
|
|
||||||
word-wrap: break-word;
|
|
||||||
|
|
||||||
// Streamline the style when inside anchors to avoid broken underline and more
|
|
||||||
a > & {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// User input typically entered via keyboard
|
|
||||||
kbd {
|
|
||||||
padding: $kbd-padding-y $kbd-padding-x;
|
|
||||||
@include font-size($kbd-font-size);
|
|
||||||
color: $kbd-color;
|
|
||||||
background-color: $kbd-bg;
|
|
||||||
@include border-radius($border-radius-sm);
|
|
||||||
@include box-shadow($kbd-box-shadow);
|
|
||||||
|
|
||||||
kbd {
|
|
||||||
padding: 0;
|
|
||||||
@include font-size(100%);
|
|
||||||
font-weight: $nested-kbd-font-weight;
|
|
||||||
@include box-shadow(none);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Blocks of code
|
|
||||||
pre {
|
|
||||||
display: block;
|
|
||||||
@include font-size($code-font-size);
|
|
||||||
color: $pre-color;
|
|
||||||
|
|
||||||
// Account for some code outputs that place code tags in pre tags
|
|
||||||
code {
|
|
||||||
@include font-size(inherit);
|
|
||||||
color: inherit;
|
|
||||||
word-break: normal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Enable scrollable blocks of code
|
|
||||||
.pre-scrollable {
|
|
||||||
max-height: $pre-scrollable-max-height;
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
// Container widths
|
||||||
|
//
|
||||||
|
// Set the container width, and override it for fixed navbars in media queries.
|
||||||
|
|
||||||
|
@if $enable-container-classes {
|
||||||
|
// Single container class with breakpoint max-widths
|
||||||
|
.container,
|
||||||
|
// 100% wide container at all breakpoints
|
||||||
|
.container-fluid {
|
||||||
|
@include make-container();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Responsive containers that are 100% wide until a breakpoint
|
||||||
|
@each $breakpoint, $container-max-width in $container-max-widths {
|
||||||
|
.container-#{$breakpoint} {
|
||||||
|
@extend .container-fluid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
|
||||||
|
%responsive-container-#{$breakpoint} {
|
||||||
|
max-width: $container-max-width;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extend each breakpoint which is smaller or equal to the current breakpoint
|
||||||
|
$extend-breakpoint: true;
|
||||||
|
|
||||||
|
@each $name, $width in $grid-breakpoints {
|
||||||
|
@if ($extend-breakpoint) {
|
||||||
|
.container#{breakpoint-infix($name, $grid-breakpoints)} {
|
||||||
|
@extend %responsive-container-#{$breakpoint};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Once the current breakpoint is reached, stop extending
|
||||||
|
@if ($breakpoint == $name) {
|
||||||
|
$extend-breakpoint: false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,526 +0,0 @@
|
||||||
// Embedded icons from Open Iconic.
|
|
||||||
// Released under MIT and copyright 2014 Waybury.
|
|
||||||
// https://useiconic.com/open
|
|
||||||
|
|
||||||
|
|
||||||
// Checkboxes and radios
|
|
||||||
//
|
|
||||||
// Base class takes care of all the key behavioral aspects.
|
|
||||||
|
|
||||||
.custom-control {
|
|
||||||
position: relative;
|
|
||||||
z-index: 1;
|
|
||||||
display: block;
|
|
||||||
min-height: $font-size-base * $line-height-base;
|
|
||||||
padding-left: $custom-control-gutter + $custom-control-indicator-size;
|
|
||||||
color-adjust: exact; // Keep themed appearance for print
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control-inline {
|
|
||||||
display: inline-flex;
|
|
||||||
margin-right: $custom-control-spacer-x;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control-input {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
z-index: -1; // Put the input behind the label so it doesn't overlay text
|
|
||||||
width: $custom-control-indicator-size;
|
|
||||||
height: ($font-size-base * $line-height-base + $custom-control-indicator-size) / 2;
|
|
||||||
opacity: 0;
|
|
||||||
|
|
||||||
&:checked ~ .custom-control-label::before {
|
|
||||||
color: $custom-control-indicator-checked-color;
|
|
||||||
border-color: $custom-control-indicator-checked-border-color;
|
|
||||||
@include gradient-bg($custom-control-indicator-checked-bg);
|
|
||||||
@include box-shadow($custom-control-indicator-checked-box-shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus ~ .custom-control-label::before {
|
|
||||||
// the mixin is not used here to make sure there is feedback
|
|
||||||
@if $enable-shadows {
|
|
||||||
box-shadow: $input-box-shadow, $custom-control-indicator-focus-box-shadow;
|
|
||||||
} @else {
|
|
||||||
box-shadow: $custom-control-indicator-focus-box-shadow;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus:not(:checked) ~ .custom-control-label::before {
|
|
||||||
border-color: $custom-control-indicator-focus-border-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(:disabled):active ~ .custom-control-label::before {
|
|
||||||
color: $custom-control-indicator-active-color;
|
|
||||||
background-color: $custom-control-indicator-active-bg;
|
|
||||||
border-color: $custom-control-indicator-active-border-color;
|
|
||||||
@include box-shadow($custom-control-indicator-active-box-shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use [disabled] and :disabled to work around https://github.com/twbs/bootstrap/issues/28247
|
|
||||||
&[disabled],
|
|
||||||
&:disabled {
|
|
||||||
~ .custom-control-label {
|
|
||||||
color: $custom-control-label-disabled-color;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
background-color: $custom-control-indicator-disabled-bg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Custom control indicators
|
|
||||||
//
|
|
||||||
// Build the custom controls out of pseudo-elements.
|
|
||||||
|
|
||||||
.custom-control-label {
|
|
||||||
position: relative;
|
|
||||||
margin-bottom: 0;
|
|
||||||
color: $custom-control-label-color;
|
|
||||||
vertical-align: top;
|
|
||||||
cursor: $custom-control-cursor;
|
|
||||||
|
|
||||||
// Background-color and (when enabled) gradient
|
|
||||||
&::before {
|
|
||||||
position: absolute;
|
|
||||||
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
|
|
||||||
left: -($custom-control-gutter + $custom-control-indicator-size);
|
|
||||||
display: block;
|
|
||||||
width: $custom-control-indicator-size;
|
|
||||||
height: $custom-control-indicator-size;
|
|
||||||
pointer-events: none;
|
|
||||||
content: "";
|
|
||||||
background-color: $custom-control-indicator-bg;
|
|
||||||
border: $custom-control-indicator-border-color solid $custom-control-indicator-border-width;
|
|
||||||
@include box-shadow($custom-control-indicator-box-shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Foreground (icon)
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
|
|
||||||
left: -($custom-control-gutter + $custom-control-indicator-size);
|
|
||||||
display: block;
|
|
||||||
width: $custom-control-indicator-size;
|
|
||||||
height: $custom-control-indicator-size;
|
|
||||||
content: "";
|
|
||||||
background: 50% / #{$custom-control-indicator-bg-size} no-repeat;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Checkboxes
|
|
||||||
//
|
|
||||||
// Tweak just a few things for checkboxes.
|
|
||||||
|
|
||||||
.custom-checkbox {
|
|
||||||
.custom-control-label::before {
|
|
||||||
@include border-radius($custom-checkbox-indicator-border-radius);
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control-input:checked ~ .custom-control-label {
|
|
||||||
&::after {
|
|
||||||
background-image: escape-svg($custom-checkbox-indicator-icon-checked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control-input:indeterminate ~ .custom-control-label {
|
|
||||||
&::before {
|
|
||||||
border-color: $custom-checkbox-indicator-indeterminate-border-color;
|
|
||||||
@include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
|
|
||||||
@include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
|
|
||||||
}
|
|
||||||
&::after {
|
|
||||||
background-image: escape-svg($custom-checkbox-indicator-icon-indeterminate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control-input:disabled {
|
|
||||||
&:checked ~ .custom-control-label::before {
|
|
||||||
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
||||||
}
|
|
||||||
&:indeterminate ~ .custom-control-label::before {
|
|
||||||
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Radios
|
|
||||||
//
|
|
||||||
// Tweak just a few things for radios.
|
|
||||||
|
|
||||||
.custom-radio {
|
|
||||||
.custom-control-label::before {
|
|
||||||
// stylelint-disable-next-line property-disallowed-list
|
|
||||||
border-radius: $custom-radio-indicator-border-radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control-input:checked ~ .custom-control-label {
|
|
||||||
&::after {
|
|
||||||
background-image: escape-svg($custom-radio-indicator-icon-checked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control-input:disabled {
|
|
||||||
&:checked ~ .custom-control-label::before {
|
|
||||||
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// switches
|
|
||||||
//
|
|
||||||
// Tweak a few things for switches
|
|
||||||
|
|
||||||
.custom-switch {
|
|
||||||
padding-left: $custom-switch-width + $custom-control-gutter;
|
|
||||||
|
|
||||||
.custom-control-label {
|
|
||||||
&::before {
|
|
||||||
left: -($custom-switch-width + $custom-control-gutter);
|
|
||||||
width: $custom-switch-width;
|
|
||||||
pointer-events: all;
|
|
||||||
// stylelint-disable-next-line property-disallowed-list
|
|
||||||
border-radius: $custom-switch-indicator-border-radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
top: add(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2, $custom-control-indicator-border-width * 2);
|
|
||||||
left: add(-($custom-switch-width + $custom-control-gutter), $custom-control-indicator-border-width * 2);
|
|
||||||
width: $custom-switch-indicator-size;
|
|
||||||
height: $custom-switch-indicator-size;
|
|
||||||
background-color: $custom-control-indicator-border-color;
|
|
||||||
// stylelint-disable-next-line property-disallowed-list
|
|
||||||
border-radius: $custom-switch-indicator-border-radius;
|
|
||||||
@include transition(transform .15s ease-in-out, $custom-forms-transition);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control-input:checked ~ .custom-control-label {
|
|
||||||
&::after {
|
|
||||||
background-color: $custom-control-indicator-bg;
|
|
||||||
transform: translateX($custom-switch-width - $custom-control-indicator-size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control-input:disabled {
|
|
||||||
&:checked ~ .custom-control-label::before {
|
|
||||||
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Select
|
|
||||||
//
|
|
||||||
// Replaces the browser default select with a custom one, mostly pulled from
|
|
||||||
// https://primer.github.io/.
|
|
||||||
//
|
|
||||||
|
|
||||||
.custom-select {
|
|
||||||
display: inline-block;
|
|
||||||
width: 100%;
|
|
||||||
height: $custom-select-height;
|
|
||||||
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
|
|
||||||
font-family: $custom-select-font-family;
|
|
||||||
@include font-size($custom-select-font-size);
|
|
||||||
font-weight: $custom-select-font-weight;
|
|
||||||
line-height: $custom-select-line-height;
|
|
||||||
color: $custom-select-color;
|
|
||||||
vertical-align: middle;
|
|
||||||
background: $custom-select-bg $custom-select-background;
|
|
||||||
border: $custom-select-border-width solid $custom-select-border-color;
|
|
||||||
@include border-radius($custom-select-border-radius, 0);
|
|
||||||
@include box-shadow($custom-select-box-shadow);
|
|
||||||
appearance: none;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: $custom-select-focus-border-color;
|
|
||||||
outline: 0;
|
|
||||||
@if $enable-shadows {
|
|
||||||
@include box-shadow($custom-select-box-shadow, $custom-select-focus-box-shadow);
|
|
||||||
} @else {
|
|
||||||
// Avoid using mixin so we can pass custom focus shadow properly
|
|
||||||
box-shadow: $custom-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 IE and (under certain conditions) 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: $custom-select-padding-x;
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:disabled {
|
|
||||||
color: $custom-select-disabled-color;
|
|
||||||
background-color: $custom-select-disabled-bg;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hides the default caret in IE11
|
|
||||||
&::-ms-expand {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove outline from select box in FF
|
|
||||||
&:-moz-focusring {
|
|
||||||
color: transparent;
|
|
||||||
text-shadow: 0 0 0 $custom-select-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-select-sm {
|
|
||||||
height: $custom-select-height-sm;
|
|
||||||
padding-top: $custom-select-padding-y-sm;
|
|
||||||
padding-bottom: $custom-select-padding-y-sm;
|
|
||||||
padding-left: $custom-select-padding-x-sm;
|
|
||||||
@include font-size($custom-select-font-size-sm);
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-select-lg {
|
|
||||||
height: $custom-select-height-lg;
|
|
||||||
padding-top: $custom-select-padding-y-lg;
|
|
||||||
padding-bottom: $custom-select-padding-y-lg;
|
|
||||||
padding-left: $custom-select-padding-x-lg;
|
|
||||||
@include font-size($custom-select-font-size-lg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// File
|
|
||||||
//
|
|
||||||
// Custom file input.
|
|
||||||
|
|
||||||
.custom-file {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
width: 100%;
|
|
||||||
height: $custom-file-height;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-file-input {
|
|
||||||
position: relative;
|
|
||||||
z-index: 2;
|
|
||||||
width: 100%;
|
|
||||||
height: $custom-file-height;
|
|
||||||
margin: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
opacity: 0;
|
|
||||||
|
|
||||||
&:focus ~ .custom-file-label {
|
|
||||||
border-color: $custom-file-focus-border-color;
|
|
||||||
box-shadow: $custom-file-focus-box-shadow;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use [disabled] and :disabled to work around https://github.com/twbs/bootstrap/issues/28247
|
|
||||||
&[disabled] ~ .custom-file-label,
|
|
||||||
&:disabled ~ .custom-file-label {
|
|
||||||
background-color: $custom-file-disabled-bg;
|
|
||||||
}
|
|
||||||
|
|
||||||
@each $lang, $value in $custom-file-text {
|
|
||||||
&:lang(#{$lang}) ~ .custom-file-label::after {
|
|
||||||
content: $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
~ .custom-file-label[data-browse]::after {
|
|
||||||
content: attr(data-browse);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-file-label {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
left: 0;
|
|
||||||
z-index: 1;
|
|
||||||
height: $custom-file-height;
|
|
||||||
padding: $custom-file-padding-y $custom-file-padding-x;
|
|
||||||
overflow: hidden;
|
|
||||||
font-family: $custom-file-font-family;
|
|
||||||
font-weight: $custom-file-font-weight;
|
|
||||||
line-height: $custom-file-line-height;
|
|
||||||
color: $custom-file-color;
|
|
||||||
background-color: $custom-file-bg;
|
|
||||||
border: $custom-file-border-width solid $custom-file-border-color;
|
|
||||||
@include border-radius($custom-file-border-radius);
|
|
||||||
@include box-shadow($custom-file-box-shadow);
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 3;
|
|
||||||
display: block;
|
|
||||||
height: $custom-file-height-inner;
|
|
||||||
padding: $custom-file-padding-y $custom-file-padding-x;
|
|
||||||
line-height: $custom-file-line-height;
|
|
||||||
color: $custom-file-button-color;
|
|
||||||
content: "Browse";
|
|
||||||
@include gradient-bg($custom-file-button-bg);
|
|
||||||
border-left: inherit;
|
|
||||||
@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 pseudo
|
|
||||||
// elements cannot be mixed. As such, there are no shared styles for focus or
|
|
||||||
// active states on prefixed selectors.
|
|
||||||
|
|
||||||
.custom-range {
|
|
||||||
width: 100%;
|
|
||||||
height: add($custom-range-thumb-height, $custom-range-thumb-focus-box-shadow-width * 2);
|
|
||||||
padding: 0; // Need to reset padding
|
|
||||||
background-color: transparent;
|
|
||||||
appearance: none;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
outline: 0;
|
|
||||||
|
|
||||||
// Pseudo-elements must be split across multiple rulesets to have an effect.
|
|
||||||
// No box-shadow() mixin for focus accessibility.
|
|
||||||
&::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
||||||
&::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
||||||
&::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-moz-focus-outer {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-webkit-slider-thumb {
|
|
||||||
width: $custom-range-thumb-width;
|
|
||||||
height: $custom-range-thumb-height;
|
|
||||||
margin-top: ($custom-range-track-height - $custom-range-thumb-height) / 2; // 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);
|
|
||||||
@include transition($custom-forms-transition);
|
|
||||||
appearance: none;
|
|
||||||
|
|
||||||
&: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);
|
|
||||||
@include transition($custom-forms-transition);
|
|
||||||
appearance: none;
|
|
||||||
|
|
||||||
&: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;
|
|
||||||
margin-top: 0; // Edge specific
|
|
||||||
margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
|
||||||
margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
|
||||||
@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);
|
|
||||||
@include transition($custom-forms-transition);
|
|
||||||
appearance: none;
|
|
||||||
|
|
||||||
&: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 / 2;
|
|
||||||
@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);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:disabled {
|
|
||||||
&::-webkit-slider-thumb {
|
|
||||||
background-color: $custom-range-thumb-disabled-bg;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-webkit-slider-runnable-track {
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-moz-range-thumb {
|
|
||||||
background-color: $custom-range-thumb-disabled-bg;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-moz-range-track {
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-ms-thumb {
|
|
||||||
background-color: $custom-range-thumb-disabled-bg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control-label::before,
|
|
||||||
.custom-file-label,
|
|
||||||
.custom-select {
|
|
||||||
@include transition($custom-forms-transition);
|
|
||||||
}
|
|
|
@ -1,8 +1,10 @@
|
||||||
// The dropdown wrapper (`<div>`)
|
// The dropdown wrapper (`<div>`)
|
||||||
.dropup,
|
.dropup,
|
||||||
.dropright,
|
.dropend,
|
||||||
.dropdown,
|
.dropdown,
|
||||||
.dropleft {
|
.dropstart,
|
||||||
|
.dropup-center,
|
||||||
|
.dropdown-center {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,50 +17,107 @@
|
||||||
|
|
||||||
// The dropdown menu
|
// The dropdown menu
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
|
// scss-docs-start dropdown-css-vars
|
||||||
|
--#{$prefix}dropdown-zindex: #{$zindex-dropdown};
|
||||||
|
--#{$prefix}dropdown-min-width: #{$dropdown-min-width};
|
||||||
|
--#{$prefix}dropdown-padding-x: #{$dropdown-padding-x};
|
||||||
|
--#{$prefix}dropdown-padding-y: #{$dropdown-padding-y};
|
||||||
|
--#{$prefix}dropdown-spacer: #{$dropdown-spacer};
|
||||||
|
@include rfs($dropdown-font-size, --#{$prefix}dropdown-font-size);
|
||||||
|
--#{$prefix}dropdown-color: #{$dropdown-color};
|
||||||
|
--#{$prefix}dropdown-bg: #{$dropdown-bg};
|
||||||
|
--#{$prefix}dropdown-border-color: #{$dropdown-border-color};
|
||||||
|
--#{$prefix}dropdown-border-radius: #{$dropdown-border-radius};
|
||||||
|
--#{$prefix}dropdown-border-width: #{$dropdown-border-width};
|
||||||
|
--#{$prefix}dropdown-inner-border-radius: #{$dropdown-inner-border-radius};
|
||||||
|
--#{$prefix}dropdown-divider-bg: #{$dropdown-divider-bg};
|
||||||
|
--#{$prefix}dropdown-divider-margin-y: #{$dropdown-divider-margin-y};
|
||||||
|
--#{$prefix}dropdown-box-shadow: #{$dropdown-box-shadow};
|
||||||
|
--#{$prefix}dropdown-link-color: #{$dropdown-link-color};
|
||||||
|
--#{$prefix}dropdown-link-hover-color: #{$dropdown-link-hover-color};
|
||||||
|
--#{$prefix}dropdown-link-hover-bg: #{$dropdown-link-hover-bg};
|
||||||
|
--#{$prefix}dropdown-link-active-color: #{$dropdown-link-active-color};
|
||||||
|
--#{$prefix}dropdown-link-active-bg: #{$dropdown-link-active-bg};
|
||||||
|
--#{$prefix}dropdown-link-disabled-color: #{$dropdown-link-disabled-color};
|
||||||
|
--#{$prefix}dropdown-item-padding-x: #{$dropdown-item-padding-x};
|
||||||
|
--#{$prefix}dropdown-item-padding-y: #{$dropdown-item-padding-y};
|
||||||
|
--#{$prefix}dropdown-header-color: #{$dropdown-header-color};
|
||||||
|
--#{$prefix}dropdown-header-padding-x: #{$dropdown-header-padding-x};
|
||||||
|
--#{$prefix}dropdown-header-padding-y: #{$dropdown-header-padding-y};
|
||||||
|
// scss-docs-end dropdown-css-vars
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 100%;
|
z-index: var(--#{$prefix}dropdown-zindex);
|
||||||
left: 0;
|
|
||||||
z-index: $zindex-dropdown;
|
|
||||||
display: none; // none by default, but block on "open" of the menu
|
display: none; // none by default, but block on "open" of the menu
|
||||||
float: left;
|
min-width: var(--#{$prefix}dropdown-min-width);
|
||||||
min-width: $dropdown-min-width;
|
padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x);
|
||||||
padding: $dropdown-padding-y $dropdown-padding-x;
|
margin: 0; // Override default margin of ul
|
||||||
margin: $dropdown-spacer 0 0; // override default ul
|
@include font-size(var(--#{$prefix}dropdown-font-size));
|
||||||
@include font-size($dropdown-font-size);
|
color: var(--#{$prefix}dropdown-color);
|
||||||
color: $dropdown-color;
|
|
||||||
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
||||||
list-style: none;
|
list-style: none;
|
||||||
background-color: $dropdown-bg;
|
background-color: var(--#{$prefix}dropdown-bg);
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
border: $dropdown-border-width solid $dropdown-border-color;
|
border: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-border-color);
|
||||||
@include border-radius($dropdown-border-radius);
|
@include border-radius(var(--#{$prefix}dropdown-border-radius));
|
||||||
@include box-shadow($dropdown-box-shadow);
|
@include box-shadow(var(--#{$prefix}dropdown-box-shadow));
|
||||||
|
|
||||||
|
&[data-bs-popper] {
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
margin-top: var(--#{$prefix}dropdown-spacer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $dropdown-padding-y == 0 {
|
||||||
|
> .dropdown-item:first-child,
|
||||||
|
> li:first-child .dropdown-item {
|
||||||
|
@include border-top-radius(var(--#{$prefix}dropdown-inner-border-radius));
|
||||||
|
}
|
||||||
|
> .dropdown-item:last-child,
|
||||||
|
> li:last-child .dropdown-item {
|
||||||
|
@include border-bottom-radius(var(--#{$prefix}dropdown-inner-border-radius));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// scss-docs-start responsive-breakpoints
|
||||||
|
// We deliberately hardcode the `bs-` prefix because we check
|
||||||
|
// this custom property in JS to determine Popper's positioning
|
||||||
|
|
||||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||||
@include media-breakpoint-up($breakpoint) {
|
@include media-breakpoint-up($breakpoint) {
|
||||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||||
|
|
||||||
.dropdown-menu#{$infix}-left {
|
.dropdown-menu#{$infix}-start {
|
||||||
|
--bs-position: start;
|
||||||
|
|
||||||
|
&[data-bs-popper] {
|
||||||
right: auto;
|
right: auto;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-menu#{$infix}-right {
|
.dropdown-menu#{$infix}-end {
|
||||||
|
--bs-position: end;
|
||||||
|
|
||||||
|
&[data-bs-popper] {
|
||||||
right: 0;
|
right: 0;
|
||||||
left: auto;
|
left: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end responsive-breakpoints
|
||||||
|
|
||||||
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
||||||
// Just add .dropup after the standard .dropdown class and you're set.
|
// Just add .dropup after the standard .dropdown class and you're set.
|
||||||
.dropup {
|
.dropup {
|
||||||
.dropdown-menu {
|
.dropdown-menu[data-bs-popper] {
|
||||||
top: auto;
|
top: auto;
|
||||||
bottom: 100%;
|
bottom: 100%;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: $dropdown-spacer;
|
margin-bottom: var(--#{$prefix}dropdown-spacer);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-toggle {
|
.dropdown-toggle {
|
||||||
|
@ -66,55 +125,48 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropright {
|
.dropend {
|
||||||
.dropdown-menu {
|
.dropdown-menu[data-bs-popper] {
|
||||||
top: 0;
|
top: 0;
|
||||||
right: auto;
|
right: auto;
|
||||||
left: 100%;
|
left: 100%;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-left: $dropdown-spacer;
|
margin-left: var(--#{$prefix}dropdown-spacer);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-toggle {
|
.dropdown-toggle {
|
||||||
@include caret(right);
|
@include caret(end);
|
||||||
&::after {
|
&::after {
|
||||||
vertical-align: 0;
|
vertical-align: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropleft {
|
.dropstart {
|
||||||
.dropdown-menu {
|
.dropdown-menu[data-bs-popper] {
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 100%;
|
right: 100%;
|
||||||
left: auto;
|
left: auto;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-right: $dropdown-spacer;
|
margin-right: var(--#{$prefix}dropdown-spacer);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-toggle {
|
.dropdown-toggle {
|
||||||
@include caret(left);
|
@include caret(start);
|
||||||
&::before {
|
&::before {
|
||||||
vertical-align: 0;
|
vertical-align: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When Popper is enabled, reset the basic dropdown position
|
|
||||||
// stylelint-disable-next-line no-duplicate-selectors
|
|
||||||
.dropdown-menu {
|
|
||||||
&[x-placement^="top"],
|
|
||||||
&[x-placement^="right"],
|
|
||||||
&[x-placement^="bottom"],
|
|
||||||
&[x-placement^="left"] {
|
|
||||||
right: auto;
|
|
||||||
bottom: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dividers (basically an `<hr>`) within the dropdown
|
// Dividers (basically an `<hr>`) within the dropdown
|
||||||
.dropdown-divider {
|
.dropdown-divider {
|
||||||
@include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y, true);
|
height: 0;
|
||||||
|
margin: var(--#{$prefix}dropdown-divider-margin-y) 0;
|
||||||
|
overflow: hidden;
|
||||||
|
border-top: 1px solid var(--#{$prefix}dropdown-divider-bg);
|
||||||
|
opacity: 1; // Revisit in v6 to de-dupe styles that conflict with <hr> element
|
||||||
}
|
}
|
||||||
|
|
||||||
// Links, buttons, and more within the dropdown menu
|
// Links, buttons, and more within the dropdown menu
|
||||||
|
@ -123,50 +175,38 @@
|
||||||
.dropdown-item {
|
.dropdown-item {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%; // For `<button>`s
|
width: 100%; // For `<button>`s
|
||||||
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
|
||||||
clear: both;
|
clear: both;
|
||||||
font-weight: $font-weight-normal;
|
font-weight: $font-weight-normal;
|
||||||
color: $dropdown-link-color;
|
color: var(--#{$prefix}dropdown-link-color);
|
||||||
text-align: inherit; // For `<button>`s
|
text-align: inherit; // For `<button>`s
|
||||||
text-decoration: if($link-decoration == none, null, none);
|
text-decoration: if($link-decoration == none, null, none);
|
||||||
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
||||||
background-color: transparent; // For `<button>`s
|
background-color: transparent; // For `<button>`s
|
||||||
border: 0; // For `<button>`s
|
border: 0; // For `<button>`s
|
||||||
|
@include border-radius(var(--#{$prefix}dropdown-item-border-radius, 0));
|
||||||
|
|
||||||
// Prevent dropdown overflow if there's no padding
|
&:hover,
|
||||||
// See https://github.com/twbs/bootstrap/pull/27703
|
&:focus {
|
||||||
@if $dropdown-padding-y == 0 {
|
color: var(--#{$prefix}dropdown-link-hover-color);
|
||||||
&:first-child {
|
text-decoration: if($link-hover-decoration == underline, none, null);
|
||||||
@include border-top-radius($dropdown-inner-border-radius);
|
@include gradient-bg(var(--#{$prefix}dropdown-link-hover-bg));
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
@include border-bottom-radius($dropdown-inner-border-radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@include hover-focus() {
|
|
||||||
color: $dropdown-link-hover-color;
|
|
||||||
text-decoration: none;
|
|
||||||
@include gradient-bg($dropdown-link-hover-bg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active,
|
&.active,
|
||||||
&:active {
|
&:active {
|
||||||
color: $dropdown-link-active-color;
|
color: var(--#{$prefix}dropdown-link-active-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@include gradient-bg($dropdown-link-active-bg);
|
@include gradient-bg(var(--#{$prefix}dropdown-link-active-bg));
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled,
|
&.disabled,
|
||||||
&:disabled {
|
&:disabled {
|
||||||
color: $dropdown-link-disabled-color;
|
color: var(--#{$prefix}dropdown-link-disabled-color);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
// Remove CSS gradients if they're enabled
|
// Remove CSS gradients if they're enabled
|
||||||
@if $enable-gradients {
|
background-image: if($enable-gradients, none, null);
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,16 +217,34 @@
|
||||||
// Dropdown section headers
|
// Dropdown section headers
|
||||||
.dropdown-header {
|
.dropdown-header {
|
||||||
display: block;
|
display: block;
|
||||||
padding: $dropdown-header-padding;
|
padding: var(--#{$prefix}dropdown-header-padding-y) var(--#{$prefix}dropdown-header-padding-x);
|
||||||
margin-bottom: 0; // for use with heading elements
|
margin-bottom: 0; // for use with heading elements
|
||||||
@include font-size($font-size-sm);
|
@include font-size($font-size-sm);
|
||||||
color: $dropdown-header-color;
|
color: var(--#{$prefix}dropdown-header-color);
|
||||||
white-space: nowrap; // as with > li > a
|
white-space: nowrap; // as with > li > a
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dropdown text
|
// Dropdown text
|
||||||
.dropdown-item-text {
|
.dropdown-item-text {
|
||||||
display: block;
|
display: block;
|
||||||
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
|
||||||
color: $dropdown-link-color;
|
color: var(--#{$prefix}dropdown-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dark dropdowns
|
||||||
|
.dropdown-menu-dark {
|
||||||
|
// scss-docs-start dropdown-dark-css-vars
|
||||||
|
--#{$prefix}dropdown-color: #{$dropdown-dark-color};
|
||||||
|
--#{$prefix}dropdown-bg: #{$dropdown-dark-bg};
|
||||||
|
--#{$prefix}dropdown-border-color: #{$dropdown-dark-border-color};
|
||||||
|
--#{$prefix}dropdown-box-shadow: #{$dropdown-dark-box-shadow};
|
||||||
|
--#{$prefix}dropdown-link-color: #{$dropdown-dark-link-color};
|
||||||
|
--#{$prefix}dropdown-link-hover-color: #{$dropdown-dark-link-hover-color};
|
||||||
|
--#{$prefix}dropdown-divider-bg: #{$dropdown-dark-divider-bg};
|
||||||
|
--#{$prefix}dropdown-link-hover-bg: #{$dropdown-dark-link-hover-bg};
|
||||||
|
--#{$prefix}dropdown-link-active-color: #{$dropdown-dark-link-active-color};
|
||||||
|
--#{$prefix}dropdown-link-active-bg: #{$dropdown-dark-link-active-bg};
|
||||||
|
--#{$prefix}dropdown-link-disabled-color: #{$dropdown-dark-link-disabled-color};
|
||||||
|
--#{$prefix}dropdown-header-color: #{$dropdown-dark-header-color};
|
||||||
|
// scss-docs-end dropdown-dark-css-vars
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,347 +1,9 @@
|
||||||
// stylelint-disable selector-no-qualifying-type
|
@import "forms/labels";
|
||||||
|
@import "forms/form-text";
|
||||||
//
|
@import "forms/form-control";
|
||||||
// Textual form controls
|
@import "forms/form-select";
|
||||||
//
|
@import "forms/form-check";
|
||||||
|
@import "forms/form-range";
|
||||||
.form-control {
|
@import "forms/floating-labels";
|
||||||
display: block;
|
@import "forms/input-group";
|
||||||
width: 100%;
|
@import "forms/validation";
|
||||||
height: $input-height;
|
|
||||||
padding: $input-padding-y $input-padding-x;
|
|
||||||
font-family: $input-font-family;
|
|
||||||
@include font-size($input-font-size);
|
|
||||||
font-weight: $input-font-weight;
|
|
||||||
line-height: $input-line-height;
|
|
||||||
color: $input-color;
|
|
||||||
background-color: $input-bg;
|
|
||||||
background-clip: padding-box;
|
|
||||||
border: $input-border-width solid $input-border-color;
|
|
||||||
|
|
||||||
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
|
||||||
@include border-radius($input-border-radius, 0);
|
|
||||||
|
|
||||||
@include box-shadow($input-box-shadow);
|
|
||||||
@include transition($input-transition);
|
|
||||||
|
|
||||||
// Unstyle the caret on `<select>`s in IE10+.
|
|
||||||
&::-ms-expand {
|
|
||||||
background-color: transparent;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove select outline from select box in FF
|
|
||||||
&:-moz-focusring {
|
|
||||||
color: transparent;
|
|
||||||
text-shadow: 0 0 0 $input-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Customize the `:focus` state to imitate native WebKit styles.
|
|
||||||
@include form-control-focus($ignore-warning: true);
|
|
||||||
|
|
||||||
// Placeholder
|
|
||||||
&::placeholder {
|
|
||||||
color: $input-placeholder-color;
|
|
||||||
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disabled and read-only inputs
|
|
||||||
//
|
|
||||||
// HTML5 says that controls under a fieldset > legend:first-child won't be
|
|
||||||
// disabled if the fieldset is disabled. Due to implementation difficulty, we
|
|
||||||
// don't honor that edge case; we style them as disabled anyway.
|
|
||||||
&:disabled,
|
|
||||||
&[readonly] {
|
|
||||||
background-color: $input-disabled-bg;
|
|
||||||
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="date"],
|
|
||||||
input[type="time"],
|
|
||||||
input[type="datetime-local"],
|
|
||||||
input[type="month"] {
|
|
||||||
&.form-control {
|
|
||||||
appearance: none; // Fix appearance for date inputs in Safari
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
select.form-control {
|
|
||||||
&:focus::-ms-value {
|
|
||||||
// Suppress the nested default white text on blue background highlight given to
|
|
||||||
// the selected option text when the (still closed) <select> receives focus
|
|
||||||
// in IE and (under certain conditions) Edge, as it looks bad and cannot be made to
|
|
||||||
// match the appearance of the native widget.
|
|
||||||
// See https://github.com/twbs/bootstrap/issues/19398.
|
|
||||||
color: $input-color;
|
|
||||||
background-color: $input-bg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make file inputs better match text inputs by forcing them to new lines.
|
|
||||||
.form-control-file,
|
|
||||||
.form-control-range {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Labels
|
|
||||||
//
|
|
||||||
|
|
||||||
// For use with horizontal and inline forms, when you need the label (or legend)
|
|
||||||
// text to align with the form controls.
|
|
||||||
.col-form-label {
|
|
||||||
padding-top: add($input-padding-y, $input-border-width);
|
|
||||||
padding-bottom: add($input-padding-y, $input-border-width);
|
|
||||||
margin-bottom: 0; // Override the `<label>/<legend>` default
|
|
||||||
@include font-size(inherit); // Override the `<legend>` default
|
|
||||||
line-height: $input-line-height;
|
|
||||||
}
|
|
||||||
|
|
||||||
.col-form-label-lg {
|
|
||||||
padding-top: add($input-padding-y-lg, $input-border-width);
|
|
||||||
padding-bottom: add($input-padding-y-lg, $input-border-width);
|
|
||||||
@include font-size($input-font-size-lg);
|
|
||||||
line-height: $input-line-height-lg;
|
|
||||||
}
|
|
||||||
|
|
||||||
.col-form-label-sm {
|
|
||||||
padding-top: add($input-padding-y-sm, $input-border-width);
|
|
||||||
padding-bottom: add($input-padding-y-sm, $input-border-width);
|
|
||||||
@include font-size($input-font-size-sm);
|
|
||||||
line-height: $input-line-height-sm;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Readonly controls as plain text
|
|
||||||
//
|
|
||||||
// Apply class to a readonly input to make it appear like regular plain
|
|
||||||
// text (without any border, background color, focus indicator)
|
|
||||||
|
|
||||||
.form-control-plaintext {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
padding: $input-padding-y 0;
|
|
||||||
margin-bottom: 0; // match inputs if this class comes on inputs with default margins
|
|
||||||
@include font-size($input-font-size);
|
|
||||||
line-height: $input-line-height;
|
|
||||||
color: $input-plaintext-color;
|
|
||||||
background-color: transparent;
|
|
||||||
border: solid transparent;
|
|
||||||
border-width: $input-border-width 0;
|
|
||||||
|
|
||||||
&.form-control-sm,
|
|
||||||
&.form-control-lg {
|
|
||||||
padding-right: 0;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Form control sizing
|
|
||||||
//
|
|
||||||
// Build on `.form-control` with modifier classes to decrease or increase the
|
|
||||||
// height and font-size of form controls.
|
|
||||||
//
|
|
||||||
// Repeated in `_input_group.scss` to avoid Sass extend issues.
|
|
||||||
|
|
||||||
.form-control-sm {
|
|
||||||
height: $input-height-sm;
|
|
||||||
padding: $input-padding-y-sm $input-padding-x-sm;
|
|
||||||
@include font-size($input-font-size-sm);
|
|
||||||
line-height: $input-line-height-sm;
|
|
||||||
@include border-radius($input-border-radius-sm);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-control-lg {
|
|
||||||
height: $input-height-lg;
|
|
||||||
padding: $input-padding-y-lg $input-padding-x-lg;
|
|
||||||
@include font-size($input-font-size-lg);
|
|
||||||
line-height: $input-line-height-lg;
|
|
||||||
@include border-radius($input-border-radius-lg);
|
|
||||||
}
|
|
||||||
|
|
||||||
// stylelint-disable-next-line no-duplicate-selectors
|
|
||||||
select.form-control {
|
|
||||||
&[size],
|
|
||||||
&[multiple] {
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea.form-control {
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Form groups
|
|
||||||
//
|
|
||||||
// Designed to help with the organization and spacing of vertical forms. For
|
|
||||||
// horizontal forms, use the predefined grid classes.
|
|
||||||
|
|
||||||
.form-group {
|
|
||||||
margin-bottom: $form-group-margin-bottom;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-text {
|
|
||||||
display: block;
|
|
||||||
margin-top: $form-text-margin-top;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Form grid
|
|
||||||
//
|
|
||||||
// Special replacement for our grid system's `.row` for tighter form layouts.
|
|
||||||
|
|
||||||
.form-row {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-right: -$form-grid-gutter-width / 2;
|
|
||||||
margin-left: -$form-grid-gutter-width / 2;
|
|
||||||
|
|
||||||
> .col,
|
|
||||||
> [class*="col-"] {
|
|
||||||
padding-right: $form-grid-gutter-width / 2;
|
|
||||||
padding-left: $form-grid-gutter-width / 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Checkboxes and radios
|
|
||||||
//
|
|
||||||
// Indent the labels to position radios/checkboxes as hanging controls.
|
|
||||||
|
|
||||||
.form-check {
|
|
||||||
position: relative;
|
|
||||||
display: block;
|
|
||||||
padding-left: $form-check-input-gutter;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-check-input {
|
|
||||||
position: absolute;
|
|
||||||
margin-top: $form-check-input-margin-y;
|
|
||||||
margin-left: -$form-check-input-gutter;
|
|
||||||
|
|
||||||
// Use [disabled] and :disabled for workaround https://github.com/twbs/bootstrap/issues/28247
|
|
||||||
&[disabled] ~ .form-check-label,
|
|
||||||
&:disabled ~ .form-check-label {
|
|
||||||
color: $text-muted;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-check-label {
|
|
||||||
margin-bottom: 0; // Override default `<label>` bottom margin
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-check-inline {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
padding-left: 0; // Override base .form-check
|
|
||||||
margin-right: $form-check-inline-margin-x;
|
|
||||||
|
|
||||||
// Undo .form-check-input defaults and add some `margin-right`.
|
|
||||||
.form-check-input {
|
|
||||||
position: static;
|
|
||||||
margin-top: 0;
|
|
||||||
margin-right: $form-check-inline-input-margin-x;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Form validation
|
|
||||||
//
|
|
||||||
// Provide feedback to users when form field values are valid or invalid. Works
|
|
||||||
// primarily for client-side validation via scoped `:invalid` and `:valid`
|
|
||||||
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
|
||||||
// server side validation.
|
|
||||||
|
|
||||||
@each $state, $data in $form-validation-states {
|
|
||||||
@include form-validation-state($state, map-get($data, color), map-get($data, icon));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Inline forms
|
|
||||||
//
|
|
||||||
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
|
|
||||||
// forms begin stacked on extra small (mobile) devices and then go inline when
|
|
||||||
// viewports reach <768px.
|
|
||||||
//
|
|
||||||
// Requires wrapping inputs and labels with `.form-group` for proper display of
|
|
||||||
// default HTML form controls and our custom form controls (e.g., input groups).
|
|
||||||
|
|
||||||
.form-inline {
|
|
||||||
display: flex;
|
|
||||||
flex-flow: row wrap;
|
|
||||||
align-items: center; // Prevent shorter elements from growing to same height as others (e.g., small buttons growing to normal sized button height)
|
|
||||||
|
|
||||||
// Because we use flex, the initial sizing of checkboxes is collapsed and
|
|
||||||
// doesn't occupy the full-width (which is what we want for xs grid tier),
|
|
||||||
// so we force that here.
|
|
||||||
.form-check {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Kick in the inline
|
|
||||||
@include media-breakpoint-up(sm) {
|
|
||||||
label {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Inline-block all the things for "inline"
|
|
||||||
.form-group {
|
|
||||||
display: flex;
|
|
||||||
flex: 0 0 auto;
|
|
||||||
flex-flow: row wrap;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Allow folks to *not* use `.form-group`
|
|
||||||
.form-control {
|
|
||||||
display: inline-block;
|
|
||||||
width: auto; // Prevent labels from stacking above inputs in `.form-group`
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make static controls behave like regular ones
|
|
||||||
.form-control-plaintext {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-group,
|
|
||||||
.custom-select {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove default margin on radios/checkboxes that were used for stacking, and
|
|
||||||
// then undo the floating of radios and checkboxes to match.
|
|
||||||
.form-check {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: auto;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
.form-check-input {
|
|
||||||
position: relative;
|
|
||||||
flex-shrink: 0;
|
|
||||||
margin-top: 0;
|
|
||||||
margin-right: $form-check-input-margin-x;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-control {
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.custom-control-label {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -32,10 +32,84 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Colors
|
||||||
|
@function to-rgb($value) {
|
||||||
|
@return red($value), green($value), blue($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// stylelint-disable scss/dollar-variable-pattern
|
||||||
|
@function rgba-css-var($identifier, $target) {
|
||||||
|
@if $identifier == "body" and $target == "bg" {
|
||||||
|
@return rgba(var(--#{$prefix}#{$identifier}-bg-rgb), var(--#{$prefix}#{$target}-opacity));
|
||||||
|
} @if $identifier == "body" and $target == "text" {
|
||||||
|
@return rgba(var(--#{$prefix}#{$identifier}-color-rgb), var(--#{$prefix}#{$target}-opacity));
|
||||||
|
} @else {
|
||||||
|
@return rgba(var(--#{$prefix}#{$identifier}-rgb), var(--#{$prefix}#{$target}-opacity));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@function map-loop($map, $func, $args...) {
|
||||||
|
$_map: ();
|
||||||
|
|
||||||
|
@each $key, $value in $map {
|
||||||
|
// allow to pass the $key and $value of the map as an function argument
|
||||||
|
$_args: ();
|
||||||
|
@each $arg in $args {
|
||||||
|
$_args: append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg)));
|
||||||
|
}
|
||||||
|
|
||||||
|
$_map: map-merge($_map, ($key: call(get-function($func), $_args...)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@return $_map;
|
||||||
|
}
|
||||||
|
// stylelint-enable scss/dollar-variable-pattern
|
||||||
|
|
||||||
|
@function varify($list) {
|
||||||
|
$result: null;
|
||||||
|
@each $entry in $list {
|
||||||
|
$result: append($result, var(--#{$prefix}#{$entry}), space);
|
||||||
|
}
|
||||||
|
@return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Internal Bootstrap function to turn maps into its negative variant.
|
||||||
|
// It prefixes the keys with `n` and makes the value negative.
|
||||||
|
@function negativify-map($map) {
|
||||||
|
$result: ();
|
||||||
|
@each $key, $value in $map {
|
||||||
|
@if $key != 0 {
|
||||||
|
$result: map-merge($result, ("n" + $key: (-$value)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get multiple keys from a sass map
|
||||||
|
@function map-get-multiple($map, $values) {
|
||||||
|
$result: ();
|
||||||
|
@each $key, $value in $map {
|
||||||
|
@if (index($values, $key) != null) {
|
||||||
|
$result: map-merge($result, ($key: $value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Merge multiple maps
|
||||||
|
@function map-merge-multiple($maps...) {
|
||||||
|
$merged-maps: ();
|
||||||
|
|
||||||
|
@each $map in $maps {
|
||||||
|
$merged-maps: map-merge($merged-maps, $map);
|
||||||
|
}
|
||||||
|
@return $merged-maps;
|
||||||
|
}
|
||||||
|
|
||||||
// Replace `$search` with `$replace` in `$string`
|
// Replace `$search` with `$replace` in `$string`
|
||||||
// Used on our SVG icon backgrounds for custom forms.
|
// Used on our SVG icon backgrounds for custom forms.
|
||||||
//
|
//
|
||||||
// @author Hugo Giraudel
|
// @author Kitty Giraudel
|
||||||
// @param {String} $string - Initial string
|
// @param {String} $string - Initial string
|
||||||
// @param {String} $search - Substring to replace
|
// @param {String} $search - Substring to replace
|
||||||
// @param {String} $replace ('') - New value
|
// @param {String} $replace ('') - New value
|
||||||
|
@ -70,42 +144,80 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Color contrast
|
// Color contrast
|
||||||
@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
|
// See https://github.com/twbs/bootstrap/pull/30168
|
||||||
$r: red($color);
|
|
||||||
$g: green($color);
|
|
||||||
$b: blue($color);
|
|
||||||
|
|
||||||
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
|
// A list of pre-calculated numbers of pow(divide((divide($value, 255) + .055), 1.055), 2.4). (from 0 to 255)
|
||||||
|
// stylelint-disable-next-line scss/dollar-variable-default, scss/dollar-variable-pattern
|
||||||
|
$_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 .0033 .0037 .004 .0044 .0048 .0052 .0056 .006 .0065 .007 .0075 .008 .0086 .0091 .0097 .0103 .011 .0116 .0123 .013 .0137 .0144 .0152 .016 .0168 .0176 .0185 .0194 .0203 .0212 .0222 .0232 .0242 .0252 .0262 .0273 .0284 .0296 .0307 .0319 .0331 .0343 .0356 .0369 .0382 .0395 .0409 .0423 .0437 .0452 .0467 .0482 .0497 .0513 .0529 .0545 .0561 .0578 .0595 .0612 .063 .0648 .0666 .0685 .0704 .0723 .0742 .0762 .0782 .0802 .0823 .0844 .0865 .0887 .0908 .0931 .0953 .0976 .0999 .1022 .1046 .107 .1095 .1119 .1144 .117 .1195 .1221 .1248 .1274 .1301 .1329 .1356 .1384 .1413 .1441 .147 .15 .1529 .1559 .159 .162 .1651 .1683 .1714 .1746 .1779 .1812 .1845 .1878 .1912 .1946 .1981 .2016 .2051 .2086 .2122 .2159 .2195 .2232 .227 .2307 .2346 .2384 .2423 .2462 .2502 .2542 .2582 .2623 .2664 .2705 .2747 .2789 .2831 .2874 .2918 .2961 .3005 .305 .3095 .314 .3185 .3231 .3278 .3325 .3372 .3419 .3467 .3515 .3564 .3613 .3663 .3712 .3763 .3813 .3864 .3916 .3968 .402 .4072 .4125 .4179 .4233 .4287 .4342 .4397 .4452 .4508 .4564 .4621 .4678 .4735 .4793 .4851 .491 .4969 .5029 .5089 .5149 .521 .5271 .5333 .5395 .5457 .552 .5583 .5647 .5711 .5776 .5841 .5906 .5972 .6038 .6105 .6172 .624 .6308 .6376 .6445 .6514 .6584 .6654 .6724 .6795 .6867 .6939 .7011 .7084 .7157 .7231 .7305 .7379 .7454 .7529 .7605 .7682 .7758 .7835 .7913 .7991 .807 .8148 .8228 .8308 .8388 .8469 .855 .8632 .8714 .8796 .8879 .8963 .9047 .9131 .9216 .9301 .9387 .9473 .956 .9647 .9734 .9823 .9911 1;
|
||||||
|
|
||||||
@if ($yiq >= $yiq-contrasted-threshold) {
|
@function color-contrast($background, $color-contrast-dark: $color-contrast-dark, $color-contrast-light: $color-contrast-light, $min-contrast-ratio: $min-contrast-ratio) {
|
||||||
@return $dark;
|
$foregrounds: $color-contrast-light, $color-contrast-dark, $white, $black;
|
||||||
} @else {
|
$max-ratio: 0;
|
||||||
@return $light;
|
$max-ratio-color: null;
|
||||||
|
|
||||||
|
@each $color in $foregrounds {
|
||||||
|
$contrast-ratio: contrast-ratio($background, $color);
|
||||||
|
@if $contrast-ratio > $min-contrast-ratio {
|
||||||
|
@return $color;
|
||||||
|
} @else if $contrast-ratio > $max-ratio {
|
||||||
|
$max-ratio: $contrast-ratio;
|
||||||
|
$max-ratio-color: $color;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$background}...";
|
||||||
|
|
||||||
|
@return $max-ratio-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve color Sass maps
|
@function contrast-ratio($background, $foreground: $color-contrast-light) {
|
||||||
@function color($key: "blue") {
|
$l1: luminance($background);
|
||||||
@return map-get($colors, $key);
|
$l2: luminance(opaque($background, $foreground));
|
||||||
|
|
||||||
|
@return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
|
||||||
}
|
}
|
||||||
|
|
||||||
@function theme-color($key: "primary") {
|
// Return WCAG2.1 relative luminance
|
||||||
@return map-get($theme-colors, $key);
|
// See https://www.w3.org/TR/WCAG/#dfn-relative-luminance
|
||||||
|
// See https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
|
||||||
|
@function luminance($color) {
|
||||||
|
$rgb: (
|
||||||
|
"r": red($color),
|
||||||
|
"g": green($color),
|
||||||
|
"b": blue($color)
|
||||||
|
);
|
||||||
|
|
||||||
|
@each $name, $value in $rgb {
|
||||||
|
$value: if(divide($value, 255) < .04045, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
|
||||||
|
$rgb: map-merge($rgb, ($name: $value));
|
||||||
|
}
|
||||||
|
|
||||||
|
@return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
|
||||||
}
|
}
|
||||||
|
|
||||||
@function gray($key: "100") {
|
// Return opaque color
|
||||||
@return map-get($grays, $key);
|
// opaque(#fff, rgba(0, 0, 0, .5)) => #808080
|
||||||
|
@function opaque($background, $foreground) {
|
||||||
|
@return mix(rgba($foreground, 1), $background, opacity($foreground) * 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Request a theme color level
|
// scss-docs-start color-functions
|
||||||
@function theme-color-level($color-name: "primary", $level: 0) {
|
// Tint a color: mix a color with white
|
||||||
$color: theme-color($color-name);
|
@function tint-color($color, $weight) {
|
||||||
$color-base: if($level > 0, $black, $white);
|
@return mix(white, $color, $weight);
|
||||||
$level: abs($level);
|
|
||||||
|
|
||||||
@return mix($color-base, $color, $level * $theme-color-interval);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Shade a color: mix a color with black
|
||||||
|
@function shade-color($color, $weight) {
|
||||||
|
@return mix(black, $color, $weight);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Shade the color if the weight is positive, else tint it
|
||||||
|
@function shift-color($color, $weight) {
|
||||||
|
@return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight));
|
||||||
|
}
|
||||||
|
// scss-docs-end color-functions
|
||||||
|
|
||||||
// Return valid calc
|
// Return valid calc
|
||||||
@function add($value1, $value2, $return-calc: true) {
|
@function add($value1, $value2, $return-calc: true) {
|
||||||
@if $value1 == null {
|
@if $value1 == null {
|
||||||
|
@ -140,5 +252,51 @@
|
||||||
@return $value1 - $value2;
|
@return $value1 - $value2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if type-of($value2) != number {
|
||||||
|
$value2: unquote("(") + $value2 + unquote(")");
|
||||||
|
}
|
||||||
|
|
||||||
@return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
|
@return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@function divide($dividend, $divisor, $precision: 10) {
|
||||||
|
$sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
|
||||||
|
$dividend: abs($dividend);
|
||||||
|
$divisor: abs($divisor);
|
||||||
|
@if $dividend == 0 {
|
||||||
|
@return 0;
|
||||||
|
}
|
||||||
|
@if $divisor == 0 {
|
||||||
|
@error "Cannot divide by 0";
|
||||||
|
}
|
||||||
|
$remainder: $dividend;
|
||||||
|
$result: 0;
|
||||||
|
$factor: 10;
|
||||||
|
@while ($remainder > 0 and $precision >= 0) {
|
||||||
|
$quotient: 0;
|
||||||
|
@while ($remainder >= $divisor) {
|
||||||
|
$remainder: $remainder - $divisor;
|
||||||
|
$quotient: $quotient + 1;
|
||||||
|
}
|
||||||
|
$result: $result * 10 + $quotient;
|
||||||
|
$factor: $factor * .1;
|
||||||
|
$remainder: $remainder * 10;
|
||||||
|
$precision: $precision - 1;
|
||||||
|
@if ($precision < 0 and $remainder >= $divisor * 5) {
|
||||||
|
$result: $result + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$result: $result * $factor * $sign;
|
||||||
|
$dividend-unit: unit($dividend);
|
||||||
|
$divisor-unit: unit($divisor);
|
||||||
|
$unit-map: (
|
||||||
|
"px": 1px,
|
||||||
|
"rem": 1rem,
|
||||||
|
"em": 1em,
|
||||||
|
"%": 1%
|
||||||
|
);
|
||||||
|
@if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
|
||||||
|
$result: $result * map-get($unit-map, $dividend-unit);
|
||||||
|
}
|
||||||
|
@return $result;
|
||||||
|
}
|
||||||
|
|
|
@ -1,69 +1,35 @@
|
||||||
// Container widths
|
|
||||||
//
|
|
||||||
// Set the container width, and override it for fixed navbars in media queries.
|
|
||||||
|
|
||||||
@if $enable-grid-classes {
|
|
||||||
// Single container class with breakpoint max-widths
|
|
||||||
.container,
|
|
||||||
// 100% wide container at all breakpoints
|
|
||||||
.container-fluid {
|
|
||||||
@include make-container();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Responsive containers that are 100% wide until a breakpoint
|
|
||||||
@each $breakpoint, $container-max-width in $container-max-widths {
|
|
||||||
.container-#{$breakpoint} {
|
|
||||||
@extend .container-fluid;
|
|
||||||
}
|
|
||||||
|
|
||||||
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
|
|
||||||
%responsive-container-#{$breakpoint} {
|
|
||||||
max-width: $container-max-width;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Extend each breakpoint which is smaller or equal to the current breakpoint
|
|
||||||
$extend-breakpoint: true;
|
|
||||||
|
|
||||||
@each $name, $width in $grid-breakpoints {
|
|
||||||
@if ($extend-breakpoint) {
|
|
||||||
.container#{breakpoint-infix($name, $grid-breakpoints)} {
|
|
||||||
@extend %responsive-container-#{$breakpoint};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Once the current breakpoint is reached, stop extending
|
|
||||||
@if ($breakpoint == $name) {
|
|
||||||
$extend-breakpoint: false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Row
|
// Row
|
||||||
//
|
//
|
||||||
// Rows contain your columns.
|
// Rows contain your columns.
|
||||||
|
|
||||||
|
:root {
|
||||||
|
@each $name, $value in $grid-breakpoints {
|
||||||
|
--#{$prefix}breakpoint-#{$name}: #{$value};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@if $enable-grid-classes {
|
@if $enable-grid-classes {
|
||||||
.row {
|
.row {
|
||||||
@include make-row();
|
@include make-row();
|
||||||
}
|
|
||||||
|
|
||||||
// Remove the negative margin from default .row, then the horizontal padding
|
> * {
|
||||||
// from all immediate children columns (to prevent runaway style inheritance).
|
@include make-col-ready();
|
||||||
.no-gutters {
|
|
||||||
margin-right: 0;
|
|
||||||
margin-left: 0;
|
|
||||||
|
|
||||||
> .col,
|
|
||||||
> [class*="col-"] {
|
|
||||||
padding-right: 0;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if $enable-cssgrid {
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: repeat(var(--#{$prefix}rows, 1), 1fr);
|
||||||
|
grid-template-columns: repeat(var(--#{$prefix}columns, #{$grid-columns}), 1fr);
|
||||||
|
gap: var(--#{$prefix}gap, #{$grid-gutter-width});
|
||||||
|
|
||||||
|
@include make-cssgrid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Columns
|
// Columns
|
||||||
//
|
//
|
||||||
// Common styles for small and large grid columns
|
// Common styles for small and large grid columns
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
@import "helpers/clearfix";
|
||||||
|
@import "helpers/color-bg";
|
||||||
|
@import "helpers/colored-links";
|
||||||
|
@import "helpers/focus-ring";
|
||||||
|
@import "helpers/icon-link";
|
||||||
|
@import "helpers/ratio";
|
||||||
|
@import "helpers/position";
|
||||||
|
@import "helpers/stacks";
|
||||||
|
@import "helpers/visually-hidden";
|
||||||
|
@import "helpers/stretched-link";
|
||||||
|
@import "helpers/text-truncation";
|
||||||
|
@import "helpers/vr";
|
|
@ -32,7 +32,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.figure-img {
|
.figure-img {
|
||||||
margin-bottom: $spacer / 2;
|
margin-bottom: $spacer * .5;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,208 +0,0 @@
|
||||||
// stylelint-disable selector-no-qualifying-type
|
|
||||||
|
|
||||||
//
|
|
||||||
// Base styles
|
|
||||||
//
|
|
||||||
|
|
||||||
.input-group {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap; // For form validation feedback
|
|
||||||
align-items: stretch;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
> .form-control,
|
|
||||||
> .form-control-plaintext,
|
|
||||||
> .custom-select,
|
|
||||||
> .custom-file {
|
|
||||||
position: relative; // For focus state's z-index
|
|
||||||
flex: 1 1 auto;
|
|
||||||
width: 1%;
|
|
||||||
min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
|
|
||||||
margin-bottom: 0;
|
|
||||||
|
|
||||||
+ .form-control,
|
|
||||||
+ .custom-select,
|
|
||||||
+ .custom-file {
|
|
||||||
margin-left: -$input-border-width;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bring the "active" form control to the top of surrounding elements
|
|
||||||
> .form-control:focus,
|
|
||||||
> .custom-select:focus,
|
|
||||||
> .custom-file .custom-file-input:focus ~ .custom-file-label {
|
|
||||||
z-index: 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bring the custom file input above the label
|
|
||||||
> .custom-file .custom-file-input:focus {
|
|
||||||
z-index: 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .form-control,
|
|
||||||
> .custom-select {
|
|
||||||
&:not(:first-child) { @include border-left-radius(0); }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Custom file inputs have more complex markup, thus requiring different
|
|
||||||
// border-radius overrides.
|
|
||||||
> .custom-file {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
&:not(:last-child) .custom-file-label,
|
|
||||||
&:not(:first-child) .custom-file-label { @include border-left-radius(0); }
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(.has-validation) {
|
|
||||||
> .form-control:not(:last-child),
|
|
||||||
> .custom-select:not(:last-child),
|
|
||||||
> .custom-file:not(:last-child) .custom-file-label::after {
|
|
||||||
@include border-right-radius(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.has-validation {
|
|
||||||
> .form-control:nth-last-child(n + 3),
|
|
||||||
> .custom-select:nth-last-child(n + 3),
|
|
||||||
> .custom-file:nth-last-child(n + 3) .custom-file-label::after {
|
|
||||||
@include border-right-radius(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Prepend and append
|
|
||||||
//
|
|
||||||
// While it requires one extra layer of HTML for each, dedicated prepend and
|
|
||||||
// append elements allow us to 1) be less clever, 2) simplify our selectors, and
|
|
||||||
// 3) support HTML5 form validation.
|
|
||||||
|
|
||||||
.input-group-prepend,
|
|
||||||
.input-group-append {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
// 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.
|
|
||||||
.btn {
|
|
||||||
position: relative;
|
|
||||||
z-index: 2;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
z-index: 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn + .btn,
|
|
||||||
.btn + .input-group-text,
|
|
||||||
.input-group-text + .input-group-text,
|
|
||||||
.input-group-text + .btn {
|
|
||||||
margin-left: -$input-border-width;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-group-prepend { margin-right: -$input-border-width; }
|
|
||||||
.input-group-append { margin-left: -$input-border-width; }
|
|
||||||
|
|
||||||
|
|
||||||
// Textual addons
|
|
||||||
//
|
|
||||||
// Serves as a catch-all element for any text or radio/checkbox input you wish
|
|
||||||
// to prepend or append to an input.
|
|
||||||
|
|
||||||
.input-group-text {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: $input-padding-y $input-padding-x;
|
|
||||||
margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
|
|
||||||
@include font-size($input-font-size); // Match inputs
|
|
||||||
font-weight: $font-weight-normal;
|
|
||||||
line-height: $input-line-height;
|
|
||||||
color: $input-group-addon-color;
|
|
||||||
text-align: center;
|
|
||||||
white-space: nowrap;
|
|
||||||
background-color: $input-group-addon-bg;
|
|
||||||
border: $input-border-width solid $input-group-addon-border-color;
|
|
||||||
@include border-radius($input-border-radius);
|
|
||||||
|
|
||||||
// Nuke default margins from checkboxes and radios to vertically center within.
|
|
||||||
input[type="radio"],
|
|
||||||
input[type="checkbox"] {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Sizing
|
|
||||||
//
|
|
||||||
// Remix the default form control sizing classes into new ones for easier
|
|
||||||
// manipulation.
|
|
||||||
|
|
||||||
.input-group-lg > .form-control:not(textarea),
|
|
||||||
.input-group-lg > .custom-select {
|
|
||||||
height: $input-height-lg;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-group-lg > .form-control,
|
|
||||||
.input-group-lg > .custom-select,
|
|
||||||
.input-group-lg > .input-group-prepend > .input-group-text,
|
|
||||||
.input-group-lg > .input-group-append > .input-group-text,
|
|
||||||
.input-group-lg > .input-group-prepend > .btn,
|
|
||||||
.input-group-lg > .input-group-append > .btn {
|
|
||||||
padding: $input-padding-y-lg $input-padding-x-lg;
|
|
||||||
@include font-size($input-font-size-lg);
|
|
||||||
line-height: $input-line-height-lg;
|
|
||||||
@include border-radius($input-border-radius-lg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-group-sm > .form-control:not(textarea),
|
|
||||||
.input-group-sm > .custom-select {
|
|
||||||
height: $input-height-sm;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-group-sm > .form-control,
|
|
||||||
.input-group-sm > .custom-select,
|
|
||||||
.input-group-sm > .input-group-prepend > .input-group-text,
|
|
||||||
.input-group-sm > .input-group-append > .input-group-text,
|
|
||||||
.input-group-sm > .input-group-prepend > .btn,
|
|
||||||
.input-group-sm > .input-group-append > .btn {
|
|
||||||
padding: $input-padding-y-sm $input-padding-x-sm;
|
|
||||||
@include font-size($input-font-size-sm);
|
|
||||||
line-height: $input-line-height-sm;
|
|
||||||
@include border-radius($input-border-radius-sm);
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-group-lg > .custom-select,
|
|
||||||
.input-group-sm > .custom-select {
|
|
||||||
padding-right: $custom-select-padding-x + $custom-select-indicator-padding;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Prepend and append rounded corners
|
|
||||||
//
|
|
||||||
// These rulesets must come after the sizing ones to properly override sm and lg
|
|
||||||
// border-radius values when extending. They're more specific than we'd like
|
|
||||||
// with the `.input-group >` part, but without it, we cannot override the sizing.
|
|
||||||
|
|
||||||
|
|
||||||
.input-group > .input-group-prepend > .btn,
|
|
||||||
.input-group > .input-group-prepend > .input-group-text,
|
|
||||||
.input-group:not(.has-validation) > .input-group-append:not(:last-child) > .btn,
|
|
||||||
.input-group:not(.has-validation) > .input-group-append:not(:last-child) > .input-group-text,
|
|
||||||
.input-group.has-validation > .input-group-append:nth-last-child(n + 3) > .btn,
|
|
||||||
.input-group.has-validation > .input-group-append:nth-last-child(n + 3) > .input-group-text,
|
|
||||||
.input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle),
|
|
||||||
.input-group > .input-group-append:last-child > .input-group-text:not(:last-child) {
|
|
||||||
@include border-right-radius(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-group > .input-group-append > .btn,
|
|
||||||
.input-group > .input-group-append > .input-group-text,
|
|
||||||
.input-group > .input-group-prepend:not(:first-child) > .btn,
|
|
||||||
.input-group > .input-group-prepend:not(:first-child) > .input-group-text,
|
|
||||||
.input-group > .input-group-prepend:first-child > .btn:not(:first-child),
|
|
||||||
.input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) {
|
|
||||||
@include border-left-radius(0);
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
.jumbotron {
|
|
||||||
padding: $jumbotron-padding ($jumbotron-padding / 2);
|
|
||||||
margin-bottom: $jumbotron-padding;
|
|
||||||
color: $jumbotron-color;
|
|
||||||
background-color: $jumbotron-bg;
|
|
||||||
@include border-radius($border-radius-lg);
|
|
||||||
|
|
||||||
@include media-breakpoint-up(sm) {
|
|
||||||
padding: ($jumbotron-padding * 2) $jumbotron-padding;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.jumbotron-fluid {
|
|
||||||
padding-right: 0;
|
|
||||||
padding-left: 0;
|
|
||||||
@include border-radius(0);
|
|
||||||
}
|
|
|
@ -3,15 +3,45 @@
|
||||||
// Easily usable on <ul>, <ol>, or <div>.
|
// Easily usable on <ul>, <ol>, or <div>.
|
||||||
|
|
||||||
.list-group {
|
.list-group {
|
||||||
|
// scss-docs-start list-group-css-vars
|
||||||
|
--#{$prefix}list-group-color: #{$list-group-color};
|
||||||
|
--#{$prefix}list-group-bg: #{$list-group-bg};
|
||||||
|
--#{$prefix}list-group-border-color: #{$list-group-border-color};
|
||||||
|
--#{$prefix}list-group-border-width: #{$list-group-border-width};
|
||||||
|
--#{$prefix}list-group-border-radius: #{$list-group-border-radius};
|
||||||
|
--#{$prefix}list-group-item-padding-x: #{$list-group-item-padding-x};
|
||||||
|
--#{$prefix}list-group-item-padding-y: #{$list-group-item-padding-y};
|
||||||
|
--#{$prefix}list-group-action-color: #{$list-group-action-color};
|
||||||
|
--#{$prefix}list-group-action-hover-color: #{$list-group-action-hover-color};
|
||||||
|
--#{$prefix}list-group-action-hover-bg: #{$list-group-hover-bg};
|
||||||
|
--#{$prefix}list-group-action-active-color: #{$list-group-action-active-color};
|
||||||
|
--#{$prefix}list-group-action-active-bg: #{$list-group-action-active-bg};
|
||||||
|
--#{$prefix}list-group-disabled-color: #{$list-group-disabled-color};
|
||||||
|
--#{$prefix}list-group-disabled-bg: #{$list-group-disabled-bg};
|
||||||
|
--#{$prefix}list-group-active-color: #{$list-group-active-color};
|
||||||
|
--#{$prefix}list-group-active-bg: #{$list-group-active-bg};
|
||||||
|
--#{$prefix}list-group-active-border-color: #{$list-group-active-border-color};
|
||||||
|
// scss-docs-end list-group-css-vars
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
// No need to set list-style: none; since .list-group-item is block level
|
// No need to set list-style: none; since .list-group-item is block level
|
||||||
padding-left: 0; // reset padding because ul and ol
|
padding-left: 0; // reset padding because ul and ol
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@include border-radius($list-group-border-radius);
|
@include border-radius(var(--#{$prefix}list-group-border-radius));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-group-numbered {
|
||||||
|
list-style-type: none;
|
||||||
|
counter-reset: section;
|
||||||
|
|
||||||
|
> .list-group-item::before {
|
||||||
|
// Increments only this instance of the section counter
|
||||||
|
content: counters(section, ".") ". ";
|
||||||
|
counter-increment: section;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Interactive list items
|
// Interactive list items
|
||||||
//
|
//
|
||||||
|
@ -20,24 +50,24 @@
|
||||||
|
|
||||||
.list-group-item-action {
|
.list-group-item-action {
|
||||||
width: 100%; // For `<button>`s (anchors become 100% by default though)
|
width: 100%; // For `<button>`s (anchors become 100% by default though)
|
||||||
color: $list-group-action-color;
|
color: var(--#{$prefix}list-group-action-color);
|
||||||
text-align: inherit; // For `<button>`s (anchors inherit)
|
text-align: inherit; // For `<button>`s (anchors inherit)
|
||||||
|
|
||||||
// Hover state
|
// Hover state
|
||||||
@include hover-focus() {
|
&:hover,
|
||||||
|
&:focus {
|
||||||
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
||||||
color: $list-group-action-hover-color;
|
color: var(--#{$prefix}list-group-action-hover-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-color: $list-group-hover-bg;
|
background-color: var(--#{$prefix}list-group-action-hover-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
color: $list-group-action-active-color;
|
color: var(--#{$prefix}list-group-action-active-color);
|
||||||
background-color: $list-group-action-active-bg;
|
background-color: var(--#{$prefix}list-group-action-active-bg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Individual list items
|
// Individual list items
|
||||||
//
|
//
|
||||||
// Use on `li`s or `div`s within the `.list-group` parent.
|
// Use on `li`s or `div`s within the `.list-group` parent.
|
||||||
|
@ -45,11 +75,11 @@
|
||||||
.list-group-item {
|
.list-group-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
padding: var(--#{$prefix}list-group-item-padding-y) var(--#{$prefix}list-group-item-padding-x);
|
||||||
color: $list-group-color;
|
color: var(--#{$prefix}list-group-color);
|
||||||
text-decoration: if($link-decoration == none, null, none);
|
text-decoration: if($link-decoration == none, null, none);
|
||||||
background-color: $list-group-bg;
|
background-color: var(--#{$prefix}list-group-bg);
|
||||||
border: $list-group-border-width solid $list-group-border-color;
|
border: var(--#{$prefix}list-group-border-width) solid var(--#{$prefix}list-group-border-color);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
@include border-top-radius(inherit);
|
@include border-top-radius(inherit);
|
||||||
|
@ -61,30 +91,30 @@
|
||||||
|
|
||||||
&.disabled,
|
&.disabled,
|
||||||
&:disabled {
|
&:disabled {
|
||||||
color: $list-group-disabled-color;
|
color: var(--#{$prefix}list-group-disabled-color);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
background-color: $list-group-disabled-bg;
|
background-color: var(--#{$prefix}list-group-disabled-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include both here for `<a>`s and `<button>`s
|
// Include both here for `<a>`s and `<button>`s
|
||||||
&.active {
|
&.active {
|
||||||
z-index: 2; // Place active items above their siblings for proper border styling
|
z-index: 2; // Place active items above their siblings for proper border styling
|
||||||
color: $list-group-active-color;
|
color: var(--#{$prefix}list-group-active-color);
|
||||||
background-color: $list-group-active-bg;
|
background-color: var(--#{$prefix}list-group-active-bg);
|
||||||
border-color: $list-group-active-border-color;
|
border-color: var(--#{$prefix}list-group-active-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
& + & {
|
// stylelint-disable-next-line scss/selector-no-redundant-nesting-selector
|
||||||
|
& + .list-group-item {
|
||||||
border-top-width: 0;
|
border-top-width: 0;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
margin-top: -$list-group-border-width;
|
margin-top: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
|
||||||
border-top-width: $list-group-border-width;
|
border-top-width: var(--#{$prefix}list-group-border-width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Horizontal
|
// Horizontal
|
||||||
//
|
//
|
||||||
// Change the layout of list group items from vertical (default) to horizontal.
|
// Change the layout of list group items from vertical (default) to horizontal.
|
||||||
|
@ -97,14 +127,14 @@
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
||||||
> .list-group-item {
|
> .list-group-item {
|
||||||
&:first-child {
|
&:first-child:not(:last-child) {
|
||||||
@include border-bottom-left-radius($list-group-border-radius);
|
@include border-bottom-start-radius(var(--#{$prefix}list-group-border-radius));
|
||||||
@include border-top-right-radius(0);
|
@include border-top-end-radius(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child:not(:first-child) {
|
||||||
@include border-top-right-radius($list-group-border-radius);
|
@include border-top-end-radius(var(--#{$prefix}list-group-border-radius));
|
||||||
@include border-bottom-left-radius(0);
|
@include border-bottom-start-radius(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
|
@ -112,12 +142,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
+ .list-group-item {
|
+ .list-group-item {
|
||||||
border-top-width: $list-group-border-width;
|
border-top-width: var(--#{$prefix}list-group-border-width);
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
margin-left: -$list-group-border-width;
|
margin-left: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
|
||||||
border-left-width: $list-group-border-width;
|
border-left-width: var(--#{$prefix}list-group-border-width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,7 +165,7 @@
|
||||||
@include border-radius(0);
|
@include border-radius(0);
|
||||||
|
|
||||||
> .list-group-item {
|
> .list-group-item {
|
||||||
border-width: 0 0 $list-group-border-width;
|
border-width: 0 0 var(--#{$prefix}list-group-border-width);
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-bottom-width: 0;
|
border-bottom-width: 0;
|
||||||
|
@ -144,11 +174,24 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Contextual variants
|
// scss-docs-start list-group-modifiers
|
||||||
|
// List group contextual variants
|
||||||
//
|
//
|
||||||
// Add modifier classes to change text and background color on individual items.
|
// Add modifier classes to change text and background color on individual items.
|
||||||
// Organizationally, this must come after the `:hover` states.
|
// Organizationally, this must come after the `:hover` states.
|
||||||
|
|
||||||
@each $color, $value in $theme-colors {
|
@each $state in map-keys($theme-colors) {
|
||||||
@include list-group-item-variant($color, theme-color-level($color, -9), theme-color-level($color, 6));
|
.list-group-item-#{$state} {
|
||||||
|
--#{$prefix}list-group-color: var(--#{$prefix}#{$state}-text-emphasis);
|
||||||
|
--#{$prefix}list-group-bg: var(--#{$prefix}#{$state}-bg-subtle);
|
||||||
|
--#{$prefix}list-group-border-color: var(--#{$prefix}#{$state}-border-subtle);
|
||||||
|
--#{$prefix}list-group-action-hover-color: var(--#{$prefix}emphasis-color);
|
||||||
|
--#{$prefix}list-group-action-hover-bg: var(--#{$prefix}#{$state}-border-subtle);
|
||||||
|
--#{$prefix}list-group-action-active-color: var(--#{$prefix}emphasis-color);
|
||||||
|
--#{$prefix}list-group-action-active-bg: var(--#{$prefix}#{$state}-border-subtle);
|
||||||
|
--#{$prefix}list-group-active-color: var(--#{$prefix}#{$state}-bg-subtle);
|
||||||
|
--#{$prefix}list-group-active-bg: var(--#{$prefix}#{$state}-text-emphasis);
|
||||||
|
--#{$prefix}list-group-active-border-color: var(--#{$prefix}#{$state}-text-emphasis);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end list-group-modifiers
|
||||||
|
|
|
@ -0,0 +1,174 @@
|
||||||
|
// Re-assigned maps
|
||||||
|
//
|
||||||
|
// Placed here so that others can override the default Sass maps and see automatic updates to utilities and more.
|
||||||
|
|
||||||
|
// scss-docs-start theme-colors-rgb
|
||||||
|
$theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value") !default;
|
||||||
|
// scss-docs-end theme-colors-rgb
|
||||||
|
|
||||||
|
// scss-docs-start theme-text-map
|
||||||
|
$theme-colors-text: (
|
||||||
|
"primary": $primary-text-emphasis,
|
||||||
|
"secondary": $secondary-text-emphasis,
|
||||||
|
"success": $success-text-emphasis,
|
||||||
|
"info": $info-text-emphasis,
|
||||||
|
"warning": $warning-text-emphasis,
|
||||||
|
"danger": $danger-text-emphasis,
|
||||||
|
"light": $light-text-emphasis,
|
||||||
|
"dark": $dark-text-emphasis,
|
||||||
|
) !default;
|
||||||
|
// scss-docs-end theme-text-map
|
||||||
|
|
||||||
|
// scss-docs-start theme-bg-subtle-map
|
||||||
|
$theme-colors-bg-subtle: (
|
||||||
|
"primary": $primary-bg-subtle,
|
||||||
|
"secondary": $secondary-bg-subtle,
|
||||||
|
"success": $success-bg-subtle,
|
||||||
|
"info": $info-bg-subtle,
|
||||||
|
"warning": $warning-bg-subtle,
|
||||||
|
"danger": $danger-bg-subtle,
|
||||||
|
"light": $light-bg-subtle,
|
||||||
|
"dark": $dark-bg-subtle,
|
||||||
|
) !default;
|
||||||
|
// scss-docs-end theme-bg-subtle-map
|
||||||
|
|
||||||
|
// scss-docs-start theme-border-subtle-map
|
||||||
|
$theme-colors-border-subtle: (
|
||||||
|
"primary": $primary-border-subtle,
|
||||||
|
"secondary": $secondary-border-subtle,
|
||||||
|
"success": $success-border-subtle,
|
||||||
|
"info": $info-border-subtle,
|
||||||
|
"warning": $warning-border-subtle,
|
||||||
|
"danger": $danger-border-subtle,
|
||||||
|
"light": $light-border-subtle,
|
||||||
|
"dark": $dark-border-subtle,
|
||||||
|
) !default;
|
||||||
|
// scss-docs-end theme-border-subtle-map
|
||||||
|
|
||||||
|
$theme-colors-text-dark: null !default;
|
||||||
|
$theme-colors-bg-subtle-dark: null !default;
|
||||||
|
$theme-colors-border-subtle-dark: null !default;
|
||||||
|
|
||||||
|
@if $enable-dark-mode {
|
||||||
|
// scss-docs-start theme-text-dark-map
|
||||||
|
$theme-colors-text-dark: (
|
||||||
|
"primary": $primary-text-emphasis-dark,
|
||||||
|
"secondary": $secondary-text-emphasis-dark,
|
||||||
|
"success": $success-text-emphasis-dark,
|
||||||
|
"info": $info-text-emphasis-dark,
|
||||||
|
"warning": $warning-text-emphasis-dark,
|
||||||
|
"danger": $danger-text-emphasis-dark,
|
||||||
|
"light": $light-text-emphasis-dark,
|
||||||
|
"dark": $dark-text-emphasis-dark,
|
||||||
|
) !default;
|
||||||
|
// scss-docs-end theme-text-dark-map
|
||||||
|
|
||||||
|
// scss-docs-start theme-bg-subtle-dark-map
|
||||||
|
$theme-colors-bg-subtle-dark: (
|
||||||
|
"primary": $primary-bg-subtle-dark,
|
||||||
|
"secondary": $secondary-bg-subtle-dark,
|
||||||
|
"success": $success-bg-subtle-dark,
|
||||||
|
"info": $info-bg-subtle-dark,
|
||||||
|
"warning": $warning-bg-subtle-dark,
|
||||||
|
"danger": $danger-bg-subtle-dark,
|
||||||
|
"light": $light-bg-subtle-dark,
|
||||||
|
"dark": $dark-bg-subtle-dark,
|
||||||
|
) !default;
|
||||||
|
// scss-docs-end theme-bg-subtle-dark-map
|
||||||
|
|
||||||
|
// scss-docs-start theme-border-subtle-dark-map
|
||||||
|
$theme-colors-border-subtle-dark: (
|
||||||
|
"primary": $primary-border-subtle-dark,
|
||||||
|
"secondary": $secondary-border-subtle-dark,
|
||||||
|
"success": $success-border-subtle-dark,
|
||||||
|
"info": $info-border-subtle-dark,
|
||||||
|
"warning": $warning-border-subtle-dark,
|
||||||
|
"danger": $danger-border-subtle-dark,
|
||||||
|
"light": $light-border-subtle-dark,
|
||||||
|
"dark": $dark-border-subtle-dark,
|
||||||
|
) !default;
|
||||||
|
// scss-docs-end theme-border-subtle-dark-map
|
||||||
|
}
|
||||||
|
|
||||||
|
// Utilities maps
|
||||||
|
//
|
||||||
|
// Extends the default `$theme-colors` maps to help create our utilities.
|
||||||
|
|
||||||
|
// Come v6, we'll de-dupe these variables. Until then, for backward compatibility, we keep them to reassign.
|
||||||
|
// scss-docs-start utilities-colors
|
||||||
|
$utilities-colors: $theme-colors-rgb !default;
|
||||||
|
// scss-docs-end utilities-colors
|
||||||
|
|
||||||
|
// scss-docs-start utilities-text-colors
|
||||||
|
$utilities-text: map-merge(
|
||||||
|
$utilities-colors,
|
||||||
|
(
|
||||||
|
"black": to-rgb($black),
|
||||||
|
"white": to-rgb($white),
|
||||||
|
"body": to-rgb($body-color)
|
||||||
|
)
|
||||||
|
) !default;
|
||||||
|
$utilities-text-colors: map-loop($utilities-text, rgba-css-var, "$key", "text") !default;
|
||||||
|
|
||||||
|
$utilities-text-emphasis-colors: (
|
||||||
|
"primary-emphasis": var(--#{$prefix}primary-text-emphasis),
|
||||||
|
"secondary-emphasis": var(--#{$prefix}secondary-text-emphasis),
|
||||||
|
"success-emphasis": var(--#{$prefix}success-text-emphasis),
|
||||||
|
"info-emphasis": var(--#{$prefix}info-text-emphasis),
|
||||||
|
"warning-emphasis": var(--#{$prefix}warning-text-emphasis),
|
||||||
|
"danger-emphasis": var(--#{$prefix}danger-text-emphasis),
|
||||||
|
"light-emphasis": var(--#{$prefix}light-text-emphasis),
|
||||||
|
"dark-emphasis": var(--#{$prefix}dark-text-emphasis)
|
||||||
|
) !default;
|
||||||
|
// scss-docs-end utilities-text-colors
|
||||||
|
|
||||||
|
// scss-docs-start utilities-bg-colors
|
||||||
|
$utilities-bg: map-merge(
|
||||||
|
$utilities-colors,
|
||||||
|
(
|
||||||
|
"black": to-rgb($black),
|
||||||
|
"white": to-rgb($white),
|
||||||
|
"body": to-rgb($body-bg)
|
||||||
|
)
|
||||||
|
) !default;
|
||||||
|
$utilities-bg-colors: map-loop($utilities-bg, rgba-css-var, "$key", "bg") !default;
|
||||||
|
|
||||||
|
$utilities-bg-subtle: (
|
||||||
|
"primary-subtle": var(--#{$prefix}primary-bg-subtle),
|
||||||
|
"secondary-subtle": var(--#{$prefix}secondary-bg-subtle),
|
||||||
|
"success-subtle": var(--#{$prefix}success-bg-subtle),
|
||||||
|
"info-subtle": var(--#{$prefix}info-bg-subtle),
|
||||||
|
"warning-subtle": var(--#{$prefix}warning-bg-subtle),
|
||||||
|
"danger-subtle": var(--#{$prefix}danger-bg-subtle),
|
||||||
|
"light-subtle": var(--#{$prefix}light-bg-subtle),
|
||||||
|
"dark-subtle": var(--#{$prefix}dark-bg-subtle)
|
||||||
|
) !default;
|
||||||
|
// scss-docs-end utilities-bg-colors
|
||||||
|
|
||||||
|
// scss-docs-start utilities-border-colors
|
||||||
|
$utilities-border: map-merge(
|
||||||
|
$utilities-colors,
|
||||||
|
(
|
||||||
|
"black": to-rgb($black),
|
||||||
|
"white": to-rgb($white)
|
||||||
|
)
|
||||||
|
) !default;
|
||||||
|
$utilities-border-colors: map-loop($utilities-border, rgba-css-var, "$key", "border") !default;
|
||||||
|
|
||||||
|
$utilities-border-subtle: (
|
||||||
|
"primary-subtle": var(--#{$prefix}primary-border-subtle),
|
||||||
|
"secondary-subtle": var(--#{$prefix}secondary-border-subtle),
|
||||||
|
"success-subtle": var(--#{$prefix}success-border-subtle),
|
||||||
|
"info-subtle": var(--#{$prefix}info-border-subtle),
|
||||||
|
"warning-subtle": var(--#{$prefix}warning-border-subtle),
|
||||||
|
"danger-subtle": var(--#{$prefix}danger-border-subtle),
|
||||||
|
"light-subtle": var(--#{$prefix}light-border-subtle),
|
||||||
|
"dark-subtle": var(--#{$prefix}dark-border-subtle)
|
||||||
|
) !default;
|
||||||
|
// scss-docs-end utilities-border-colors
|
||||||
|
|
||||||
|
$utilities-links-underline: map-loop($utilities-colors, rgba-css-var, "$key", "link-underline") !default;
|
||||||
|
|
||||||
|
$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
|
||||||
|
|
||||||
|
$gutters: $spacers !default;
|
|
@ -1,8 +0,0 @@
|
||||||
.media {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.media-body {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
|
@ -8,33 +8,29 @@
|
||||||
// Deprecate
|
// Deprecate
|
||||||
@import "mixins/deprecate";
|
@import "mixins/deprecate";
|
||||||
|
|
||||||
// Utilities
|
// Helpers
|
||||||
@import "mixins/breakpoints";
|
@import "mixins/breakpoints";
|
||||||
@import "mixins/hover";
|
@import "mixins/color-mode";
|
||||||
|
@import "mixins/color-scheme";
|
||||||
@import "mixins/image";
|
@import "mixins/image";
|
||||||
@import "mixins/badge";
|
|
||||||
@import "mixins/resize";
|
@import "mixins/resize";
|
||||||
@import "mixins/screen-reader";
|
@import "mixins/visually-hidden";
|
||||||
@import "mixins/size";
|
|
||||||
@import "mixins/reset-text";
|
@import "mixins/reset-text";
|
||||||
@import "mixins/text-emphasis";
|
|
||||||
@import "mixins/text-hide";
|
|
||||||
@import "mixins/text-truncate";
|
@import "mixins/text-truncate";
|
||||||
@import "mixins/visibility";
|
|
||||||
|
// Utilities
|
||||||
|
@import "mixins/utilities";
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
@import "mixins/alert";
|
@import "mixins/backdrop";
|
||||||
@import "mixins/buttons";
|
@import "mixins/buttons";
|
||||||
@import "mixins/caret";
|
@import "mixins/caret";
|
||||||
@import "mixins/pagination";
|
@import "mixins/pagination";
|
||||||
@import "mixins/lists";
|
@import "mixins/lists";
|
||||||
@import "mixins/list-group";
|
|
||||||
@import "mixins/nav-divider";
|
|
||||||
@import "mixins/forms";
|
@import "mixins/forms";
|
||||||
@import "mixins/table-row";
|
@import "mixins/table-variants";
|
||||||
|
|
||||||
// Skins
|
// Skins
|
||||||
@import "mixins/background-variant";
|
|
||||||
@import "mixins/border-radius";
|
@import "mixins/border-radius";
|
||||||
@import "mixins/box-shadow";
|
@import "mixins/box-shadow";
|
||||||
@import "mixins/gradients";
|
@import "mixins/gradients";
|
||||||
|
@ -42,6 +38,5 @@
|
||||||
|
|
||||||
// Layout
|
// Layout
|
||||||
@import "mixins/clearfix";
|
@import "mixins/clearfix";
|
||||||
@import "mixins/grid-framework";
|
@import "mixins/container";
|
||||||
@import "mixins/grid";
|
@import "mixins/grid";
|
||||||
@import "mixins/float";
|
|
||||||
|
|
|
@ -1,29 +1,46 @@
|
||||||
|
// stylelint-disable function-disallowed-list
|
||||||
|
|
||||||
// .modal-open - body class for killing the scroll
|
// .modal-open - body class for killing the scroll
|
||||||
// .modal - container to scroll within
|
// .modal - container to scroll within
|
||||||
// .modal-dialog - positioning shell for the actual modal
|
// .modal-dialog - positioning shell for the actual modal
|
||||||
// .modal-content - actual modal w/ bg and corners and stuff
|
// .modal-content - actual modal w/ bg and corners and stuff
|
||||||
|
|
||||||
|
|
||||||
.modal-open {
|
|
||||||
// Kill the scroll on the body
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.modal {
|
|
||||||
overflow-x: hidden;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Container that the modal scrolls within
|
// Container that the modal scrolls within
|
||||||
.modal {
|
.modal {
|
||||||
|
// scss-docs-start modal-css-vars
|
||||||
|
--#{$prefix}modal-zindex: #{$zindex-modal};
|
||||||
|
--#{$prefix}modal-width: #{$modal-md};
|
||||||
|
--#{$prefix}modal-padding: #{$modal-inner-padding};
|
||||||
|
--#{$prefix}modal-margin: #{$modal-dialog-margin};
|
||||||
|
--#{$prefix}modal-color: #{$modal-content-color};
|
||||||
|
--#{$prefix}modal-bg: #{$modal-content-bg};
|
||||||
|
--#{$prefix}modal-border-color: #{$modal-content-border-color};
|
||||||
|
--#{$prefix}modal-border-width: #{$modal-content-border-width};
|
||||||
|
--#{$prefix}modal-border-radius: #{$modal-content-border-radius};
|
||||||
|
--#{$prefix}modal-box-shadow: #{$modal-content-box-shadow-xs};
|
||||||
|
--#{$prefix}modal-inner-border-radius: #{$modal-content-inner-border-radius};
|
||||||
|
--#{$prefix}modal-header-padding-x: #{$modal-header-padding-x};
|
||||||
|
--#{$prefix}modal-header-padding-y: #{$modal-header-padding-y};
|
||||||
|
--#{$prefix}modal-header-padding: #{$modal-header-padding}; // Todo in v6: Split this padding into x and y
|
||||||
|
--#{$prefix}modal-header-border-color: #{$modal-header-border-color};
|
||||||
|
--#{$prefix}modal-header-border-width: #{$modal-header-border-width};
|
||||||
|
--#{$prefix}modal-title-line-height: #{$modal-title-line-height};
|
||||||
|
--#{$prefix}modal-footer-gap: #{$modal-footer-margin-between};
|
||||||
|
--#{$prefix}modal-footer-bg: #{$modal-footer-bg};
|
||||||
|
--#{$prefix}modal-footer-border-color: #{$modal-footer-border-color};
|
||||||
|
--#{$prefix}modal-footer-border-width: #{$modal-footer-border-width};
|
||||||
|
// scss-docs-end modal-css-vars
|
||||||
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: $zindex-modal;
|
z-index: var(--#{$prefix}modal-zindex);
|
||||||
display: none;
|
display: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
||||||
// https://github.com/twbs/bootstrap/pull/10951.
|
// https://github.com/twbs/bootstrap/pull/10951.
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
@ -36,7 +53,7 @@
|
||||||
.modal-dialog {
|
.modal-dialog {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: auto;
|
width: auto;
|
||||||
margin: $modal-dialog-margin;
|
margin: var(--#{$prefix}modal-margin);
|
||||||
// allow clicks to pass through for custom click handling to close modal
|
// allow clicks to pass through for custom click handling to close modal
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
|
@ -56,19 +73,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-dialog-scrollable {
|
.modal-dialog-scrollable {
|
||||||
display: flex; // IE10/11
|
height: calc(100% - var(--#{$prefix}modal-margin) * 2);
|
||||||
max-height: subtract(100%, $modal-dialog-margin * 2);
|
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
max-height: subtract(100vh, $modal-dialog-margin * 2); // IE10/11
|
max-height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-header,
|
|
||||||
.modal-footer {
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-body {
|
.modal-body {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
@ -77,30 +88,7 @@
|
||||||
.modal-dialog-centered {
|
.modal-dialog-centered {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-height: subtract(100%, $modal-dialog-margin * 2);
|
min-height: calc(100% - var(--#{$prefix}modal-margin) * 2);
|
||||||
|
|
||||||
// Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
|
|
||||||
&::before {
|
|
||||||
display: block; // IE10
|
|
||||||
height: subtract(100vh, $modal-dialog-margin * 2);
|
|
||||||
height: min-content; // Reset height to 0 except on IE
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure `.modal-body` shows scrollbar (IE10/11)
|
|
||||||
&.modal-dialog-scrollable {
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.modal-content {
|
|
||||||
max-height: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actual modal
|
// Actual modal
|
||||||
|
@ -110,53 +98,49 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
|
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
|
||||||
// counteract the pointer-events: none; in the .modal-dialog
|
// counteract the pointer-events: none; in the .modal-dialog
|
||||||
color: $modal-content-color;
|
color: var(--#{$prefix}modal-color);
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
background-color: $modal-content-bg;
|
background-color: var(--#{$prefix}modal-bg);
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
border: $modal-content-border-width solid $modal-content-border-color;
|
border: var(--#{$prefix}modal-border-width) solid var(--#{$prefix}modal-border-color);
|
||||||
@include border-radius($modal-content-border-radius);
|
@include border-radius(var(--#{$prefix}modal-border-radius));
|
||||||
@include box-shadow($modal-content-box-shadow-xs);
|
@include box-shadow(var(--#{$prefix}modal-box-shadow));
|
||||||
// Remove focus outline from opened modal
|
// Remove focus outline from opened modal
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modal background
|
// Modal background
|
||||||
.modal-backdrop {
|
.modal-backdrop {
|
||||||
position: fixed;
|
// scss-docs-start modal-backdrop-css-vars
|
||||||
top: 0;
|
--#{$prefix}backdrop-zindex: #{$zindex-modal-backdrop};
|
||||||
left: 0;
|
--#{$prefix}backdrop-bg: #{$modal-backdrop-bg};
|
||||||
z-index: $zindex-modal-backdrop;
|
--#{$prefix}backdrop-opacity: #{$modal-backdrop-opacity};
|
||||||
width: 100vw;
|
// scss-docs-end modal-backdrop-css-vars
|
||||||
height: 100vh;
|
|
||||||
background-color: $modal-backdrop-bg;
|
|
||||||
|
|
||||||
// Fade for backdrop
|
@include overlay-backdrop(var(--#{$prefix}backdrop-zindex), var(--#{$prefix}backdrop-bg), var(--#{$prefix}backdrop-opacity));
|
||||||
&.fade { opacity: 0; }
|
|
||||||
&.show { opacity: $modal-backdrop-opacity; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modal header
|
// Modal header
|
||||||
// Top section of the modal w/ title and dismiss
|
// Top section of the modal w/ title and dismiss
|
||||||
.modal-header {
|
.modal-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start; // so the close btn always stays on the upper right corner
|
flex-shrink: 0;
|
||||||
|
align-items: center;
|
||||||
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
|
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
|
||||||
padding: $modal-header-padding;
|
padding: var(--#{$prefix}modal-header-padding);
|
||||||
border-bottom: $modal-header-border-width solid $modal-header-border-color;
|
border-bottom: var(--#{$prefix}modal-header-border-width) solid var(--#{$prefix}modal-header-border-color);
|
||||||
@include border-top-radius($modal-content-inner-border-radius);
|
@include border-top-radius(var(--#{$prefix}modal-inner-border-radius));
|
||||||
|
|
||||||
.close {
|
.btn-close {
|
||||||
padding: $modal-header-padding;
|
padding: calc(var(--#{$prefix}modal-header-padding-y) * .5) calc(var(--#{$prefix}modal-header-padding-x) * .5);
|
||||||
// auto on the left force icon to the right even when there is no .modal-title
|
margin: calc(-.5 * var(--#{$prefix}modal-header-padding-y)) calc(-.5 * var(--#{$prefix}modal-header-padding-x)) calc(-.5 * var(--#{$prefix}modal-header-padding-y)) auto;
|
||||||
margin: (-$modal-header-padding-y) (-$modal-header-padding-x) (-$modal-header-padding-y) auto;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Title text within header
|
// Title text within header
|
||||||
.modal-title {
|
.modal-title {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
line-height: $modal-title-line-height;
|
line-height: var(--#{$prefix}modal-title-line-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modal body
|
// Modal body
|
||||||
|
@ -166,75 +150,88 @@
|
||||||
// Enable `flex-grow: 1` so that the body take up as much space as possible
|
// Enable `flex-grow: 1` so that the body take up as much space as possible
|
||||||
// when there should be a fixed height on `.modal-dialog`.
|
// when there should be a fixed height on `.modal-dialog`.
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
padding: $modal-inner-padding;
|
padding: var(--#{$prefix}modal-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Footer (for actions)
|
// Footer (for actions)
|
||||||
.modal-footer {
|
.modal-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-shrink: 0;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center; // vertically center
|
align-items: center; // vertically center
|
||||||
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
|
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
|
||||||
padding: $modal-inner-padding - $modal-footer-margin-between / 2;
|
padding: calc(var(--#{$prefix}modal-padding) - var(--#{$prefix}modal-footer-gap) * .5);
|
||||||
border-top: $modal-footer-border-width solid $modal-footer-border-color;
|
background-color: var(--#{$prefix}modal-footer-bg);
|
||||||
@include border-bottom-radius($modal-content-inner-border-radius);
|
border-top: var(--#{$prefix}modal-footer-border-width) solid var(--#{$prefix}modal-footer-border-color);
|
||||||
|
@include border-bottom-radius(var(--#{$prefix}modal-inner-border-radius));
|
||||||
|
|
||||||
// Place margin between footer elements
|
// Place margin between footer elements
|
||||||
// This solution is far from ideal because of the universal selector usage,
|
// This solution is far from ideal because of the universal selector usage,
|
||||||
// but is needed to fix https://github.com/twbs/bootstrap/issues/24800
|
// but is needed to fix https://github.com/twbs/bootstrap/issues/24800
|
||||||
> * {
|
> * {
|
||||||
margin: $modal-footer-margin-between / 2;
|
margin: calc(var(--#{$prefix}modal-footer-gap) * .5); // Todo in v6: replace with gap on parent class
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Measure scrollbar width for padding body during modal show/hide
|
|
||||||
.modal-scrollbar-measure {
|
|
||||||
position: absolute;
|
|
||||||
top: -9999px;
|
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
overflow: scroll;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scale up the modal
|
// Scale up the modal
|
||||||
@include media-breakpoint-up(sm) {
|
@include media-breakpoint-up(sm) {
|
||||||
|
.modal {
|
||||||
|
--#{$prefix}modal-margin: #{$modal-dialog-margin-y-sm-up};
|
||||||
|
--#{$prefix}modal-box-shadow: #{$modal-content-box-shadow-sm-up};
|
||||||
|
}
|
||||||
|
|
||||||
// Automatically set modal's width for larger viewports
|
// Automatically set modal's width for larger viewports
|
||||||
.modal-dialog {
|
.modal-dialog {
|
||||||
max-width: $modal-md;
|
max-width: var(--#{$prefix}modal-width);
|
||||||
margin: $modal-dialog-margin-y-sm-up auto;
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-dialog-scrollable {
|
.modal-sm {
|
||||||
max-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
|
--#{$prefix}modal-width: #{$modal-sm};
|
||||||
|
|
||||||
.modal-content {
|
|
||||||
max-height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.modal-dialog-centered {
|
|
||||||
min-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
|
|
||||||
height: min-content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-content {
|
|
||||||
@include box-shadow($modal-content-box-shadow-sm-up);
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-sm { max-width: $modal-sm; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@include media-breakpoint-up(lg) {
|
@include media-breakpoint-up(lg) {
|
||||||
.modal-lg,
|
.modal-lg,
|
||||||
.modal-xl {
|
.modal-xl {
|
||||||
max-width: $modal-lg;
|
--#{$prefix}modal-width: #{$modal-lg};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@include media-breakpoint-up(xl) {
|
@include media-breakpoint-up(xl) {
|
||||||
.modal-xl { max-width: $modal-xl; }
|
.modal-xl {
|
||||||
|
--#{$prefix}modal-width: #{$modal-xl};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// scss-docs-start modal-fullscreen-loop
|
||||||
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||||
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||||
|
$postfix: if($infix != "", $infix + "-down", "");
|
||||||
|
|
||||||
|
@include media-breakpoint-down($breakpoint) {
|
||||||
|
.modal-fullscreen#{$postfix} {
|
||||||
|
width: 100vw;
|
||||||
|
max-width: none;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
.modal-content {
|
||||||
|
height: 100%;
|
||||||
|
border: 0;
|
||||||
|
@include border-radius(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header,
|
||||||
|
.modal-footer {
|
||||||
|
@include border-radius(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// scss-docs-end modal-fullscreen-loop
|
||||||
|
|
|
@ -4,6 +4,16 @@
|
||||||
// `<nav>`s, `<ul>`s or `<ol>`s.
|
// `<nav>`s, `<ul>`s or `<ol>`s.
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
|
// scss-docs-start nav-css-vars
|
||||||
|
--#{$prefix}nav-link-padding-x: #{$nav-link-padding-x};
|
||||||
|
--#{$prefix}nav-link-padding-y: #{$nav-link-padding-y};
|
||||||
|
@include rfs($nav-link-font-size, --#{$prefix}nav-link-font-size);
|
||||||
|
--#{$prefix}nav-link-font-weight: #{$nav-link-font-weight};
|
||||||
|
--#{$prefix}nav-link-color: #{$nav-link-color};
|
||||||
|
--#{$prefix}nav-link-hover-color: #{$nav-link-hover-color};
|
||||||
|
--#{$prefix}nav-link-disabled-color: #{$nav-link-disabled-color};
|
||||||
|
// scss-docs-end nav-css-vars
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
@ -13,16 +23,30 @@
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
display: block;
|
display: block;
|
||||||
padding: $nav-link-padding-y $nav-link-padding-x;
|
padding: var(--#{$prefix}nav-link-padding-y) var(--#{$prefix}nav-link-padding-x);
|
||||||
|
@include font-size(var(--#{$prefix}nav-link-font-size));
|
||||||
|
font-weight: var(--#{$prefix}nav-link-font-weight);
|
||||||
|
color: var(--#{$prefix}nav-link-color);
|
||||||
text-decoration: if($link-decoration == none, null, none);
|
text-decoration: if($link-decoration == none, null, none);
|
||||||
|
background: none;
|
||||||
|
border: 0;
|
||||||
|
@include transition($nav-link-transition);
|
||||||
|
|
||||||
@include hover-focus() {
|
&:hover,
|
||||||
text-decoration: none;
|
&:focus {
|
||||||
|
color: var(--#{$prefix}nav-link-hover-color);
|
||||||
|
text-decoration: if($link-hover-decoration == underline, none, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: 0;
|
||||||
|
box-shadow: $nav-link-focus-box-shadow;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disabled state lightens text
|
// Disabled state lightens text
|
||||||
&.disabled {
|
&.disabled,
|
||||||
color: $nav-link-disabled-color;
|
&:disabled {
|
||||||
|
color: var(--#{$prefix}nav-link-disabled-color);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
@ -33,34 +57,41 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
.nav-tabs {
|
.nav-tabs {
|
||||||
border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;
|
// scss-docs-start nav-tabs-css-vars
|
||||||
|
--#{$prefix}nav-tabs-border-width: #{$nav-tabs-border-width};
|
||||||
|
--#{$prefix}nav-tabs-border-color: #{$nav-tabs-border-color};
|
||||||
|
--#{$prefix}nav-tabs-border-radius: #{$nav-tabs-border-radius};
|
||||||
|
--#{$prefix}nav-tabs-link-hover-border-color: #{$nav-tabs-link-hover-border-color};
|
||||||
|
--#{$prefix}nav-tabs-link-active-color: #{$nav-tabs-link-active-color};
|
||||||
|
--#{$prefix}nav-tabs-link-active-bg: #{$nav-tabs-link-active-bg};
|
||||||
|
--#{$prefix}nav-tabs-link-active-border-color: #{$nav-tabs-link-active-border-color};
|
||||||
|
// scss-docs-end nav-tabs-css-vars
|
||||||
|
|
||||||
|
border-bottom: var(--#{$prefix}nav-tabs-border-width) solid var(--#{$prefix}nav-tabs-border-color);
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
margin-bottom: -$nav-tabs-border-width;
|
margin-bottom: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
|
||||||
border: $nav-tabs-border-width solid transparent;
|
border: var(--#{$prefix}nav-tabs-border-width) solid transparent;
|
||||||
@include border-top-radius($nav-tabs-border-radius);
|
@include border-top-radius(var(--#{$prefix}nav-tabs-border-radius));
|
||||||
|
|
||||||
@include hover-focus() {
|
&:hover,
|
||||||
border-color: $nav-tabs-link-hover-border-color;
|
&:focus {
|
||||||
}
|
// Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link
|
||||||
|
isolation: isolate;
|
||||||
&.disabled {
|
border-color: var(--#{$prefix}nav-tabs-link-hover-border-color);
|
||||||
color: $nav-link-disabled-color;
|
|
||||||
background-color: transparent;
|
|
||||||
border-color: transparent;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-link.active,
|
.nav-link.active,
|
||||||
.nav-item.show .nav-link {
|
.nav-item.show .nav-link {
|
||||||
color: $nav-tabs-link-active-color;
|
color: var(--#{$prefix}nav-tabs-link-active-color);
|
||||||
background-color: $nav-tabs-link-active-bg;
|
background-color: var(--#{$prefix}nav-tabs-link-active-bg);
|
||||||
border-color: $nav-tabs-link-active-border-color;
|
border-color: var(--#{$prefix}nav-tabs-link-active-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
// Make dropdown border overlap tab border
|
// Make dropdown border overlap tab border
|
||||||
margin-top: -$nav-tabs-border-width;
|
margin-top: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
|
||||||
// Remove the top rounded corners here since there is a hard edge above the menu
|
// Remove the top rounded corners here since there is a hard edge above the menu
|
||||||
@include border-top-radius(0);
|
@include border-top-radius(0);
|
||||||
}
|
}
|
||||||
|
@ -72,14 +103,53 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
.nav-pills {
|
.nav-pills {
|
||||||
|
// scss-docs-start nav-pills-css-vars
|
||||||
|
--#{$prefix}nav-pills-border-radius: #{$nav-pills-border-radius};
|
||||||
|
--#{$prefix}nav-pills-link-active-color: #{$nav-pills-link-active-color};
|
||||||
|
--#{$prefix}nav-pills-link-active-bg: #{$nav-pills-link-active-bg};
|
||||||
|
// scss-docs-end nav-pills-css-vars
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
@include border-radius($nav-pills-border-radius);
|
@include border-radius(var(--#{$prefix}nav-pills-border-radius));
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-link.active,
|
.nav-link.active,
|
||||||
.show > .nav-link {
|
.show > .nav-link {
|
||||||
color: $nav-pills-link-active-color;
|
color: var(--#{$prefix}nav-pills-link-active-color);
|
||||||
background-color: $nav-pills-link-active-bg;
|
@include gradient-bg(var(--#{$prefix}nav-pills-link-active-bg));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Underline
|
||||||
|
//
|
||||||
|
|
||||||
|
.nav-underline {
|
||||||
|
// scss-docs-start nav-underline-css-vars
|
||||||
|
--#{$prefix}nav-underline-gap: #{$nav-underline-gap};
|
||||||
|
--#{$prefix}nav-underline-border-width: #{$nav-underline-border-width};
|
||||||
|
--#{$prefix}nav-underline-link-active-color: #{$nav-underline-link-active-color};
|
||||||
|
// scss-docs-end nav-underline-css-vars
|
||||||
|
|
||||||
|
gap: var(--#{$prefix}nav-underline-gap);
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
|
padding-right: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
border-bottom: var(--#{$prefix}nav-underline-border-width) solid transparent;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
border-bottom-color: currentcolor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link.active,
|
||||||
|
.show > .nav-link {
|
||||||
|
font-weight: $font-weight-bold;
|
||||||
|
color: var(--#{$prefix}nav-underline-link-active-color);
|
||||||
|
border-bottom-color: currentcolor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,6 +175,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-fill,
|
||||||
|
.nav-justified {
|
||||||
|
.nav-item .nav-link {
|
||||||
|
width: 100%; // Make sure button will grow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Tabbable tabs
|
// Tabbable tabs
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,39 +1,52 @@
|
||||||
// Contents
|
|
||||||
//
|
|
||||||
// Navbar
|
|
||||||
// Navbar brand
|
|
||||||
// Navbar nav
|
|
||||||
// Navbar text
|
|
||||||
// Navbar divider
|
|
||||||
// Responsive navbar
|
|
||||||
// Navbar position
|
|
||||||
// Navbar themes
|
|
||||||
|
|
||||||
|
|
||||||
// Navbar
|
// Navbar
|
||||||
//
|
//
|
||||||
// Provide a static navbar from which we expand to create full-width, fixed, and
|
// Provide a static navbar from which we expand to create full-width, fixed, and
|
||||||
// other navbar variations.
|
// other navbar variations.
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
|
// scss-docs-start navbar-css-vars
|
||||||
|
--#{$prefix}navbar-padding-x: #{if($navbar-padding-x == null, 0, $navbar-padding-x)};
|
||||||
|
--#{$prefix}navbar-padding-y: #{$navbar-padding-y};
|
||||||
|
--#{$prefix}navbar-color: #{$navbar-light-color};
|
||||||
|
--#{$prefix}navbar-hover-color: #{$navbar-light-hover-color};
|
||||||
|
--#{$prefix}navbar-disabled-color: #{$navbar-light-disabled-color};
|
||||||
|
--#{$prefix}navbar-active-color: #{$navbar-light-active-color};
|
||||||
|
--#{$prefix}navbar-brand-padding-y: #{$navbar-brand-padding-y};
|
||||||
|
--#{$prefix}navbar-brand-margin-end: #{$navbar-brand-margin-end};
|
||||||
|
--#{$prefix}navbar-brand-font-size: #{$navbar-brand-font-size};
|
||||||
|
--#{$prefix}navbar-brand-color: #{$navbar-light-brand-color};
|
||||||
|
--#{$prefix}navbar-brand-hover-color: #{$navbar-light-brand-hover-color};
|
||||||
|
--#{$prefix}navbar-nav-link-padding-x: #{$navbar-nav-link-padding-x};
|
||||||
|
--#{$prefix}navbar-toggler-padding-y: #{$navbar-toggler-padding-y};
|
||||||
|
--#{$prefix}navbar-toggler-padding-x: #{$navbar-toggler-padding-x};
|
||||||
|
--#{$prefix}navbar-toggler-font-size: #{$navbar-toggler-font-size};
|
||||||
|
--#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-light-toggler-icon-bg)};
|
||||||
|
--#{$prefix}navbar-toggler-border-color: #{$navbar-light-toggler-border-color};
|
||||||
|
--#{$prefix}navbar-toggler-border-radius: #{$navbar-toggler-border-radius};
|
||||||
|
--#{$prefix}navbar-toggler-focus-width: #{$navbar-toggler-focus-width};
|
||||||
|
--#{$prefix}navbar-toggler-transition: #{$navbar-toggler-transition};
|
||||||
|
// scss-docs-end navbar-css-vars
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap; // allow us to do the line break for collapsing content
|
flex-wrap: wrap; // allow us to do the line break for collapsing content
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between; // space out brand from logo
|
justify-content: space-between; // space out brand from logo
|
||||||
padding: $navbar-padding-y $navbar-padding-x;
|
padding: var(--#{$prefix}navbar-padding-y) var(--#{$prefix}navbar-padding-x);
|
||||||
|
@include gradient-bg();
|
||||||
|
|
||||||
// Because flex properties aren't inherited, we need to redeclare these first
|
// Because flex properties aren't inherited, we need to redeclare these first
|
||||||
// few properties so that content nested within behave properly.
|
// few properties so that content nested within behave properly.
|
||||||
|
// The `flex-wrap` property is inherited to simplify the expanded navbars
|
||||||
%container-flex-properties {
|
%container-flex-properties {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: inherit;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container,
|
> .container,
|
||||||
.container-fluid {
|
> .container-fluid {
|
||||||
@extend %container-flex-properties;
|
@extend %container-flex-properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,16 +63,18 @@
|
||||||
// Used for brand, project, or site names.
|
// Used for brand, project, or site names.
|
||||||
|
|
||||||
.navbar-brand {
|
.navbar-brand {
|
||||||
display: inline-block;
|
padding-top: var(--#{$prefix}navbar-brand-padding-y);
|
||||||
padding-top: $navbar-brand-padding-y;
|
padding-bottom: var(--#{$prefix}navbar-brand-padding-y);
|
||||||
padding-bottom: $navbar-brand-padding-y;
|
margin-right: var(--#{$prefix}navbar-brand-margin-end);
|
||||||
margin-right: $navbar-padding-x;
|
@include font-size(var(--#{$prefix}navbar-brand-font-size));
|
||||||
@include font-size($navbar-brand-font-size);
|
color: var(--#{$prefix}navbar-brand-color);
|
||||||
line-height: inherit;
|
text-decoration: if($link-decoration == none, null, none);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
@include hover-focus() {
|
&:hover,
|
||||||
text-decoration: none;
|
&:focus {
|
||||||
|
color: var(--#{$prefix}navbar-brand-hover-color);
|
||||||
|
text-decoration: if($link-hover-decoration == underline, none, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +84,16 @@
|
||||||
// Custom navbar navigation (doesn't require `.nav`, but does make use of `.nav-link`).
|
// Custom navbar navigation (doesn't require `.nav`, but does make use of `.nav-link`).
|
||||||
|
|
||||||
.navbar-nav {
|
.navbar-nav {
|
||||||
|
// scss-docs-start navbar-nav-css-vars
|
||||||
|
--#{$prefix}nav-link-padding-x: 0;
|
||||||
|
--#{$prefix}nav-link-padding-y: #{$nav-link-padding-y};
|
||||||
|
@include rfs($nav-link-font-size, --#{$prefix}nav-link-font-size);
|
||||||
|
--#{$prefix}nav-link-font-weight: #{$nav-link-font-weight};
|
||||||
|
--#{$prefix}nav-link-color: var(--#{$prefix}navbar-color);
|
||||||
|
--#{$prefix}nav-link-hover-color: var(--#{$prefix}navbar-hover-color);
|
||||||
|
--#{$prefix}nav-link-disabled-color: var(--#{$prefix}navbar-disabled-color);
|
||||||
|
// scss-docs-end navbar-nav-css-vars
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column; // cannot use `inherit` to get the `.navbar`s value
|
flex-direction: column; // cannot use `inherit` to get the `.navbar`s value
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
@ -76,13 +101,14 @@
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
padding-right: 0;
|
&.active,
|
||||||
padding-left: 0;
|
&.show {
|
||||||
|
color: var(--#{$prefix}navbar-active-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
position: static;
|
position: static;
|
||||||
float: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,9 +118,15 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
.navbar-text {
|
.navbar-text {
|
||||||
display: inline-block;
|
|
||||||
padding-top: $nav-link-padding-y;
|
padding-top: $nav-link-padding-y;
|
||||||
padding-bottom: $nav-link-padding-y;
|
padding-bottom: $nav-link-padding-y;
|
||||||
|
color: var(--#{$prefix}navbar-color);
|
||||||
|
|
||||||
|
a,
|
||||||
|
a:hover,
|
||||||
|
a:focus {
|
||||||
|
color: var(--#{$prefix}navbar-active-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,16 +148,24 @@
|
||||||
|
|
||||||
// Button for toggling the navbar when in its collapsed state
|
// Button for toggling the navbar when in its collapsed state
|
||||||
.navbar-toggler {
|
.navbar-toggler {
|
||||||
padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
|
padding: var(--#{$prefix}navbar-toggler-padding-y) var(--#{$prefix}navbar-toggler-padding-x);
|
||||||
@include font-size($navbar-toggler-font-size);
|
@include font-size(var(--#{$prefix}navbar-toggler-font-size));
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
color: var(--#{$prefix}navbar-color);
|
||||||
background-color: transparent; // remove default button style
|
background-color: transparent; // remove default button style
|
||||||
border: $border-width solid transparent; // remove default button style
|
border: var(--#{$prefix}border-width) solid var(--#{$prefix}navbar-toggler-border-color); // remove default button style
|
||||||
@include border-radius($navbar-toggler-border-radius);
|
@include border-radius(var(--#{$prefix}navbar-toggler-border-radius));
|
||||||
|
@include transition(var(--#{$prefix}navbar-toggler-transition));
|
||||||
|
|
||||||
@include hover-focus() {
|
&:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
text-decoration: none;
|
||||||
|
outline: 0;
|
||||||
|
box-shadow: 0 0 0 var(--#{$prefix}navbar-toggler-focus-width);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep as a separate element so folks can easily override it with another icon
|
// Keep as a separate element so folks can easily override it with another icon
|
||||||
|
@ -135,15 +175,18 @@
|
||||||
width: 1.5em;
|
width: 1.5em;
|
||||||
height: 1.5em;
|
height: 1.5em;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
content: "";
|
background-image: var(--#{$prefix}navbar-toggler-icon-bg);
|
||||||
background: 50% / 100% 100% no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-nav-scroll {
|
.navbar-nav-scroll {
|
||||||
max-height: $navbar-nav-scroll-max-height;
|
max-height: var(--#{$prefix}scroll-height, 75vh);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// scss-docs-start navbar-expand-loop
|
||||||
// Generate series of `.navbar-expand-*` responsive classes for configuring
|
// Generate series of `.navbar-expand-*` responsive classes for configuring
|
||||||
// where your navbar collapses.
|
// where your navbar collapses.
|
||||||
.navbar-expand {
|
.navbar-expand {
|
||||||
|
@ -151,27 +194,10 @@
|
||||||
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
||||||
$infix: breakpoint-infix($next, $grid-breakpoints);
|
$infix: breakpoint-infix($next, $grid-breakpoints);
|
||||||
|
|
||||||
|
// stylelint-disable-next-line scss/selector-no-union-class-name
|
||||||
&#{$infix} {
|
&#{$infix} {
|
||||||
@include media-breakpoint-down($breakpoint) {
|
|
||||||
%container-navbar-expand-#{$breakpoint} {
|
|
||||||
padding-right: 0;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .container,
|
|
||||||
> .container-fluid {
|
|
||||||
@extend %container-navbar-expand-#{$breakpoint};
|
|
||||||
}
|
|
||||||
|
|
||||||
@each $size, $container-max-width in $container-max-widths {
|
|
||||||
> .container#{breakpoint-infix($size, $container-max-widths)} {
|
|
||||||
@extend %container-navbar-expand-#{$breakpoint};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@include media-breakpoint-up($next) {
|
@include media-breakpoint-up($next) {
|
||||||
flex-flow: row nowrap;
|
flex-wrap: nowrap;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
.navbar-nav {
|
.navbar-nav {
|
||||||
|
@ -182,24 +208,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
padding-right: $navbar-nav-link-padding-x;
|
padding-right: var(--#{$prefix}navbar-nav-link-padding-x);
|
||||||
padding-left: $navbar-nav-link-padding-x;
|
padding-left: var(--#{$prefix}navbar-nav-link-padding-x);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// For nesting containers, have to redeclare for alignment purposes
|
|
||||||
%container-nesting-#{$breakpoint} {
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .container,
|
|
||||||
> .container-fluid {
|
|
||||||
@extend %container-nesting-#{$breakpoint};
|
|
||||||
}
|
|
||||||
|
|
||||||
@each $size, $container-max-width in $container-max-widths {
|
|
||||||
> .container#{breakpoint-infix($size, $container-max-widths)} {
|
|
||||||
@extend %container-nesting-#{$breakpoint};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,124 +219,71 @@
|
||||||
|
|
||||||
.navbar-collapse {
|
.navbar-collapse {
|
||||||
display: flex !important; // stylelint-disable-line declaration-no-important
|
display: flex !important; // stylelint-disable-line declaration-no-important
|
||||||
|
|
||||||
// Changes flex-bases to auto because of an IE10 bug
|
|
||||||
flex-basis: auto;
|
flex-basis: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-toggler {
|
.navbar-toggler {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.offcanvas {
|
||||||
|
// stylelint-disable declaration-no-important
|
||||||
|
position: static;
|
||||||
|
z-index: auto;
|
||||||
|
flex-grow: 1;
|
||||||
|
width: auto !important;
|
||||||
|
height: auto !important;
|
||||||
|
visibility: visible !important;
|
||||||
|
background-color: transparent !important;
|
||||||
|
border: 0 !important;
|
||||||
|
transform: none !important;
|
||||||
|
@include box-shadow(none);
|
||||||
|
@include transition(none);
|
||||||
|
// stylelint-enable declaration-no-important
|
||||||
|
|
||||||
|
.offcanvas-header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.offcanvas-body {
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow-y: visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end navbar-expand-loop
|
||||||
|
|
||||||
// Navbar themes
|
// Navbar themes
|
||||||
//
|
//
|
||||||
// Styles for switching between navbars with light or dark background.
|
// Styles for switching between navbars with light or dark background.
|
||||||
|
|
||||||
// Dark links against a light background
|
|
||||||
.navbar-light {
|
.navbar-light {
|
||||||
.navbar-brand {
|
@include deprecate("`.navbar-light`", "v5.2.0", "v6.0.0", true);
|
||||||
color: $navbar-light-brand-color;
|
}
|
||||||
|
|
||||||
@include hover-focus() {
|
.navbar-dark,
|
||||||
color: $navbar-light-brand-hover-color;
|
.navbar[data-bs-theme="dark"] {
|
||||||
}
|
// scss-docs-start navbar-dark-css-vars
|
||||||
}
|
--#{$prefix}navbar-color: #{$navbar-dark-color};
|
||||||
|
--#{$prefix}navbar-hover-color: #{$navbar-dark-hover-color};
|
||||||
.navbar-nav {
|
--#{$prefix}navbar-disabled-color: #{$navbar-dark-disabled-color};
|
||||||
.nav-link {
|
--#{$prefix}navbar-active-color: #{$navbar-dark-active-color};
|
||||||
color: $navbar-light-color;
|
--#{$prefix}navbar-brand-color: #{$navbar-dark-brand-color};
|
||||||
|
--#{$prefix}navbar-brand-hover-color: #{$navbar-dark-brand-hover-color};
|
||||||
@include hover-focus() {
|
--#{$prefix}navbar-toggler-border-color: #{$navbar-dark-toggler-border-color};
|
||||||
color: $navbar-light-hover-color;
|
--#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-dark-toggler-icon-bg)};
|
||||||
}
|
// scss-docs-end navbar-dark-css-vars
|
||||||
|
}
|
||||||
&.disabled {
|
|
||||||
color: $navbar-light-disabled-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.show > .nav-link,
|
|
||||||
.active > .nav-link,
|
|
||||||
.nav-link.show,
|
|
||||||
.nav-link.active {
|
|
||||||
color: $navbar-light-active-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-toggler {
|
|
||||||
color: $navbar-light-color;
|
|
||||||
border-color: $navbar-light-toggler-border-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@if $enable-dark-mode {
|
||||||
|
@include color-mode(dark) {
|
||||||
.navbar-toggler-icon {
|
.navbar-toggler-icon {
|
||||||
background-image: escape-svg($navbar-light-toggler-icon-bg);
|
--#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-dark-toggler-icon-bg)};
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-text {
|
|
||||||
color: $navbar-light-color;
|
|
||||||
a {
|
|
||||||
color: $navbar-light-active-color;
|
|
||||||
|
|
||||||
@include hover-focus() {
|
|
||||||
color: $navbar-light-active-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// White links against a dark background
|
|
||||||
.navbar-dark {
|
|
||||||
.navbar-brand {
|
|
||||||
color: $navbar-dark-brand-color;
|
|
||||||
|
|
||||||
@include hover-focus() {
|
|
||||||
color: $navbar-dark-brand-hover-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-nav {
|
|
||||||
.nav-link {
|
|
||||||
color: $navbar-dark-color;
|
|
||||||
|
|
||||||
@include hover-focus() {
|
|
||||||
color: $navbar-dark-hover-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.disabled {
|
|
||||||
color: $navbar-dark-disabled-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.show > .nav-link,
|
|
||||||
.active > .nav-link,
|
|
||||||
.nav-link.show,
|
|
||||||
.nav-link.active {
|
|
||||||
color: $navbar-dark-active-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-toggler {
|
|
||||||
color: $navbar-dark-color;
|
|
||||||
border-color: $navbar-dark-toggler-border-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-toggler-icon {
|
|
||||||
background-image: escape-svg($navbar-dark-toggler-icon-bg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-text {
|
|
||||||
color: $navbar-dark-color;
|
|
||||||
a {
|
|
||||||
color: $navbar-dark-active-color;
|
|
||||||
|
|
||||||
@include hover-focus() {
|
|
||||||
color: $navbar-dark-active-color;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,146 @@
|
||||||
|
// stylelint-disable function-disallowed-list
|
||||||
|
|
||||||
|
%offcanvas-css-vars {
|
||||||
|
// scss-docs-start offcanvas-css-vars
|
||||||
|
--#{$prefix}offcanvas-zindex: #{$zindex-offcanvas};
|
||||||
|
--#{$prefix}offcanvas-width: #{$offcanvas-horizontal-width};
|
||||||
|
--#{$prefix}offcanvas-height: #{$offcanvas-vertical-height};
|
||||||
|
--#{$prefix}offcanvas-padding-x: #{$offcanvas-padding-x};
|
||||||
|
--#{$prefix}offcanvas-padding-y: #{$offcanvas-padding-y};
|
||||||
|
--#{$prefix}offcanvas-color: #{$offcanvas-color};
|
||||||
|
--#{$prefix}offcanvas-bg: #{$offcanvas-bg-color};
|
||||||
|
--#{$prefix}offcanvas-border-width: #{$offcanvas-border-width};
|
||||||
|
--#{$prefix}offcanvas-border-color: #{$offcanvas-border-color};
|
||||||
|
--#{$prefix}offcanvas-box-shadow: #{$offcanvas-box-shadow};
|
||||||
|
--#{$prefix}offcanvas-transition: #{transform $offcanvas-transition-duration ease-in-out};
|
||||||
|
--#{$prefix}offcanvas-title-line-height: #{$offcanvas-title-line-height};
|
||||||
|
// scss-docs-end offcanvas-css-vars
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||||
|
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
||||||
|
$infix: breakpoint-infix($next, $grid-breakpoints);
|
||||||
|
|
||||||
|
.offcanvas#{$infix} {
|
||||||
|
@extend %offcanvas-css-vars;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||||
|
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
||||||
|
$infix: breakpoint-infix($next, $grid-breakpoints);
|
||||||
|
|
||||||
|
.offcanvas#{$infix} {
|
||||||
|
@include media-breakpoint-down($next) {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: var(--#{$prefix}offcanvas-zindex);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
max-width: 100%;
|
||||||
|
color: var(--#{$prefix}offcanvas-color);
|
||||||
|
visibility: hidden;
|
||||||
|
background-color: var(--#{$prefix}offcanvas-bg);
|
||||||
|
background-clip: padding-box;
|
||||||
|
outline: 0;
|
||||||
|
@include box-shadow(var(--#{$prefix}offcanvas-box-shadow));
|
||||||
|
@include transition(var(--#{$prefix}offcanvas-transition));
|
||||||
|
|
||||||
|
&.offcanvas-start {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: var(--#{$prefix}offcanvas-width);
|
||||||
|
border-right: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
|
||||||
|
transform: translateX(-100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.offcanvas-end {
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
width: var(--#{$prefix}offcanvas-width);
|
||||||
|
border-left: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
|
||||||
|
transform: translateX(100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.offcanvas-top {
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
height: var(--#{$prefix}offcanvas-height);
|
||||||
|
max-height: 100%;
|
||||||
|
border-bottom: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
|
||||||
|
transform: translateY(-100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.offcanvas-bottom {
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
height: var(--#{$prefix}offcanvas-height);
|
||||||
|
max-height: 100%;
|
||||||
|
border-top: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
|
||||||
|
transform: translateY(100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.showing,
|
||||||
|
&.show:not(.hiding) {
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.showing,
|
||||||
|
&.hiding,
|
||||||
|
&.show {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@if not ($infix == "") {
|
||||||
|
@include media-breakpoint-up($next) {
|
||||||
|
--#{$prefix}offcanvas-height: auto;
|
||||||
|
--#{$prefix}offcanvas-border-width: 0;
|
||||||
|
background-color: transparent !important; // stylelint-disable-line declaration-no-important
|
||||||
|
|
||||||
|
.offcanvas-header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.offcanvas-body {
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow-y: visible;
|
||||||
|
// Reset `background-color` in case `.bg-*` classes are used in offcanvas
|
||||||
|
background-color: transparent !important; // stylelint-disable-line declaration-no-important
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.offcanvas-backdrop {
|
||||||
|
@include overlay-backdrop($zindex-offcanvas-backdrop, $offcanvas-backdrop-bg, $offcanvas-backdrop-opacity);
|
||||||
|
}
|
||||||
|
|
||||||
|
.offcanvas-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: var(--#{$prefix}offcanvas-padding-y) var(--#{$prefix}offcanvas-padding-x);
|
||||||
|
|
||||||
|
.btn-close {
|
||||||
|
padding: calc(var(--#{$prefix}offcanvas-padding-y) * .5) calc(var(--#{$prefix}offcanvas-padding-x) * .5);
|
||||||
|
margin-top: calc(-.5 * var(--#{$prefix}offcanvas-padding-y));
|
||||||
|
margin-right: calc(-.5 * var(--#{$prefix}offcanvas-padding-x));
|
||||||
|
margin-bottom: calc(-.5 * var(--#{$prefix}offcanvas-padding-y));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.offcanvas-title {
|
||||||
|
margin-bottom: 0;
|
||||||
|
line-height: var(--#{$prefix}offcanvas-title-line-height);
|
||||||
|
}
|
||||||
|
|
||||||
|
.offcanvas-body {
|
||||||
|
flex-grow: 1;
|
||||||
|
padding: var(--#{$prefix}offcanvas-padding-y) var(--#{$prefix}offcanvas-padding-x);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
|
@ -1,62 +1,97 @@
|
||||||
.pagination {
|
.pagination {
|
||||||
|
// scss-docs-start pagination-css-vars
|
||||||
|
--#{$prefix}pagination-padding-x: #{$pagination-padding-x};
|
||||||
|
--#{$prefix}pagination-padding-y: #{$pagination-padding-y};
|
||||||
|
@include rfs($pagination-font-size, --#{$prefix}pagination-font-size);
|
||||||
|
--#{$prefix}pagination-color: #{$pagination-color};
|
||||||
|
--#{$prefix}pagination-bg: #{$pagination-bg};
|
||||||
|
--#{$prefix}pagination-border-width: #{$pagination-border-width};
|
||||||
|
--#{$prefix}pagination-border-color: #{$pagination-border-color};
|
||||||
|
--#{$prefix}pagination-border-radius: #{$pagination-border-radius};
|
||||||
|
--#{$prefix}pagination-hover-color: #{$pagination-hover-color};
|
||||||
|
--#{$prefix}pagination-hover-bg: #{$pagination-hover-bg};
|
||||||
|
--#{$prefix}pagination-hover-border-color: #{$pagination-hover-border-color};
|
||||||
|
--#{$prefix}pagination-focus-color: #{$pagination-focus-color};
|
||||||
|
--#{$prefix}pagination-focus-bg: #{$pagination-focus-bg};
|
||||||
|
--#{$prefix}pagination-focus-box-shadow: #{$pagination-focus-box-shadow};
|
||||||
|
--#{$prefix}pagination-active-color: #{$pagination-active-color};
|
||||||
|
--#{$prefix}pagination-active-bg: #{$pagination-active-bg};
|
||||||
|
--#{$prefix}pagination-active-border-color: #{$pagination-active-border-color};
|
||||||
|
--#{$prefix}pagination-disabled-color: #{$pagination-disabled-color};
|
||||||
|
--#{$prefix}pagination-disabled-bg: #{$pagination-disabled-bg};
|
||||||
|
--#{$prefix}pagination-disabled-border-color: #{$pagination-disabled-border-color};
|
||||||
|
// scss-docs-end pagination-css-vars
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
@include list-unstyled();
|
@include list-unstyled();
|
||||||
@include border-radius();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-link {
|
.page-link {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
padding: $pagination-padding-y $pagination-padding-x;
|
padding: var(--#{$prefix}pagination-padding-y) var(--#{$prefix}pagination-padding-x);
|
||||||
margin-left: -$pagination-border-width;
|
@include font-size(var(--#{$prefix}pagination-font-size));
|
||||||
line-height: $pagination-line-height;
|
color: var(--#{$prefix}pagination-color);
|
||||||
color: $pagination-color;
|
|
||||||
text-decoration: if($link-decoration == none, null, none);
|
text-decoration: if($link-decoration == none, null, none);
|
||||||
background-color: $pagination-bg;
|
background-color: var(--#{$prefix}pagination-bg);
|
||||||
border: $pagination-border-width solid $pagination-border-color;
|
border: var(--#{$prefix}pagination-border-width) solid var(--#{$prefix}pagination-border-color);
|
||||||
|
@include transition($pagination-transition);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
color: $pagination-hover-color;
|
color: var(--#{$prefix}pagination-hover-color);
|
||||||
text-decoration: none;
|
text-decoration: if($link-hover-decoration == underline, none, null);
|
||||||
background-color: $pagination-hover-bg;
|
background-color: var(--#{$prefix}pagination-hover-bg);
|
||||||
border-color: $pagination-hover-border-color;
|
border-color: var(--#{$prefix}pagination-hover-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
|
color: var(--#{$prefix}pagination-focus-color);
|
||||||
|
background-color: var(--#{$prefix}pagination-focus-bg);
|
||||||
outline: $pagination-focus-outline;
|
outline: $pagination-focus-outline;
|
||||||
box-shadow: $pagination-focus-box-shadow;
|
box-shadow: var(--#{$prefix}pagination-focus-box-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active,
|
||||||
|
.active > & {
|
||||||
|
z-index: 3;
|
||||||
|
color: var(--#{$prefix}pagination-active-color);
|
||||||
|
@include gradient-bg(var(--#{$prefix}pagination-active-bg));
|
||||||
|
border-color: var(--#{$prefix}pagination-active-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.disabled,
|
||||||
|
.disabled > & {
|
||||||
|
color: var(--#{$prefix}pagination-disabled-color);
|
||||||
|
pointer-events: none;
|
||||||
|
background-color: var(--#{$prefix}pagination-disabled-bg);
|
||||||
|
border-color: var(--#{$prefix}pagination-disabled-border-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-item {
|
.page-item {
|
||||||
|
&:not(:first-child) .page-link {
|
||||||
|
margin-left: $pagination-margin-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $pagination-margin-start == calc(#{$pagination-border-width} * -1) {
|
||||||
&:first-child {
|
&:first-child {
|
||||||
.page-link {
|
.page-link {
|
||||||
margin-left: 0;
|
@include border-start-radius(var(--#{$prefix}pagination-border-radius));
|
||||||
@include border-left-radius($border-radius);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
.page-link {
|
.page-link {
|
||||||
@include border-right-radius($border-radius);
|
@include border-end-radius(var(--#{$prefix}pagination-border-radius));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} @else {
|
||||||
&.active .page-link {
|
// Add border-radius to all pageLinks in case they have left margin
|
||||||
z-index: 3;
|
.page-link {
|
||||||
color: $pagination-active-color;
|
@include border-radius(var(--#{$prefix}pagination-border-radius));
|
||||||
background-color: $pagination-active-bg;
|
|
||||||
border-color: $pagination-active-border-color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled .page-link {
|
|
||||||
color: $pagination-disabled-color;
|
|
||||||
pointer-events: none;
|
|
||||||
// Opinionated: remove the "hand" cursor set previously for .page-link
|
|
||||||
cursor: auto;
|
|
||||||
background-color: $pagination-disabled-bg;
|
|
||||||
border-color: $pagination-disabled-border-color;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,9 +101,9 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
.pagination-lg {
|
.pagination-lg {
|
||||||
@include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $pagination-border-radius-lg);
|
@include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $pagination-border-radius-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination-sm {
|
.pagination-sm {
|
||||||
@include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $pagination-border-radius-sm);
|
@include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $pagination-border-radius-sm);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
.placeholder {
|
||||||
|
display: inline-block;
|
||||||
|
min-height: 1em;
|
||||||
|
vertical-align: middle;
|
||||||
|
cursor: wait;
|
||||||
|
background-color: currentcolor;
|
||||||
|
opacity: $placeholder-opacity-max;
|
||||||
|
|
||||||
|
&.btn::before {
|
||||||
|
display: inline-block;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sizing
|
||||||
|
.placeholder-xs {
|
||||||
|
min-height: .6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.placeholder-sm {
|
||||||
|
min-height: .8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.placeholder-lg {
|
||||||
|
min-height: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Animation
|
||||||
|
.placeholder-glow {
|
||||||
|
.placeholder {
|
||||||
|
animation: placeholder-glow 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes placeholder-glow {
|
||||||
|
50% {
|
||||||
|
opacity: $placeholder-opacity-min;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.placeholder-wave {
|
||||||
|
mask-image: linear-gradient(130deg, $black 55%, rgba(0, 0, 0, (1 - $placeholder-opacity-min)) 75%, $black 95%);
|
||||||
|
mask-size: 200% 100%;
|
||||||
|
animation: placeholder-wave 2s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes placeholder-wave {
|
||||||
|
100% {
|
||||||
|
mask-position: -200% 0%;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,28 +1,46 @@
|
||||||
.popover {
|
.popover {
|
||||||
position: absolute;
|
// scss-docs-start popover-css-vars
|
||||||
top: 0;
|
--#{$prefix}popover-zindex: #{$zindex-popover};
|
||||||
left: 0;
|
--#{$prefix}popover-max-width: #{$popover-max-width};
|
||||||
z-index: $zindex-popover;
|
@include rfs($popover-font-size, --#{$prefix}popover-font-size);
|
||||||
|
--#{$prefix}popover-bg: #{$popover-bg};
|
||||||
|
--#{$prefix}popover-border-width: #{$popover-border-width};
|
||||||
|
--#{$prefix}popover-border-color: #{$popover-border-color};
|
||||||
|
--#{$prefix}popover-border-radius: #{$popover-border-radius};
|
||||||
|
--#{$prefix}popover-inner-border-radius: #{$popover-inner-border-radius};
|
||||||
|
--#{$prefix}popover-box-shadow: #{$popover-box-shadow};
|
||||||
|
--#{$prefix}popover-header-padding-x: #{$popover-header-padding-x};
|
||||||
|
--#{$prefix}popover-header-padding-y: #{$popover-header-padding-y};
|
||||||
|
@include rfs($popover-header-font-size, --#{$prefix}popover-header-font-size);
|
||||||
|
--#{$prefix}popover-header-color: #{$popover-header-color};
|
||||||
|
--#{$prefix}popover-header-bg: #{$popover-header-bg};
|
||||||
|
--#{$prefix}popover-body-padding-x: #{$popover-body-padding-x};
|
||||||
|
--#{$prefix}popover-body-padding-y: #{$popover-body-padding-y};
|
||||||
|
--#{$prefix}popover-body-color: #{$popover-body-color};
|
||||||
|
--#{$prefix}popover-arrow-width: #{$popover-arrow-width};
|
||||||
|
--#{$prefix}popover-arrow-height: #{$popover-arrow-height};
|
||||||
|
--#{$prefix}popover-arrow-border: var(--#{$prefix}popover-border-color);
|
||||||
|
// scss-docs-end popover-css-vars
|
||||||
|
|
||||||
|
z-index: var(--#{$prefix}popover-zindex);
|
||||||
display: block;
|
display: block;
|
||||||
max-width: $popover-max-width;
|
max-width: var(--#{$prefix}popover-max-width);
|
||||||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||||
// So reset our font and text properties to avoid inheriting weird values.
|
// So reset our font and text properties to avoid inheriting weird values.
|
||||||
@include reset-text();
|
@include reset-text();
|
||||||
@include font-size($popover-font-size);
|
@include font-size(var(--#{$prefix}popover-font-size));
|
||||||
// Allow breaking very long words so they don't overflow the popover's bounds
|
// Allow breaking very long words so they don't overflow the popover's bounds
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
background-color: $popover-bg;
|
background-color: var(--#{$prefix}popover-bg);
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
border: $popover-border-width solid $popover-border-color;
|
border: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-border-color);
|
||||||
@include border-radius($popover-border-radius);
|
@include border-radius(var(--#{$prefix}popover-border-radius));
|
||||||
@include box-shadow($popover-box-shadow);
|
@include box-shadow(var(--#{$prefix}popover-box-shadow));
|
||||||
|
|
||||||
.arrow {
|
.popover-arrow {
|
||||||
position: absolute;
|
|
||||||
display: block;
|
display: block;
|
||||||
width: $popover-arrow-width;
|
width: var(--#{$prefix}popover-arrow-width);
|
||||||
height: $popover-arrow-height;
|
height: var(--#{$prefix}popover-arrow-height);
|
||||||
margin: 0 $popover-border-radius;
|
|
||||||
|
|
||||||
&::before,
|
&::before,
|
||||||
&::after {
|
&::after {
|
||||||
|
@ -31,69 +49,75 @@
|
||||||
content: "";
|
content: "";
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
|
border-width: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-popover-top {
|
.bs-popover-top {
|
||||||
margin-bottom: $popover-arrow-height;
|
> .popover-arrow {
|
||||||
|
bottom: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
|
||||||
|
|
||||||
> .arrow {
|
&::before,
|
||||||
bottom: subtract(-$popover-arrow-height, $popover-border-width);
|
&::after {
|
||||||
|
border-width: var(--#{$prefix}popover-arrow-height) calc(var(--#{$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
|
||||||
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
border-top-color: var(--#{$prefix}popover-arrow-border);
|
||||||
border-top-color: $popover-arrow-outer-color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
bottom: $popover-border-width;
|
bottom: var(--#{$prefix}popover-border-width);
|
||||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
border-top-color: var(--#{$prefix}popover-bg);
|
||||||
border-top-color: $popover-arrow-color;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-popover-right {
|
/* rtl:begin:ignore */
|
||||||
margin-left: $popover-arrow-height;
|
.bs-popover-end {
|
||||||
|
> .popover-arrow {
|
||||||
|
left: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
|
||||||
|
width: var(--#{$prefix}popover-arrow-height);
|
||||||
|
height: var(--#{$prefix}popover-arrow-width);
|
||||||
|
|
||||||
> .arrow {
|
&::before,
|
||||||
left: subtract(-$popover-arrow-height, $popover-border-width);
|
&::after {
|
||||||
width: $popover-arrow-height;
|
border-width: calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height) calc(var(--#{$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
|
||||||
height: $popover-arrow-width;
|
}
|
||||||
margin: $popover-border-radius 0; // make sure the arrow does not touch the popover's rounded corners
|
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
left: 0;
|
left: 0;
|
||||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
border-right-color: var(--#{$prefix}popover-arrow-border);
|
||||||
border-right-color: $popover-arrow-outer-color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
left: $popover-border-width;
|
left: var(--#{$prefix}popover-border-width);
|
||||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
border-right-color: var(--#{$prefix}popover-bg);
|
||||||
border-right-color: $popover-arrow-color;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-popover-bottom {
|
/* rtl:end:ignore */
|
||||||
margin-top: $popover-arrow-height;
|
|
||||||
|
|
||||||
> .arrow {
|
.bs-popover-bottom {
|
||||||
top: subtract(-$popover-arrow-height, $popover-border-width);
|
> .popover-arrow {
|
||||||
|
top: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
|
||||||
|
|
||||||
|
&::before,
|
||||||
|
&::after {
|
||||||
|
border-width: 0 calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
|
||||||
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
top: 0;
|
top: 0;
|
||||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
border-bottom-color: var(--#{$prefix}popover-arrow-border);
|
||||||
border-bottom-color: $popover-arrow-outer-color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
top: $popover-border-width;
|
top: var(--#{$prefix}popover-border-width);
|
||||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
border-bottom-color: var(--#{$prefix}popover-bg);
|
||||||
border-bottom-color: $popover-arrow-color;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,61 +127,63 @@
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
display: block;
|
display: block;
|
||||||
width: $popover-arrow-width;
|
width: var(--#{$prefix}popover-arrow-width);
|
||||||
margin-left: -$popover-arrow-width / 2;
|
margin-left: calc(-.5 * var(--#{$prefix}popover-arrow-width)); // stylelint-disable-line function-disallowed-list
|
||||||
content: "";
|
content: "";
|
||||||
border-bottom: $popover-border-width solid $popover-header-bg;
|
border-bottom: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-header-bg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-popover-left {
|
/* rtl:begin:ignore */
|
||||||
margin-right: $popover-arrow-height;
|
.bs-popover-start {
|
||||||
|
> .popover-arrow {
|
||||||
|
right: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
|
||||||
|
width: var(--#{$prefix}popover-arrow-height);
|
||||||
|
height: var(--#{$prefix}popover-arrow-width);
|
||||||
|
|
||||||
> .arrow {
|
&::before,
|
||||||
right: subtract(-$popover-arrow-height, $popover-border-width);
|
&::after {
|
||||||
width: $popover-arrow-height;
|
border-width: calc(var(--#{$prefix}popover-arrow-width) * .5) 0 calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
|
||||||
height: $popover-arrow-width;
|
}
|
||||||
margin: $popover-border-radius 0; // make sure the arrow does not touch the popover's rounded corners
|
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
right: 0;
|
right: 0;
|
||||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
border-left-color: var(--#{$prefix}popover-arrow-border);
|
||||||
border-left-color: $popover-arrow-outer-color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
right: $popover-border-width;
|
right: var(--#{$prefix}popover-border-width);
|
||||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
border-left-color: var(--#{$prefix}popover-bg);
|
||||||
border-left-color: $popover-arrow-color;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* rtl:end:ignore */
|
||||||
|
|
||||||
.bs-popover-auto {
|
.bs-popover-auto {
|
||||||
&[x-placement^="top"] {
|
&[data-popper-placement^="top"] {
|
||||||
@extend .bs-popover-top;
|
@extend .bs-popover-top;
|
||||||
}
|
}
|
||||||
&[x-placement^="right"] {
|
&[data-popper-placement^="right"] {
|
||||||
@extend .bs-popover-right;
|
@extend .bs-popover-end;
|
||||||
}
|
}
|
||||||
&[x-placement^="bottom"] {
|
&[data-popper-placement^="bottom"] {
|
||||||
@extend .bs-popover-bottom;
|
@extend .bs-popover-bottom;
|
||||||
}
|
}
|
||||||
&[x-placement^="left"] {
|
&[data-popper-placement^="left"] {
|
||||||
@extend .bs-popover-left;
|
@extend .bs-popover-start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Offset the popover to account for the popover arrow
|
// Offset the popover to account for the popover arrow
|
||||||
.popover-header {
|
.popover-header {
|
||||||
padding: $popover-header-padding-y $popover-header-padding-x;
|
padding: var(--#{$prefix}popover-header-padding-y) var(--#{$prefix}popover-header-padding-x);
|
||||||
margin-bottom: 0; // Reset the default from Reboot
|
margin-bottom: 0; // Reset the default from Reboot
|
||||||
@include font-size($font-size-base);
|
@include font-size(var(--#{$prefix}popover-header-font-size));
|
||||||
color: $popover-header-color;
|
color: var(--#{$prefix}popover-header-color);
|
||||||
background-color: $popover-header-bg;
|
background-color: var(--#{$prefix}popover-header-bg);
|
||||||
border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
|
border-bottom: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-border-color);
|
||||||
@include border-top-radius($popover-inner-border-radius);
|
@include border-top-radius(var(--#{$prefix}popover-inner-border-radius));
|
||||||
|
|
||||||
&:empty {
|
&:empty {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -165,6 +191,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.popover-body {
|
.popover-body {
|
||||||
padding: $popover-body-padding-y $popover-body-padding-x;
|
padding: var(--#{$prefix}popover-body-padding-y) var(--#{$prefix}popover-body-padding-x);
|
||||||
color: $popover-body-color;
|
color: var(--#{$prefix}popover-body-color);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,141 +0,0 @@
|
||||||
// stylelint-disable declaration-no-important, selector-no-qualifying-type
|
|
||||||
|
|
||||||
// Source: https://github.com/h5bp/main.css/blob/master/src/_print.css
|
|
||||||
|
|
||||||
// ==========================================================================
|
|
||||||
// Print styles.
|
|
||||||
// Inlined to avoid the additional HTTP request:
|
|
||||||
// https://www.phpied.com/delay-loading-your-print-css/
|
|
||||||
// ==========================================================================
|
|
||||||
|
|
||||||
@if $enable-print-styles {
|
|
||||||
@media print {
|
|
||||||
*,
|
|
||||||
*::before,
|
|
||||||
*::after {
|
|
||||||
// Bootstrap specific; comment out `color` and `background`
|
|
||||||
//color: $black !important; // Black prints faster
|
|
||||||
text-shadow: none !important;
|
|
||||||
//background: transparent !important;
|
|
||||||
box-shadow: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
&:not(.btn) {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bootstrap specific; comment the following selector out
|
|
||||||
//a[href]::after {
|
|
||||||
// content: " (" attr(href) ")";
|
|
||||||
//}
|
|
||||||
|
|
||||||
abbr[title]::after {
|
|
||||||
content: " (" attr(title) ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bootstrap specific; comment the following selector out
|
|
||||||
//
|
|
||||||
// Don't show links that are fragment identifiers,
|
|
||||||
// or use the `javascript:` pseudo protocol
|
|
||||||
//
|
|
||||||
|
|
||||||
//a[href^="#"]::after,
|
|
||||||
//a[href^="javascript:"]::after {
|
|
||||||
// content: "";
|
|
||||||
//}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
white-space: pre-wrap !important;
|
|
||||||
}
|
|
||||||
pre,
|
|
||||||
blockquote {
|
|
||||||
border: $border-width solid $gray-500; // Bootstrap custom code; using `$border-width` instead of 1px
|
|
||||||
page-break-inside: avoid;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Printing Tables:
|
|
||||||
// https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
|
|
||||||
//
|
|
||||||
|
|
||||||
thead {
|
|
||||||
display: table-header-group;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr,
|
|
||||||
img {
|
|
||||||
page-break-inside: avoid;
|
|
||||||
}
|
|
||||||
|
|
||||||
p,
|
|
||||||
h2,
|
|
||||||
h3 {
|
|
||||||
orphans: 3;
|
|
||||||
widows: 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2,
|
|
||||||
h3 {
|
|
||||||
page-break-after: avoid;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bootstrap specific changes start
|
|
||||||
|
|
||||||
// Specify a size and min-width to make printing closer across browsers.
|
|
||||||
// We don't set margin here because it breaks `size` in Chrome. We also
|
|
||||||
// don't use `!important` on `size` as it breaks in Chrome.
|
|
||||||
@page {
|
|
||||||
size: $print-page-size;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
min-width: $print-body-min-width !important;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
min-width: $print-body-min-width !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bootstrap components
|
|
||||||
.navbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.badge {
|
|
||||||
border: $border-width solid $black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table {
|
|
||||||
border-collapse: collapse !important;
|
|
||||||
|
|
||||||
td,
|
|
||||||
th {
|
|
||||||
background-color: $white !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-bordered {
|
|
||||||
th,
|
|
||||||
td {
|
|
||||||
border: 1px solid $gray-300 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-dark {
|
|
||||||
color: inherit;
|
|
||||||
|
|
||||||
th,
|
|
||||||
td,
|
|
||||||
thead th,
|
|
||||||
tbody + tbody {
|
|
||||||
border-color: $table-border-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.table .thead-dark th {
|
|
||||||
color: inherit;
|
|
||||||
border-color: $table-border-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bootstrap specific changes end
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,20 +1,33 @@
|
||||||
// Disable animation if transitions are disabled
|
// Disable animation if transitions are disabled
|
||||||
|
|
||||||
|
// scss-docs-start progress-keyframes
|
||||||
@if $enable-transitions {
|
@if $enable-transitions {
|
||||||
@keyframes progress-bar-stripes {
|
@keyframes progress-bar-stripes {
|
||||||
from { background-position: $progress-height 0; }
|
0% { background-position-x: $progress-height; }
|
||||||
to { background-position: 0 0; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end progress-keyframes
|
||||||
|
|
||||||
|
.progress,
|
||||||
|
.progress-stacked {
|
||||||
|
// scss-docs-start progress-css-vars
|
||||||
|
--#{$prefix}progress-height: #{$progress-height};
|
||||||
|
@include rfs($progress-font-size, --#{$prefix}progress-font-size);
|
||||||
|
--#{$prefix}progress-bg: #{$progress-bg};
|
||||||
|
--#{$prefix}progress-border-radius: #{$progress-border-radius};
|
||||||
|
--#{$prefix}progress-box-shadow: #{$progress-box-shadow};
|
||||||
|
--#{$prefix}progress-bar-color: #{$progress-bar-color};
|
||||||
|
--#{$prefix}progress-bar-bg: #{$progress-bar-bg};
|
||||||
|
--#{$prefix}progress-bar-transition: #{$progress-bar-transition};
|
||||||
|
// scss-docs-end progress-css-vars
|
||||||
|
|
||||||
.progress {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
height: $progress-height;
|
height: var(--#{$prefix}progress-height);
|
||||||
overflow: hidden; // force rounded corners by cropping it
|
overflow: hidden; // force rounded corners by cropping it
|
||||||
line-height: 0;
|
@include font-size(var(--#{$prefix}progress-font-size));
|
||||||
@include font-size($progress-font-size);
|
background-color: var(--#{$prefix}progress-bg);
|
||||||
background-color: $progress-bg;
|
@include border-radius(var(--#{$prefix}progress-border-radius));
|
||||||
@include border-radius($progress-border-radius);
|
@include box-shadow(var(--#{$prefix}progress-box-shadow));
|
||||||
@include box-shadow($progress-box-shadow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
|
@ -22,23 +35,31 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: $progress-bar-color;
|
color: var(--#{$prefix}progress-bar-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background-color: $progress-bar-bg;
|
background-color: var(--#{$prefix}progress-bar-bg);
|
||||||
@include transition($progress-bar-transition);
|
@include transition(var(--#{$prefix}progress-bar-transition));
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar-striped {
|
.progress-bar-striped {
|
||||||
@include gradient-striped();
|
@include gradient-striped();
|
||||||
background-size: $progress-height $progress-height;
|
background-size: var(--#{$prefix}progress-height) var(--#{$prefix}progress-height);
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-stacked > .progress {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-stacked > .progress > .progress-bar {
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $enable-transitions {
|
@if $enable-transitions {
|
||||||
.progress-bar-animated {
|
.progress-bar-animated {
|
||||||
animation: $progress-bar-animation-timing progress-bar-stripes;
|
animation: $progress-bar-animation-timing progress-bar-stripes;
|
||||||
|
|
||||||
@if $enable-prefers-reduced-motion-media-query {
|
@if $enable-reduced-motion {
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
animation: none;
|
animation: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
|
// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
|
||||||
|
|
||||||
|
|
||||||
// Reboot
|
// Reboot
|
||||||
//
|
//
|
||||||
// Normalization of HTML elements, manually forked from Normalize.css to remove
|
// Normalization of HTML elements, manually forked from Normalize.css to remove
|
||||||
|
@ -10,122 +11,156 @@
|
||||||
|
|
||||||
// Document
|
// Document
|
||||||
//
|
//
|
||||||
// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
|
// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
|
||||||
// 2. Change the default font family in all browsers.
|
|
||||||
// 3. Correct the line height in all browsers.
|
|
||||||
// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
|
|
||||||
// 5. Change the default tap highlight to be completely transparent in iOS.
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
*::before,
|
*::before,
|
||||||
*::after {
|
*::after {
|
||||||
box-sizing: border-box; // 1
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
|
||||||
font-family: sans-serif; // 2
|
// Root
|
||||||
line-height: 1.15; // 3
|
//
|
||||||
-webkit-text-size-adjust: 100%; // 4
|
// Ability to the value of the root font sizes, affecting the value of `rem`.
|
||||||
-webkit-tap-highlight-color: rgba($black, 0); // 5
|
// null by default, thus nothing is generated.
|
||||||
|
|
||||||
|
:root {
|
||||||
|
@if $font-size-root != null {
|
||||||
|
@include font-size(var(--#{$prefix}root-font-size));
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $enable-smooth-scroll {
|
||||||
|
@media (prefers-reduced-motion: no-preference) {
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
|
|
||||||
// TODO: remove in v5
|
|
||||||
// stylelint-disable-next-line selector-list-comma-newline-after
|
|
||||||
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Body
|
// Body
|
||||||
//
|
//
|
||||||
// 1. Remove the margin in all browsers.
|
// 1. Remove the margin in all browsers.
|
||||||
// 2. As a best practice, apply a default `background-color`.
|
// 2. As a best practice, apply a default `background-color`.
|
||||||
// 3. Set an explicit initial text-align value so that we can later use
|
// 3. Prevent adjustments of font size after orientation changes in iOS.
|
||||||
// the `inherit` value on things like `<th>` elements.
|
// 4. Change the default tap highlight to be completely transparent in iOS.
|
||||||
|
|
||||||
|
// scss-docs-start reboot-body-rules
|
||||||
body {
|
body {
|
||||||
margin: 0; // 1
|
margin: 0; // 1
|
||||||
font-family: $font-family-base;
|
font-family: var(--#{$prefix}body-font-family);
|
||||||
@include font-size($font-size-base);
|
@include font-size(var(--#{$prefix}body-font-size));
|
||||||
font-weight: $font-weight-base;
|
font-weight: var(--#{$prefix}body-font-weight);
|
||||||
line-height: $line-height-base;
|
line-height: var(--#{$prefix}body-line-height);
|
||||||
color: $body-color;
|
color: var(--#{$prefix}body-color);
|
||||||
text-align: left; // 3
|
text-align: var(--#{$prefix}body-text-align);
|
||||||
background-color: $body-bg; // 2
|
background-color: var(--#{$prefix}body-bg); // 2
|
||||||
}
|
-webkit-text-size-adjust: 100%; // 3
|
||||||
|
-webkit-tap-highlight-color: rgba($black, 0); // 4
|
||||||
// Future-proof rule: in browsers that support :focus-visible, suppress the focus outline
|
|
||||||
// on elements that programmatically receive focus but wouldn't normally show a visible
|
|
||||||
// focus outline. In general, this would mean that the outline is only applied if the
|
|
||||||
// interaction that led to the element receiving programmatic focus was a keyboard interaction,
|
|
||||||
// or the browser has somehow determined that the user is primarily a keyboard user and/or
|
|
||||||
// wants focus outlines to always be presented.
|
|
||||||
//
|
|
||||||
// See https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible
|
|
||||||
// and https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/
|
|
||||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
|
||||||
outline: 0 !important;
|
|
||||||
}
|
}
|
||||||
|
// scss-docs-end reboot-body-rules
|
||||||
|
|
||||||
|
|
||||||
// Content grouping
|
// Content grouping
|
||||||
//
|
//
|
||||||
// 1. Add the correct box sizing in Firefox.
|
// 1. Reset Firefox's gray color
|
||||||
// 2. Show the overflow in Edge and IE.
|
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
box-sizing: content-box; // 1
|
margin: $hr-margin-y 0;
|
||||||
height: 0; // 1
|
color: $hr-color; // 1
|
||||||
overflow: visible; // 2
|
border: 0;
|
||||||
|
border-top: $hr-border-width solid $hr-border-color;
|
||||||
|
opacity: $hr-opacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Typography
|
// Typography
|
||||||
//
|
//
|
||||||
|
// 1. Remove top margins from headings
|
||||||
// Remove top margins from headings
|
|
||||||
//
|
|
||||||
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
|
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
|
||||||
// margin for easier control within type scales as it avoids margin collapsing.
|
// margin for easier control within type scales as it avoids margin collapsing.
|
||||||
// stylelint-disable-next-line selector-list-comma-newline-after
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
%heading {
|
||||||
margin-top: 0;
|
margin-top: 0; // 1
|
||||||
margin-bottom: $headings-margin-bottom;
|
margin-bottom: $headings-margin-bottom;
|
||||||
|
font-family: $headings-font-family;
|
||||||
|
font-style: $headings-font-style;
|
||||||
|
font-weight: $headings-font-weight;
|
||||||
|
line-height: $headings-line-height;
|
||||||
|
color: var(--#{$prefix}heading-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
@extend %heading;
|
||||||
|
@include font-size($h1-font-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
@extend %heading;
|
||||||
|
@include font-size($h2-font-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
@extend %heading;
|
||||||
|
@include font-size($h3-font-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
@extend %heading;
|
||||||
|
@include font-size($h4-font-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
@extend %heading;
|
||||||
|
@include font-size($h5-font-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
h6 {
|
||||||
|
@extend %heading;
|
||||||
|
@include font-size($h6-font-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Reset margins on paragraphs
|
// Reset margins on paragraphs
|
||||||
//
|
//
|
||||||
// Similarly, the top margin on `<p>`s get reset. However, we also reset the
|
// Similarly, the top margin on `<p>`s get reset. However, we also reset the
|
||||||
// bottom margin to use `rem` units instead of `em`.
|
// bottom margin to use `rem` units instead of `em`.
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: $paragraph-margin-bottom;
|
margin-bottom: $paragraph-margin-bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Abbreviations
|
// Abbreviations
|
||||||
//
|
//
|
||||||
// 1. Duplicate behavior to the data-* attribute for our tooltip plugin
|
// 1. Add the correct text decoration in Chrome, Edge, Opera, and Safari.
|
||||||
// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
// 2. Add explicit cursor to indicate changed behavior.
|
||||||
// 3. Add explicit cursor to indicate changed behavior.
|
// 3. Prevent the text-decoration to be skipped.
|
||||||
// 4. Remove the bottom border in Firefox 39-.
|
|
||||||
// 5. Prevent the text-decoration to be skipped.
|
|
||||||
|
|
||||||
abbr[title],
|
abbr[title] {
|
||||||
abbr[data-original-title] { // 1
|
text-decoration: underline dotted; // 1
|
||||||
text-decoration: underline; // 2
|
cursor: help; // 2
|
||||||
text-decoration: underline dotted; // 2
|
text-decoration-skip-ink: none; // 3
|
||||||
cursor: help; // 3
|
|
||||||
border-bottom: 0; // 4
|
|
||||||
text-decoration-skip-ink: none; // 5
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Address
|
||||||
|
|
||||||
address {
|
address {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Lists
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul {
|
||||||
|
padding-left: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
ol,
|
ol,
|
||||||
ul,
|
ul,
|
||||||
dl {
|
dl {
|
||||||
|
@ -144,33 +179,58 @@ dt {
|
||||||
font-weight: $dt-font-weight;
|
font-weight: $dt-font-weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1. Undo browser default
|
||||||
|
|
||||||
dd {
|
dd {
|
||||||
margin-bottom: .5rem;
|
margin-bottom: .5rem;
|
||||||
margin-left: 0; // Undo browser default
|
margin-left: 0; // 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Blockquote
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
margin: 0 0 1rem;
|
margin: 0 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Strong
|
||||||
|
//
|
||||||
|
// Add the correct font weight in Chrome, Edge, and Safari
|
||||||
|
|
||||||
b,
|
b,
|
||||||
strong {
|
strong {
|
||||||
font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
|
font-weight: $font-weight-bolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Small
|
||||||
|
//
|
||||||
|
// Add the correct font size in all browsers
|
||||||
|
|
||||||
small {
|
small {
|
||||||
@include font-size(80%); // Add the correct font size in all browsers
|
@include font-size($small-font-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Mark
|
||||||
|
|
||||||
|
mark {
|
||||||
|
padding: $mark-padding;
|
||||||
|
color: var(--#{$prefix}highlight-color);
|
||||||
|
background-color: var(--#{$prefix}highlight-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Sub and Sup
|
||||||
//
|
//
|
||||||
// Prevent `sub` and `sup` elements from affecting the line height in
|
// Prevent `sub` and `sup` elements from affecting the line height in
|
||||||
// all browsers.
|
// all browsers.
|
||||||
//
|
|
||||||
|
|
||||||
sub,
|
sub,
|
||||||
sup {
|
sup {
|
||||||
position: relative;
|
position: relative;
|
||||||
@include font-size(75%);
|
@include font-size($sub-sup-font-size);
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
@ -179,17 +239,14 @@ sub { bottom: -.25em; }
|
||||||
sup { top: -.5em; }
|
sup { top: -.5em; }
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Links
|
// Links
|
||||||
//
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: $link-color;
|
color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, 1));
|
||||||
text-decoration: $link-decoration;
|
text-decoration: $link-decoration;
|
||||||
background-color: transparent; // Remove the gray background on active links in IE 10.
|
|
||||||
|
|
||||||
@include hover() {
|
&:hover {
|
||||||
color: $link-hover-color;
|
--#{$prefix}link-color-rgb: var(--#{$prefix}link-hover-color-rgb);
|
||||||
text-decoration: $link-hover-decoration;
|
text-decoration: $link-hover-decoration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,82 +257,101 @@ a {
|
||||||
// See https://github.com/twbs/bootstrap/issues/19402
|
// See https://github.com/twbs/bootstrap/issues/19402
|
||||||
|
|
||||||
a:not([href]):not([class]) {
|
a:not([href]):not([class]) {
|
||||||
color: inherit;
|
&,
|
||||||
text-decoration: none;
|
&:hover {
|
||||||
|
|
||||||
@include hover() {
|
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Code
|
// Code
|
||||||
//
|
|
||||||
|
|
||||||
pre,
|
pre,
|
||||||
code,
|
code,
|
||||||
kbd,
|
kbd,
|
||||||
samp {
|
samp {
|
||||||
font-family: $font-family-monospace;
|
font-family: $font-family-code;
|
||||||
@include font-size(1em); // Correct the odd `em` font sizing in all browsers.
|
@include font-size(1em); // Correct the odd `em` font sizing in all browsers.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1. Remove browser default top margin
|
||||||
|
// 2. Reset browser default of `1em` to use `rem`s
|
||||||
|
// 3. Don't allow content to break outside
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
// Remove browser default top margin
|
display: block;
|
||||||
margin-top: 0;
|
margin-top: 0; // 1
|
||||||
// Reset browser default of `1em` to use `rem`s
|
margin-bottom: 1rem; // 2
|
||||||
margin-bottom: 1rem;
|
overflow: auto; // 3
|
||||||
// Don't allow content to break outside
|
@include font-size($code-font-size);
|
||||||
overflow: auto;
|
color: $pre-color;
|
||||||
// Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,
|
|
||||||
// making it impossible to interact with the content
|
// Account for some code outputs that place code tags in pre tags
|
||||||
-ms-overflow-style: scrollbar;
|
code {
|
||||||
|
@include font-size(inherit);
|
||||||
|
color: inherit;
|
||||||
|
word-break: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
@include font-size($code-font-size);
|
||||||
|
color: var(--#{$prefix}code-color);
|
||||||
|
word-wrap: break-word;
|
||||||
|
|
||||||
|
// Streamline the style when inside anchors to avoid broken underline and more
|
||||||
|
a > & {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
kbd {
|
||||||
|
padding: $kbd-padding-y $kbd-padding-x;
|
||||||
|
@include font-size($kbd-font-size);
|
||||||
|
color: $kbd-color;
|
||||||
|
background-color: $kbd-bg;
|
||||||
|
@include border-radius($border-radius-sm);
|
||||||
|
|
||||||
|
kbd {
|
||||||
|
padding: 0;
|
||||||
|
@include font-size(1em);
|
||||||
|
font-weight: $nested-kbd-font-weight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Figures
|
// Figures
|
||||||
//
|
//
|
||||||
|
// Apply a consistent margin strategy (matches our type styles).
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
// Apply a consistent margin strategy (matches our type styles).
|
|
||||||
margin: 0 0 1rem;
|
margin: 0 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Images and content
|
// Images and content
|
||||||
//
|
|
||||||
|
|
||||||
img {
|
|
||||||
vertical-align: middle;
|
|
||||||
border-style: none; // Remove the border on images inside links in IE 10-.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
img,
|
||||||
svg {
|
svg {
|
||||||
// Workaround for the SVG overflow bug in IE10/11 is still required.
|
|
||||||
// See https://github.com/twbs/bootstrap/issues/26878
|
|
||||||
overflow: hidden;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Tables
|
// Tables
|
||||||
//
|
//
|
||||||
|
// Prevent double borders
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border-collapse: collapse; // Prevent double borders
|
caption-side: bottom;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
caption {
|
caption {
|
||||||
padding-top: $table-cell-padding;
|
padding-top: $table-cell-padding-y;
|
||||||
padding-bottom: $table-cell-padding;
|
padding-bottom: $table-cell-padding-y;
|
||||||
color: $table-caption-color;
|
color: $table-caption-color;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
caption-side: bottom;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. Removes font-weight bold by inheriting
|
// 1. Removes font-weight bold by inheriting
|
||||||
|
@ -288,20 +364,29 @@ th {
|
||||||
text-align: -webkit-match-parent; // 3
|
text-align: -webkit-match-parent; // 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
thead,
|
||||||
|
tbody,
|
||||||
|
tfoot,
|
||||||
|
tr,
|
||||||
|
td,
|
||||||
|
th {
|
||||||
|
border-color: inherit;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Forms
|
// Forms
|
||||||
//
|
//
|
||||||
|
// 1. Allow labels to use `margin` for spacing.
|
||||||
|
|
||||||
label {
|
label {
|
||||||
// Allow labels to use `margin` for spacing.
|
display: inline-block; // 1
|
||||||
display: inline-block;
|
|
||||||
margin-bottom: $label-margin-bottom;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the default `border-radius` that macOS Chrome adds.
|
// Remove the default `border-radius` that macOS Chrome adds.
|
||||||
//
|
// See https://github.com/twbs/bootstrap/issues/24093
|
||||||
// Details at https://github.com/twbs/bootstrap/issues/24093
|
|
||||||
button {
|
button {
|
||||||
// stylelint-disable-next-line property-disallowed-list
|
// stylelint-disable-next-line property-disallowed-list
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
@ -316,27 +401,24 @@ button:focus:not(:focus-visible) {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1. Remove the margin in Firefox and Safari
|
||||||
|
|
||||||
input,
|
input,
|
||||||
button,
|
button,
|
||||||
select,
|
select,
|
||||||
optgroup,
|
optgroup,
|
||||||
textarea {
|
textarea {
|
||||||
margin: 0; // Remove the margin in Firefox and Safari
|
margin: 0; // 1
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
@include font-size(inherit);
|
@include font-size(inherit);
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
button,
|
// Remove the inheritance of text transform in Firefox
|
||||||
input {
|
|
||||||
overflow: visible; // Show the overflow in Edge
|
|
||||||
}
|
|
||||||
|
|
||||||
button,
|
button,
|
||||||
select {
|
select {
|
||||||
text-transform: none; // Remove the inheritance of text transform in Firefox
|
text-transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the cursor for non-`<button>` buttons
|
// Set the cursor for non-`<button>` buttons
|
||||||
//
|
//
|
||||||
// Details at https://github.com/twbs/bootstrap/pull/30562
|
// Details at https://github.com/twbs/bootstrap/pull/30562
|
||||||
|
@ -344,141 +426,186 @@ select {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the inheritance of word-wrap in Safari.
|
|
||||||
//
|
|
||||||
// Details at https://github.com/twbs/bootstrap/issues/24990
|
|
||||||
select {
|
select {
|
||||||
|
// Remove the inheritance of word-wrap in Safari.
|
||||||
|
// See https://github.com/twbs/bootstrap/issues/24990
|
||||||
word-wrap: normal;
|
word-wrap: normal;
|
||||||
|
|
||||||
|
// Undo the opacity change from Chrome
|
||||||
|
&:disabled {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove the dropdown arrow only from text type inputs built with datalists in Chrome.
|
||||||
|
// See https://stackoverflow.com/a/54997118
|
||||||
|
|
||||||
|
[list]:not([type="date"]):not([type="datetime-local"]):not([type="month"]):not([type="week"]):not([type="time"])::-webkit-calendar-picker-indicator {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||||
// controls in Android 4.
|
// controls in Android 4.
|
||||||
// 2. Correct the inability to style clickable types in iOS and Safari.
|
// 2. Correct the inability to style clickable types in iOS and Safari.
|
||||||
|
// 3. Opinionated: add "hand" cursor to non-disabled button elements.
|
||||||
|
|
||||||
button,
|
button,
|
||||||
[type="button"], // 1
|
[type="button"], // 1
|
||||||
[type="reset"],
|
[type="reset"],
|
||||||
[type="submit"] {
|
[type="submit"] {
|
||||||
-webkit-appearance: button; // 2
|
-webkit-appearance: button; // 2
|
||||||
}
|
|
||||||
|
|
||||||
// Opinionated: add "hand" cursor to non-disabled button elements.
|
@if $enable-button-pointers {
|
||||||
@if $enable-pointer-cursor-for-buttons {
|
|
||||||
button,
|
|
||||||
[type="button"],
|
|
||||||
[type="reset"],
|
|
||||||
[type="submit"] {
|
|
||||||
&:not(:disabled) {
|
&:not(:disabled) {
|
||||||
cursor: pointer;
|
cursor: pointer; // 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
|
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
|
||||||
button::-moz-focus-inner,
|
|
||||||
[type="button"]::-moz-focus-inner,
|
::-moz-focus-inner {
|
||||||
[type="reset"]::-moz-focus-inner,
|
|
||||||
[type="submit"]::-moz-focus-inner {
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-style: none;
|
border-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="radio"],
|
// 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
|
||||||
input[type="checkbox"] {
|
|
||||||
box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
|
|
||||||
padding: 0; // 2. Remove the padding in IE 10-
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
overflow: auto; // Remove the default vertical scrollbar in IE.
|
resize: vertical; // 1
|
||||||
// Textareas should really only resize vertically so they don't break their (horizontal) containers.
|
|
||||||
resize: vertical;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1. Browsers set a default `min-width: min-content;` on fieldsets,
|
||||||
|
// unlike e.g. `<div>`s, which have `min-width: 0;` by default.
|
||||||
|
// So we reset that to ensure fieldsets behave more like a standard block element.
|
||||||
|
// See https://github.com/twbs/bootstrap/issues/12359
|
||||||
|
// and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
|
||||||
|
// 2. Reset the default outline behavior of fieldsets so they don't affect page layout.
|
||||||
|
|
||||||
fieldset {
|
fieldset {
|
||||||
// Browsers set a default `min-width: min-content;` on fieldsets,
|
min-width: 0; // 1
|
||||||
// unlike e.g. `<div>`s, which have `min-width: 0;` by default.
|
padding: 0; // 2
|
||||||
// So we reset that to ensure fieldsets behave more like a standard block element.
|
margin: 0; // 2
|
||||||
// See https://github.com/twbs/bootstrap/issues/12359
|
border: 0; // 2
|
||||||
// and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
|
|
||||||
min-width: 0;
|
|
||||||
// Reset the default outline behavior of fieldsets so they don't affect page layout.
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. Correct the text wrapping in Edge and IE.
|
// 1. By using `float: left`, the legend will behave like a block element.
|
||||||
// 2. Correct the color inheritance from `fieldset` elements in IE.
|
// This way the border of a fieldset wraps around the legend if present.
|
||||||
|
// 2. Fix wrapping bug.
|
||||||
|
// See https://github.com/twbs/bootstrap/issues/29712
|
||||||
|
|
||||||
legend {
|
legend {
|
||||||
display: block;
|
float: left; // 1
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 100%; // 1
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: .5rem;
|
margin-bottom: $legend-margin-bottom;
|
||||||
@include font-size(1.5rem);
|
@include font-size($legend-font-size);
|
||||||
|
font-weight: $legend-font-weight;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
color: inherit; // 2
|
|
||||||
white-space: normal; // 1
|
+ * {
|
||||||
|
clear: left; // 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
progress {
|
// Fix height of inputs with a type of datetime-local, date, month, week, or time
|
||||||
vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
// See https://github.com/twbs/bootstrap/issues/18842
|
||||||
|
|
||||||
|
::-webkit-datetime-edit-fields-wrapper,
|
||||||
|
::-webkit-datetime-edit-text,
|
||||||
|
::-webkit-datetime-edit-minute,
|
||||||
|
::-webkit-datetime-edit-hour-field,
|
||||||
|
::-webkit-datetime-edit-day-field,
|
||||||
|
::-webkit-datetime-edit-month-field,
|
||||||
|
::-webkit-datetime-edit-year-field {
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Correct the cursor style of increment and decrement buttons in Chrome.
|
::-webkit-inner-spin-button {
|
||||||
[type="number"]::-webkit-inner-spin-button,
|
|
||||||
[type="number"]::-webkit-outer-spin-button {
|
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1. This overrides the extra rounded corners on search inputs in iOS so that our
|
||||||
|
// `.form-control` class can properly style them. Note that this cannot simply
|
||||||
|
// be added to `.form-control` as it's not specific enough. For details, see
|
||||||
|
// https://github.com/twbs/bootstrap/issues/11586.
|
||||||
|
// 2. Correct the outline style in Safari.
|
||||||
|
|
||||||
[type="search"] {
|
[type="search"] {
|
||||||
// This overrides the extra rounded corners on search inputs in iOS so that our
|
-webkit-appearance: textfield; // 1
|
||||||
// `.form-control` class can properly style them. Note that this cannot simply
|
outline-offset: -2px; // 2
|
||||||
// be added to `.form-control` as it's not specific enough. For details, see
|
|
||||||
// https://github.com/twbs/bootstrap/issues/11586.
|
|
||||||
outline-offset: -2px; // 2. Correct the outline style in Safari.
|
|
||||||
-webkit-appearance: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// 1. A few input types should stay LTR
|
||||||
|
// See https://rtlstyling.com/posts/rtl-styling#form-inputs
|
||||||
|
// 2. RTL only output
|
||||||
|
// See https://rtlcss.com/learn/usage-guide/control-directives/#raw
|
||||||
|
|
||||||
|
/* rtl:raw:
|
||||||
|
[type="tel"],
|
||||||
|
[type="url"],
|
||||||
|
[type="email"],
|
||||||
|
[type="number"] {
|
||||||
|
direction: ltr;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Remove the inner padding in Chrome and Safari on macOS.
|
// Remove the inner padding in Chrome and Safari on macOS.
|
||||||
//
|
|
||||||
|
|
||||||
[type="search"]::-webkit-search-decoration {
|
::-webkit-search-decoration {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// Remove padding around color pickers in webkit browsers
|
||||||
// 1. Correct the inability to style clickable types in iOS and Safari.
|
|
||||||
// 2. Change font properties to `inherit` in Safari.
|
|
||||||
//
|
|
||||||
|
|
||||||
::-webkit-file-upload-button {
|
::-webkit-color-swatch-wrapper {
|
||||||
font: inherit; // 2
|
padding: 0;
|
||||||
-webkit-appearance: button; // 1
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 1. Inherit font family and line height for file input buttons
|
||||||
|
// 2. Correct the inability to style clickable types in iOS and Safari.
|
||||||
|
|
||||||
|
::file-selector-button {
|
||||||
|
font: inherit; // 1
|
||||||
|
-webkit-appearance: button; // 2
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Correct element displays
|
// Correct element displays
|
||||||
//
|
|
||||||
|
|
||||||
output {
|
output {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove border from iframe
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Summary
|
||||||
|
//
|
||||||
|
// 1. Add the correct display in all browsers
|
||||||
|
|
||||||
summary {
|
summary {
|
||||||
display: list-item; // Add the correct display in all browsers
|
display: list-item; // 1
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
template {
|
|
||||||
display: none; // Add the correct display in IE
|
// Progress
|
||||||
|
//
|
||||||
|
// Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||||
|
|
||||||
|
progress {
|
||||||
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always hide an element with the `hidden` HTML attribute (from PureCSS).
|
|
||||||
// Needed for proper display in IE 10-.
|
// Hidden attribute
|
||||||
|
//
|
||||||
|
// Always hide an element with the `hidden` HTML attribute.
|
||||||
|
|
||||||
[hidden] {
|
[hidden] {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,187 @@
|
||||||
:root {
|
:root,
|
||||||
// Custom variable values only support SassScript inside `#{}`.
|
[data-bs-theme="light"] {
|
||||||
|
// Note: Custom variable values only support SassScript inside `#{}`.
|
||||||
|
|
||||||
|
// Colors
|
||||||
|
//
|
||||||
|
// Generate palettes for full colors, grays, and theme colors.
|
||||||
|
|
||||||
@each $color, $value in $colors {
|
@each $color, $value in $colors {
|
||||||
--#{$color}: #{$value};
|
--#{$prefix}#{$color}: #{$value};
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $color, $value in $grays {
|
||||||
|
--#{$prefix}gray-#{$color}: #{$value};
|
||||||
}
|
}
|
||||||
|
|
||||||
@each $color, $value in $theme-colors {
|
@each $color, $value in $theme-colors {
|
||||||
--#{$color}: #{$value};
|
--#{$prefix}#{$color}: #{$value};
|
||||||
}
|
}
|
||||||
|
|
||||||
@each $bp, $value in $grid-breakpoints {
|
@each $color, $value in $theme-colors-rgb {
|
||||||
--breakpoint-#{$bp}: #{$value};
|
--#{$prefix}#{$color}-rgb: #{$value};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use `inspect` for lists so that quoted items keep the quotes.
|
@each $color, $value in $theme-colors-text {
|
||||||
|
--#{$prefix}#{$color}-text-emphasis: #{$value};
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $color, $value in $theme-colors-bg-subtle {
|
||||||
|
--#{$prefix}#{$color}-bg-subtle: #{$value};
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $color, $value in $theme-colors-border-subtle {
|
||||||
|
--#{$prefix}#{$color}-border-subtle: #{$value};
|
||||||
|
}
|
||||||
|
|
||||||
|
--#{$prefix}white-rgb: #{to-rgb($white)};
|
||||||
|
--#{$prefix}black-rgb: #{to-rgb($black)};
|
||||||
|
|
||||||
|
// Fonts
|
||||||
|
|
||||||
|
// Note: Use `inspect` for lists so that quoted items keep the quotes.
|
||||||
// See https://github.com/sass/sass/issues/2383#issuecomment-336349172
|
// See https://github.com/sass/sass/issues/2383#issuecomment-336349172
|
||||||
--font-family-sans-serif: #{inspect($font-family-sans-serif)};
|
--#{$prefix}font-sans-serif: #{inspect($font-family-sans-serif)};
|
||||||
--font-family-monospace: #{inspect($font-family-monospace)};
|
--#{$prefix}font-monospace: #{inspect($font-family-monospace)};
|
||||||
|
--#{$prefix}gradient: #{$gradient};
|
||||||
|
|
||||||
|
// Root and body
|
||||||
|
// scss-docs-start root-body-variables
|
||||||
|
@if $font-size-root != null {
|
||||||
|
--#{$prefix}root-font-size: #{$font-size-root};
|
||||||
|
}
|
||||||
|
--#{$prefix}body-font-family: #{inspect($font-family-base)};
|
||||||
|
@include rfs($font-size-base, --#{$prefix}body-font-size);
|
||||||
|
--#{$prefix}body-font-weight: #{$font-weight-base};
|
||||||
|
--#{$prefix}body-line-height: #{$line-height-base};
|
||||||
|
@if $body-text-align != null {
|
||||||
|
--#{$prefix}body-text-align: #{$body-text-align};
|
||||||
|
}
|
||||||
|
|
||||||
|
--#{$prefix}body-color: #{$body-color};
|
||||||
|
--#{$prefix}body-color-rgb: #{to-rgb($body-color)};
|
||||||
|
--#{$prefix}body-bg: #{$body-bg};
|
||||||
|
--#{$prefix}body-bg-rgb: #{to-rgb($body-bg)};
|
||||||
|
|
||||||
|
--#{$prefix}emphasis-color: #{$body-emphasis-color};
|
||||||
|
--#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color)};
|
||||||
|
|
||||||
|
--#{$prefix}secondary-color: #{$body-secondary-color};
|
||||||
|
--#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color)};
|
||||||
|
--#{$prefix}secondary-bg: #{$body-secondary-bg};
|
||||||
|
--#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg)};
|
||||||
|
|
||||||
|
--#{$prefix}tertiary-color: #{$body-tertiary-color};
|
||||||
|
--#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color)};
|
||||||
|
--#{$prefix}tertiary-bg: #{$body-tertiary-bg};
|
||||||
|
--#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg)};
|
||||||
|
// scss-docs-end root-body-variables
|
||||||
|
|
||||||
|
--#{$prefix}heading-color: #{$headings-color};
|
||||||
|
|
||||||
|
--#{$prefix}link-color: #{$link-color};
|
||||||
|
--#{$prefix}link-color-rgb: #{to-rgb($link-color)};
|
||||||
|
--#{$prefix}link-decoration: #{$link-decoration};
|
||||||
|
|
||||||
|
--#{$prefix}link-hover-color: #{$link-hover-color};
|
||||||
|
--#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color)};
|
||||||
|
|
||||||
|
@if $link-hover-decoration != null {
|
||||||
|
--#{$prefix}link-hover-decoration: #{$link-hover-decoration};
|
||||||
|
}
|
||||||
|
|
||||||
|
--#{$prefix}code-color: #{$code-color};
|
||||||
|
--#{$prefix}highlight-color: #{$mark-color};
|
||||||
|
--#{$prefix}highlight-bg: #{$mark-bg};
|
||||||
|
|
||||||
|
// scss-docs-start root-border-var
|
||||||
|
--#{$prefix}border-width: #{$border-width};
|
||||||
|
--#{$prefix}border-style: #{$border-style};
|
||||||
|
--#{$prefix}border-color: #{$border-color};
|
||||||
|
--#{$prefix}border-color-translucent: #{$border-color-translucent};
|
||||||
|
|
||||||
|
--#{$prefix}border-radius: #{$border-radius};
|
||||||
|
--#{$prefix}border-radius-sm: #{$border-radius-sm};
|
||||||
|
--#{$prefix}border-radius-lg: #{$border-radius-lg};
|
||||||
|
--#{$prefix}border-radius-xl: #{$border-radius-xl};
|
||||||
|
--#{$prefix}border-radius-xxl: #{$border-radius-xxl};
|
||||||
|
--#{$prefix}border-radius-2xl: var(--#{$prefix}border-radius-xxl); // Deprecated in v5.3.0 for consistency
|
||||||
|
--#{$prefix}border-radius-pill: #{$border-radius-pill};
|
||||||
|
// scss-docs-end root-border-var
|
||||||
|
|
||||||
|
--#{$prefix}box-shadow: #{$box-shadow};
|
||||||
|
--#{$prefix}box-shadow-sm: #{$box-shadow-sm};
|
||||||
|
--#{$prefix}box-shadow-lg: #{$box-shadow-lg};
|
||||||
|
--#{$prefix}box-shadow-inset: #{$box-shadow-inset};
|
||||||
|
|
||||||
|
// Focus styles
|
||||||
|
// scss-docs-start root-focus-variables
|
||||||
|
--#{$prefix}focus-ring-width: #{$focus-ring-width};
|
||||||
|
--#{$prefix}focus-ring-opacity: #{$focus-ring-opacity};
|
||||||
|
--#{$prefix}focus-ring-color: #{$focus-ring-color};
|
||||||
|
// scss-docs-end root-focus-variables
|
||||||
|
|
||||||
|
// scss-docs-start root-form-validation-variables
|
||||||
|
--#{$prefix}form-valid-color: #{$form-valid-color};
|
||||||
|
--#{$prefix}form-valid-border-color: #{$form-valid-border-color};
|
||||||
|
--#{$prefix}form-invalid-color: #{$form-invalid-color};
|
||||||
|
--#{$prefix}form-invalid-border-color: #{$form-invalid-border-color};
|
||||||
|
// scss-docs-end root-form-validation-variables
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $enable-dark-mode {
|
||||||
|
@include color-mode(dark, true) {
|
||||||
|
color-scheme: dark;
|
||||||
|
|
||||||
|
// scss-docs-start root-dark-mode-vars
|
||||||
|
--#{$prefix}body-color: #{$body-color-dark};
|
||||||
|
--#{$prefix}body-color-rgb: #{to-rgb($body-color-dark)};
|
||||||
|
--#{$prefix}body-bg: #{$body-bg-dark};
|
||||||
|
--#{$prefix}body-bg-rgb: #{to-rgb($body-bg-dark)};
|
||||||
|
|
||||||
|
--#{$prefix}emphasis-color: #{$body-emphasis-color-dark};
|
||||||
|
--#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color-dark)};
|
||||||
|
|
||||||
|
--#{$prefix}secondary-color: #{$body-secondary-color-dark};
|
||||||
|
--#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color-dark)};
|
||||||
|
--#{$prefix}secondary-bg: #{$body-secondary-bg-dark};
|
||||||
|
--#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg-dark)};
|
||||||
|
|
||||||
|
--#{$prefix}tertiary-color: #{$body-tertiary-color-dark};
|
||||||
|
--#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color-dark)};
|
||||||
|
--#{$prefix}tertiary-bg: #{$body-tertiary-bg-dark};
|
||||||
|
--#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg-dark)};
|
||||||
|
|
||||||
|
@each $color, $value in $theme-colors-text-dark {
|
||||||
|
--#{$prefix}#{$color}-text-emphasis: #{$value};
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $color, $value in $theme-colors-bg-subtle-dark {
|
||||||
|
--#{$prefix}#{$color}-bg-subtle: #{$value};
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $color, $value in $theme-colors-border-subtle-dark {
|
||||||
|
--#{$prefix}#{$color}-border-subtle: #{$value};
|
||||||
|
}
|
||||||
|
|
||||||
|
--#{$prefix}heading-color: #{$headings-color-dark};
|
||||||
|
|
||||||
|
--#{$prefix}link-color: #{$link-color-dark};
|
||||||
|
--#{$prefix}link-hover-color: #{$link-hover-color-dark};
|
||||||
|
--#{$prefix}link-color-rgb: #{to-rgb($link-color-dark)};
|
||||||
|
--#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color-dark)};
|
||||||
|
|
||||||
|
--#{$prefix}code-color: #{$code-color-dark};
|
||||||
|
--#{$prefix}highlight-color: #{$mark-color-dark};
|
||||||
|
--#{$prefix}highlight-bg: #{$mark-bg-dark};
|
||||||
|
|
||||||
|
--#{$prefix}border-color: #{$border-color-dark};
|
||||||
|
--#{$prefix}border-color-translucent: #{$border-color-translucent-dark};
|
||||||
|
|
||||||
|
--#{$prefix}form-valid-color: #{$form-valid-color-dark};
|
||||||
|
--#{$prefix}form-valid-border-color: #{$form-valid-border-color-dark};
|
||||||
|
--#{$prefix}form-invalid-color: #{$form-invalid-color-dark};
|
||||||
|
--#{$prefix}form-invalid-border-color: #{$form-invalid-border-color-dark};
|
||||||
|
// scss-docs-end root-dark-mode-vars
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,32 +2,50 @@
|
||||||
// Rotating border
|
// Rotating border
|
||||||
//
|
//
|
||||||
|
|
||||||
@keyframes spinner-border {
|
.spinner-grow,
|
||||||
to { transform: rotate(360deg); }
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinner-border {
|
.spinner-border {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: $spinner-width;
|
width: var(--#{$prefix}spinner-width);
|
||||||
height: $spinner-height;
|
height: var(--#{$prefix}spinner-height);
|
||||||
vertical-align: text-bottom;
|
vertical-align: var(--#{$prefix}spinner-vertical-align);
|
||||||
border: $spinner-border-width solid currentColor;
|
|
||||||
border-right-color: transparent;
|
|
||||||
// stylelint-disable-next-line property-disallowed-list
|
// stylelint-disable-next-line property-disallowed-list
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: .75s linear infinite spinner-border;
|
animation: var(--#{$prefix}spinner-animation-speed) linear infinite var(--#{$prefix}spinner-animation-name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// scss-docs-start spinner-border-keyframes
|
||||||
|
@keyframes spinner-border {
|
||||||
|
to { transform: rotate(360deg) #{"/* rtl:ignore */"}; }
|
||||||
|
}
|
||||||
|
// scss-docs-end spinner-border-keyframes
|
||||||
|
|
||||||
|
.spinner-border {
|
||||||
|
// scss-docs-start spinner-border-css-vars
|
||||||
|
--#{$prefix}spinner-width: #{$spinner-width};
|
||||||
|
--#{$prefix}spinner-height: #{$spinner-height};
|
||||||
|
--#{$prefix}spinner-vertical-align: #{$spinner-vertical-align};
|
||||||
|
--#{$prefix}spinner-border-width: #{$spinner-border-width};
|
||||||
|
--#{$prefix}spinner-animation-speed: #{$spinner-animation-speed};
|
||||||
|
--#{$prefix}spinner-animation-name: spinner-border;
|
||||||
|
// scss-docs-end spinner-border-css-vars
|
||||||
|
|
||||||
|
border: var(--#{$prefix}spinner-border-width) solid currentcolor;
|
||||||
|
border-right-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner-border-sm {
|
.spinner-border-sm {
|
||||||
width: $spinner-width-sm;
|
// scss-docs-start spinner-border-sm-css-vars
|
||||||
height: $spinner-height-sm;
|
--#{$prefix}spinner-width: #{$spinner-width-sm};
|
||||||
border-width: $spinner-border-width-sm;
|
--#{$prefix}spinner-height: #{$spinner-height-sm};
|
||||||
|
--#{$prefix}spinner-border-width: #{$spinner-border-width-sm};
|
||||||
|
// scss-docs-end spinner-border-sm-css-vars
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Growing circle
|
// Growing circle
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// scss-docs-start spinner-grow-keyframes
|
||||||
@keyframes spinner-grow {
|
@keyframes spinner-grow {
|
||||||
0% {
|
0% {
|
||||||
transform: scale(0);
|
transform: scale(0);
|
||||||
|
@ -37,29 +55,31 @@
|
||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end spinner-grow-keyframes
|
||||||
|
|
||||||
.spinner-grow {
|
.spinner-grow {
|
||||||
display: inline-block;
|
// scss-docs-start spinner-grow-css-vars
|
||||||
width: $spinner-width;
|
--#{$prefix}spinner-width: #{$spinner-width};
|
||||||
height: $spinner-height;
|
--#{$prefix}spinner-height: #{$spinner-height};
|
||||||
vertical-align: text-bottom;
|
--#{$prefix}spinner-vertical-align: #{$spinner-vertical-align};
|
||||||
background-color: currentColor;
|
--#{$prefix}spinner-animation-speed: #{$spinner-animation-speed};
|
||||||
// stylelint-disable-next-line property-disallowed-list
|
--#{$prefix}spinner-animation-name: spinner-grow;
|
||||||
border-radius: 50%;
|
// scss-docs-end spinner-grow-css-vars
|
||||||
|
|
||||||
|
background-color: currentcolor;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation: .75s linear infinite spinner-grow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner-grow-sm {
|
.spinner-grow-sm {
|
||||||
width: $spinner-width-sm;
|
--#{$prefix}spinner-width: #{$spinner-width-sm};
|
||||||
height: $spinner-height-sm;
|
--#{$prefix}spinner-height: #{$spinner-height-sm};
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $enable-prefers-reduced-motion-media-query {
|
@if $enable-reduced-motion {
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.spinner-border,
|
.spinner-border,
|
||||||
.spinner-grow {
|
.spinner-grow {
|
||||||
animation-duration: 1.5s;
|
--#{$prefix}spinner-animation-speed: #{$spinner-animation-speed * 2};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,26 +3,61 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
.table {
|
.table {
|
||||||
|
// Reset needed for nesting tables
|
||||||
|
--#{$prefix}table-color-type: initial;
|
||||||
|
--#{$prefix}table-bg-type: initial;
|
||||||
|
--#{$prefix}table-color-state: initial;
|
||||||
|
--#{$prefix}table-bg-state: initial;
|
||||||
|
// End of reset
|
||||||
|
--#{$prefix}table-color: #{$table-color};
|
||||||
|
--#{$prefix}table-bg: #{$table-bg};
|
||||||
|
--#{$prefix}table-border-color: #{$table-border-color};
|
||||||
|
--#{$prefix}table-accent-bg: #{$table-accent-bg};
|
||||||
|
--#{$prefix}table-striped-color: #{$table-striped-color};
|
||||||
|
--#{$prefix}table-striped-bg: #{$table-striped-bg};
|
||||||
|
--#{$prefix}table-active-color: #{$table-active-color};
|
||||||
|
--#{$prefix}table-active-bg: #{$table-active-bg};
|
||||||
|
--#{$prefix}table-hover-color: #{$table-hover-color};
|
||||||
|
--#{$prefix}table-hover-bg: #{$table-hover-bg};
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: $spacer;
|
margin-bottom: $spacer;
|
||||||
color: $table-color;
|
vertical-align: $table-cell-vertical-align;
|
||||||
background-color: $table-bg; // Reset for nesting within parents with `background-color`.
|
border-color: var(--#{$prefix}table-border-color);
|
||||||
|
|
||||||
th,
|
// Target th & td
|
||||||
td {
|
// We need the child combinator to prevent styles leaking to nested tables which doesn't have a `.table` class.
|
||||||
padding: $table-cell-padding;
|
// We use the universal selectors here to simplify the selector (else we would need 6 different selectors).
|
||||||
vertical-align: top;
|
// Another advantage is that this generates less code and makes the selector less specific making it easier to override.
|
||||||
border-top: $table-border-width solid $table-border-color;
|
// stylelint-disable-next-line selector-max-universal
|
||||||
|
> :not(caption) > * > * {
|
||||||
|
padding: $table-cell-padding-y $table-cell-padding-x;
|
||||||
|
// Following the precept of cascades: https://codepen.io/miriamsuzanne/full/vYNgodb
|
||||||
|
color: var(--#{$prefix}table-color-state, var(--#{$prefix}table-color-type, var(--#{$prefix}table-color)));
|
||||||
|
background-color: var(--#{$prefix}table-bg);
|
||||||
|
border-bottom-width: $table-border-width;
|
||||||
|
box-shadow: inset 0 0 0 9999px var(--#{$prefix}table-bg-state, var(--#{$prefix}table-bg-type, var(--#{$prefix}table-accent-bg)));
|
||||||
}
|
}
|
||||||
|
|
||||||
thead th {
|
> tbody {
|
||||||
|
vertical-align: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
> thead {
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
border-bottom: (2 * $table-border-width) solid $table-border-color;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tbody + tbody {
|
.table-group-divider {
|
||||||
border-top: (2 * $table-border-width) solid $table-border-color;
|
border-top: calc(#{$table-border-width} * 2) solid $table-group-separator-color; // stylelint-disable-line function-disallowed-list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Change placement of captions with a class
|
||||||
|
//
|
||||||
|
|
||||||
|
.caption-top {
|
||||||
|
caption-side: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,9 +66,9 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
.table-sm {
|
.table-sm {
|
||||||
th,
|
// stylelint-disable-next-line selector-max-universal
|
||||||
td {
|
> :not(caption) > * > * {
|
||||||
padding: $table-cell-padding-sm;
|
padding: $table-cell-padding-y-sm $table-cell-padding-x-sm;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,29 +76,31 @@
|
||||||
// Border versions
|
// Border versions
|
||||||
//
|
//
|
||||||
// Add or remove borders all around the table and between all the columns.
|
// Add or remove borders all around the table and between all the columns.
|
||||||
|
//
|
||||||
|
// When borders are added on all sides of the cells, the corners can render odd when
|
||||||
|
// these borders do not have the same color or if they are semi-transparent.
|
||||||
|
// Therefor we add top and border bottoms to the `tr`s and left and right borders
|
||||||
|
// to the `td`s or `th`s
|
||||||
|
|
||||||
.table-bordered {
|
.table-bordered {
|
||||||
border: $table-border-width solid $table-border-color;
|
> :not(caption) > * {
|
||||||
|
border-width: $table-border-width 0;
|
||||||
|
|
||||||
th,
|
// stylelint-disable-next-line selector-max-universal
|
||||||
td {
|
> * {
|
||||||
border: $table-border-width solid $table-border-color;
|
border-width: 0 $table-border-width;
|
||||||
}
|
|
||||||
|
|
||||||
thead {
|
|
||||||
th,
|
|
||||||
td {
|
|
||||||
border-bottom-width: 2 * $table-border-width;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-borderless {
|
.table-borderless {
|
||||||
th,
|
// stylelint-disable-next-line selector-max-universal
|
||||||
td,
|
> :not(caption) > * > * {
|
||||||
thead th,
|
border-bottom-width: 0;
|
||||||
tbody + tbody {
|
}
|
||||||
border: 0;
|
|
||||||
|
> :not(:first-child) {
|
||||||
|
border-top-width: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,115 +108,64 @@
|
||||||
//
|
//
|
||||||
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
||||||
|
|
||||||
|
// For rows
|
||||||
.table-striped {
|
.table-striped {
|
||||||
tbody tr:nth-of-type(#{$table-striped-order}) {
|
> tbody > tr:nth-of-type(#{$table-striped-order}) > * {
|
||||||
background-color: $table-accent-bg;
|
--#{$prefix}table-color-type: var(--#{$prefix}table-striped-color);
|
||||||
|
--#{$prefix}table-bg-type: var(--#{$prefix}table-striped-bg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For columns
|
||||||
|
.table-striped-columns {
|
||||||
|
> :not(caption) > tr > :nth-child(#{$table-striped-columns-order}) {
|
||||||
|
--#{$prefix}table-color-type: var(--#{$prefix}table-striped-color);
|
||||||
|
--#{$prefix}table-bg-type: var(--#{$prefix}table-striped-bg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Active table
|
||||||
|
//
|
||||||
|
// The `.table-active` class can be added to highlight rows or cells
|
||||||
|
|
||||||
|
.table-active {
|
||||||
|
--#{$prefix}table-color-state: var(--#{$prefix}table-active-color);
|
||||||
|
--#{$prefix}table-bg-state: var(--#{$prefix}table-active-bg);
|
||||||
|
}
|
||||||
|
|
||||||
// Hover effect
|
// Hover effect
|
||||||
//
|
//
|
||||||
// Placed here since it has to come after the potential zebra striping
|
// Placed here since it has to come after the potential zebra striping
|
||||||
|
|
||||||
.table-hover {
|
.table-hover {
|
||||||
tbody tr {
|
> tbody > tr:hover > * {
|
||||||
@include hover() {
|
--#{$prefix}table-color-state: var(--#{$prefix}table-hover-color);
|
||||||
color: $table-hover-color;
|
--#{$prefix}table-bg-state: var(--#{$prefix}table-hover-bg);
|
||||||
background-color: $table-hover-bg;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Table backgrounds
|
// Table variants
|
||||||
//
|
//
|
||||||
// Exact selectors below required to override `.table-striped` and prevent
|
// Table variants set the table cell backgrounds, border colors
|
||||||
// inheritance to nested tables.
|
// and the colors of the striped, hovered & active tables
|
||||||
|
|
||||||
@each $color, $value in $theme-colors {
|
@each $color, $value in $table-variants {
|
||||||
@include table-row-variant($color, theme-color-level($color, $table-bg-level), theme-color-level($color, $table-border-level));
|
@include table-variant($color, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@include table-row-variant(active, $table-active-bg);
|
|
||||||
|
|
||||||
|
|
||||||
// Dark styles
|
|
||||||
//
|
|
||||||
// Same table markup, but inverted color scheme: dark background and light text.
|
|
||||||
|
|
||||||
// stylelint-disable-next-line no-duplicate-selectors
|
|
||||||
.table {
|
|
||||||
.thead-dark {
|
|
||||||
th {
|
|
||||||
color: $table-dark-color;
|
|
||||||
background-color: $table-dark-bg;
|
|
||||||
border-color: $table-dark-border-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.thead-light {
|
|
||||||
th {
|
|
||||||
color: $table-head-color;
|
|
||||||
background-color: $table-head-bg;
|
|
||||||
border-color: $table-border-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-dark {
|
|
||||||
color: $table-dark-color;
|
|
||||||
background-color: $table-dark-bg;
|
|
||||||
|
|
||||||
th,
|
|
||||||
td,
|
|
||||||
thead th {
|
|
||||||
border-color: $table-dark-border-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.table-bordered {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.table-striped {
|
|
||||||
tbody tr:nth-of-type(#{$table-striped-order}) {
|
|
||||||
background-color: $table-dark-accent-bg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.table-hover {
|
|
||||||
tbody tr {
|
|
||||||
@include hover() {
|
|
||||||
color: $table-dark-hover-color;
|
|
||||||
background-color: $table-dark-hover-bg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Responsive tables
|
// Responsive tables
|
||||||
//
|
//
|
||||||
// Generate series of `.table-responsive-*` classes for configuring the screen
|
// Generate series of `.table-responsive-*` classes for configuring the screen
|
||||||
// size of where your table will overflow.
|
// size of where your table will overflow.
|
||||||
|
|
||||||
.table-responsive {
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||||
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
|
||||||
$infix: breakpoint-infix($next, $grid-breakpoints);
|
|
||||||
|
|
||||||
&#{$infix} {
|
|
||||||
@include media-breakpoint-down($breakpoint) {
|
@include media-breakpoint-down($breakpoint) {
|
||||||
display: block;
|
.table-responsive#{$infix} {
|
||||||
width: 100%;
|
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
// Prevent double border on horizontal scroll due to use of `display: block;`
|
|
||||||
> .table-bordered {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,46 +1,73 @@
|
||||||
.toast {
|
.toast {
|
||||||
// Prevents from shrinking in IE11, when in a flex container
|
// scss-docs-start toast-css-vars
|
||||||
// See https://github.com/twbs/bootstrap/issues/28341
|
--#{$prefix}toast-zindex: #{$zindex-toast};
|
||||||
flex-basis: $toast-max-width;
|
--#{$prefix}toast-padding-x: #{$toast-padding-x};
|
||||||
max-width: $toast-max-width;
|
--#{$prefix}toast-padding-y: #{$toast-padding-y};
|
||||||
@include font-size($toast-font-size);
|
--#{$prefix}toast-spacing: #{$toast-spacing};
|
||||||
color: $toast-color;
|
--#{$prefix}toast-max-width: #{$toast-max-width};
|
||||||
background-color: $toast-background-color;
|
@include rfs($toast-font-size, --#{$prefix}toast-font-size);
|
||||||
background-clip: padding-box;
|
--#{$prefix}toast-color: #{$toast-color};
|
||||||
border: $toast-border-width solid $toast-border-color;
|
--#{$prefix}toast-bg: #{$toast-background-color};
|
||||||
box-shadow: $toast-box-shadow;
|
--#{$prefix}toast-border-width: #{$toast-border-width};
|
||||||
opacity: 0;
|
--#{$prefix}toast-border-color: #{$toast-border-color};
|
||||||
@include border-radius($toast-border-radius);
|
--#{$prefix}toast-border-radius: #{$toast-border-radius};
|
||||||
|
--#{$prefix}toast-box-shadow: #{$toast-box-shadow};
|
||||||
|
--#{$prefix}toast-header-color: #{$toast-header-color};
|
||||||
|
--#{$prefix}toast-header-bg: #{$toast-header-background-color};
|
||||||
|
--#{$prefix}toast-header-border-color: #{$toast-header-border-color};
|
||||||
|
// scss-docs-end toast-css-vars
|
||||||
|
|
||||||
&:not(:last-child) {
|
width: var(--#{$prefix}toast-max-width);
|
||||||
margin-bottom: $toast-padding-x;
|
max-width: 100%;
|
||||||
}
|
@include font-size(var(--#{$prefix}toast-font-size));
|
||||||
|
color: var(--#{$prefix}toast-color);
|
||||||
|
pointer-events: auto;
|
||||||
|
background-color: var(--#{$prefix}toast-bg);
|
||||||
|
background-clip: padding-box;
|
||||||
|
border: var(--#{$prefix}toast-border-width) solid var(--#{$prefix}toast-border-color);
|
||||||
|
box-shadow: var(--#{$prefix}toast-box-shadow);
|
||||||
|
@include border-radius(var(--#{$prefix}toast-border-radius));
|
||||||
|
|
||||||
&.showing {
|
&.showing {
|
||||||
opacity: 1;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.show {
|
&:not(.show) {
|
||||||
display: block;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.hide {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toast-container {
|
||||||
|
--#{$prefix}toast-zindex: #{$zindex-toast};
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
z-index: var(--#{$prefix}toast-zindex);
|
||||||
|
width: max-content;
|
||||||
|
max-width: 100%;
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
|
> :not(:last-child) {
|
||||||
|
margin-bottom: var(--#{$prefix}toast-spacing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.toast-header {
|
.toast-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: $toast-padding-y $toast-padding-x;
|
padding: var(--#{$prefix}toast-padding-y) var(--#{$prefix}toast-padding-x);
|
||||||
color: $toast-header-color;
|
color: var(--#{$prefix}toast-header-color);
|
||||||
background-color: $toast-header-background-color;
|
background-color: var(--#{$prefix}toast-header-bg);
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
border-bottom: $toast-border-width solid $toast-header-border-color;
|
border-bottom: var(--#{$prefix}toast-border-width) solid var(--#{$prefix}toast-header-border-color);
|
||||||
@include border-top-radius(subtract($toast-border-radius, $toast-border-width));
|
@include border-top-radius(calc(var(--#{$prefix}toast-border-radius) - var(--#{$prefix}toast-border-width)));
|
||||||
|
|
||||||
|
.btn-close {
|
||||||
|
margin-right: calc(-.5 * var(--#{$prefix}toast-padding-x)); // stylelint-disable-line function-disallowed-list
|
||||||
|
margin-left: var(--#{$prefix}toast-padding-x);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.toast-body {
|
.toast-body {
|
||||||
padding: $toast-padding-x; // apply to both vertical and horizontal
|
padding: var(--#{$prefix}toast-padding-x);
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,38 @@
|
||||||
// Base class
|
// Base class
|
||||||
.tooltip {
|
.tooltip {
|
||||||
position: absolute;
|
// scss-docs-start tooltip-css-vars
|
||||||
z-index: $zindex-tooltip;
|
--#{$prefix}tooltip-zindex: #{$zindex-tooltip};
|
||||||
|
--#{$prefix}tooltip-max-width: #{$tooltip-max-width};
|
||||||
|
--#{$prefix}tooltip-padding-x: #{$tooltip-padding-x};
|
||||||
|
--#{$prefix}tooltip-padding-y: #{$tooltip-padding-y};
|
||||||
|
--#{$prefix}tooltip-margin: #{$tooltip-margin};
|
||||||
|
@include rfs($tooltip-font-size, --#{$prefix}tooltip-font-size);
|
||||||
|
--#{$prefix}tooltip-color: #{$tooltip-color};
|
||||||
|
--#{$prefix}tooltip-bg: #{$tooltip-bg};
|
||||||
|
--#{$prefix}tooltip-border-radius: #{$tooltip-border-radius};
|
||||||
|
--#{$prefix}tooltip-opacity: #{$tooltip-opacity};
|
||||||
|
--#{$prefix}tooltip-arrow-width: #{$tooltip-arrow-width};
|
||||||
|
--#{$prefix}tooltip-arrow-height: #{$tooltip-arrow-height};
|
||||||
|
// scss-docs-end tooltip-css-vars
|
||||||
|
|
||||||
|
z-index: var(--#{$prefix}tooltip-zindex);
|
||||||
display: block;
|
display: block;
|
||||||
margin: $tooltip-margin;
|
margin: var(--#{$prefix}tooltip-margin);
|
||||||
|
@include deprecate("`$tooltip-margin`", "v5", "v5.x", true);
|
||||||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||||
// So reset our font and text properties to avoid inheriting weird values.
|
// So reset our font and text properties to avoid inheriting weird values.
|
||||||
@include reset-text();
|
@include reset-text();
|
||||||
@include font-size($tooltip-font-size);
|
@include font-size(var(--#{$prefix}tooltip-font-size));
|
||||||
// Allow breaking very long words so they don't overflow the tooltip's bounds
|
// Allow breaking very long words so they don't overflow the tooltip's bounds
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
||||||
&.show { opacity: $tooltip-opacity; }
|
&.show { opacity: var(--#{$prefix}tooltip-opacity); }
|
||||||
|
|
||||||
.arrow {
|
.tooltip-arrow {
|
||||||
position: absolute;
|
|
||||||
display: block;
|
display: block;
|
||||||
width: $tooltip-arrow-width;
|
width: var(--#{$prefix}tooltip-arrow-width);
|
||||||
height: $tooltip-arrow-height;
|
height: var(--#{$prefix}tooltip-arrow-height);
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -29,87 +43,77 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-tooltip-top {
|
.bs-tooltip-top .tooltip-arrow {
|
||||||
padding: $tooltip-arrow-height 0;
|
bottom: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
|
||||||
|
|
||||||
.arrow {
|
|
||||||
bottom: 0;
|
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
top: 0;
|
top: -1px;
|
||||||
border-width: $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
|
border-width: var(--#{$prefix}tooltip-arrow-height) calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
|
||||||
border-top-color: $tooltip-arrow-color;
|
border-top-color: var(--#{$prefix}tooltip-bg);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-tooltip-right {
|
/* rtl:begin:ignore */
|
||||||
padding: 0 $tooltip-arrow-height;
|
.bs-tooltip-end .tooltip-arrow {
|
||||||
|
left: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
|
||||||
.arrow {
|
width: var(--#{$prefix}tooltip-arrow-height);
|
||||||
left: 0;
|
height: var(--#{$prefix}tooltip-arrow-width);
|
||||||
width: $tooltip-arrow-height;
|
|
||||||
height: $tooltip-arrow-width;
|
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
right: 0;
|
right: -1px;
|
||||||
border-width: ($tooltip-arrow-width / 2) $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
|
border-width: calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height) calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
|
||||||
border-right-color: $tooltip-arrow-color;
|
border-right-color: var(--#{$prefix}tooltip-bg);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-tooltip-bottom {
|
/* rtl:end:ignore */
|
||||||
padding: $tooltip-arrow-height 0;
|
|
||||||
|
|
||||||
.arrow {
|
.bs-tooltip-bottom .tooltip-arrow {
|
||||||
top: 0;
|
top: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
bottom: 0;
|
bottom: -1px;
|
||||||
border-width: 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
|
border-width: 0 calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
|
||||||
border-bottom-color: $tooltip-arrow-color;
|
border-bottom-color: var(--#{$prefix}tooltip-bg);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-tooltip-left {
|
/* rtl:begin:ignore */
|
||||||
padding: 0 $tooltip-arrow-height;
|
.bs-tooltip-start .tooltip-arrow {
|
||||||
|
right: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
|
||||||
.arrow {
|
width: var(--#{$prefix}tooltip-arrow-height);
|
||||||
right: 0;
|
height: var(--#{$prefix}tooltip-arrow-width);
|
||||||
width: $tooltip-arrow-height;
|
|
||||||
height: $tooltip-arrow-width;
|
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
left: 0;
|
left: -1px;
|
||||||
border-width: ($tooltip-arrow-width / 2) 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
|
border-width: calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0 calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
|
||||||
border-left-color: $tooltip-arrow-color;
|
border-left-color: var(--#{$prefix}tooltip-bg);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* rtl:end:ignore */
|
||||||
|
|
||||||
.bs-tooltip-auto {
|
.bs-tooltip-auto {
|
||||||
&[x-placement^="top"] {
|
&[data-popper-placement^="top"] {
|
||||||
@extend .bs-tooltip-top;
|
@extend .bs-tooltip-top;
|
||||||
}
|
}
|
||||||
&[x-placement^="right"] {
|
&[data-popper-placement^="right"] {
|
||||||
@extend .bs-tooltip-right;
|
@extend .bs-tooltip-end;
|
||||||
}
|
}
|
||||||
&[x-placement^="bottom"] {
|
&[data-popper-placement^="bottom"] {
|
||||||
@extend .bs-tooltip-bottom;
|
@extend .bs-tooltip-bottom;
|
||||||
}
|
}
|
||||||
&[x-placement^="left"] {
|
&[data-popper-placement^="left"] {
|
||||||
@extend .bs-tooltip-left;
|
@extend .bs-tooltip-start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapper for the tooltip content
|
// Wrapper for the tooltip content
|
||||||
.tooltip-inner {
|
.tooltip-inner {
|
||||||
max-width: $tooltip-max-width;
|
max-width: var(--#{$prefix}tooltip-max-width);
|
||||||
padding: $tooltip-padding-y $tooltip-padding-x;
|
padding: var(--#{$prefix}tooltip-padding-y) var(--#{$prefix}tooltip-padding-x);
|
||||||
color: $tooltip-color;
|
color: var(--#{$prefix}tooltip-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: $tooltip-bg;
|
background-color: var(--#{$prefix}tooltip-bg);
|
||||||
@include border-radius($tooltip-border-radius);
|
@include border-radius(var(--#{$prefix}tooltip-border-radius));
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// scss-docs-start collapse-classes
|
||||||
.collapse {
|
.collapse {
|
||||||
&:not(.show) {
|
&:not(.show) {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -13,8 +14,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.collapsing {
|
.collapsing {
|
||||||
position: relative;
|
|
||||||
height: 0;
|
height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@include transition($transition-collapse);
|
@include transition($transition-collapse);
|
||||||
|
|
||||||
|
&.collapse-horizontal {
|
||||||
|
width: 0;
|
||||||
|
height: auto;
|
||||||
|
@include transition($transition-collapse-width);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end collapse-classes
|
||||||
|
|
|
@ -1,24 +1,30 @@
|
||||||
// stylelint-disable selector-list-comma-newline-after
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Headings
|
// Headings
|
||||||
//
|
//
|
||||||
|
.h1 {
|
||||||
h1, h2, h3, h4, h5, h6,
|
@extend h1;
|
||||||
.h1, .h2, .h3, .h4, .h5, .h6 {
|
}
|
||||||
margin-bottom: $headings-margin-bottom;
|
|
||||||
font-family: $headings-font-family;
|
.h2 {
|
||||||
font-weight: $headings-font-weight;
|
@extend h2;
|
||||||
line-height: $headings-line-height;
|
}
|
||||||
color: $headings-color;
|
|
||||||
|
.h3 {
|
||||||
|
@extend h3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.h4 {
|
||||||
|
@extend h4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.h5 {
|
||||||
|
@extend h5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.h6 {
|
||||||
|
@extend h6;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, .h1 { @include font-size($h1-font-size); }
|
|
||||||
h2, .h2 { @include font-size($h2-font-size); }
|
|
||||||
h3, .h3 { @include font-size($h3-font-size); }
|
|
||||||
h4, .h4 { @include font-size($h4-font-size); }
|
|
||||||
h5, .h5 { @include font-size($h5-font-size); }
|
|
||||||
h6, .h6 { @include font-size($h6-font-size); }
|
|
||||||
|
|
||||||
.lead {
|
.lead {
|
||||||
@include font-size($lead-font-size);
|
@include font-size($lead-font-size);
|
||||||
|
@ -26,57 +32,27 @@ h6, .h6 { @include font-size($h6-font-size); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type display classes
|
// Type display classes
|
||||||
.display-1 {
|
@each $display, $font-size in $display-font-sizes {
|
||||||
@include font-size($display1-size);
|
.display-#{$display} {
|
||||||
font-weight: $display1-weight;
|
@include font-size($font-size);
|
||||||
|
font-family: $display-font-family;
|
||||||
|
font-style: $display-font-style;
|
||||||
|
font-weight: $display-font-weight;
|
||||||
line-height: $display-line-height;
|
line-height: $display-line-height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.display-2 {
|
|
||||||
@include font-size($display2-size);
|
|
||||||
font-weight: $display2-weight;
|
|
||||||
line-height: $display-line-height;
|
|
||||||
}
|
|
||||||
.display-3 {
|
|
||||||
@include font-size($display3-size);
|
|
||||||
font-weight: $display3-weight;
|
|
||||||
line-height: $display-line-height;
|
|
||||||
}
|
|
||||||
.display-4 {
|
|
||||||
@include font-size($display4-size);
|
|
||||||
font-weight: $display4-weight;
|
|
||||||
line-height: $display-line-height;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Horizontal rules
|
|
||||||
//
|
|
||||||
|
|
||||||
hr {
|
|
||||||
margin-top: $hr-margin-y;
|
|
||||||
margin-bottom: $hr-margin-y;
|
|
||||||
border: 0;
|
|
||||||
border-top: $hr-border-width solid $hr-border-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Emphasis
|
// Emphasis
|
||||||
//
|
//
|
||||||
|
|
||||||
small,
|
|
||||||
.small {
|
.small {
|
||||||
@include font-size($small-font-size);
|
@extend small;
|
||||||
font-weight: $font-weight-normal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mark,
|
|
||||||
.mark {
|
.mark {
|
||||||
padding: $mark-padding;
|
@extend mark;
|
||||||
background-color: $mark-bg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Lists
|
// Lists
|
||||||
//
|
//
|
||||||
|
@ -104,20 +80,25 @@ mark,
|
||||||
|
|
||||||
// Builds on `abbr`
|
// Builds on `abbr`
|
||||||
.initialism {
|
.initialism {
|
||||||
@include font-size(90%);
|
@include font-size($initialism-font-size);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Blockquotes
|
// Blockquotes
|
||||||
.blockquote {
|
.blockquote {
|
||||||
margin-bottom: $spacer;
|
margin-bottom: $blockquote-margin-y;
|
||||||
@include font-size($blockquote-font-size);
|
@include font-size($blockquote-font-size);
|
||||||
|
|
||||||
|
> :last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.blockquote-footer {
|
.blockquote-footer {
|
||||||
display: block;
|
margin-top: -$blockquote-margin-y;
|
||||||
@include font-size($blockquote-small-font-size);
|
margin-bottom: $blockquote-margin-y;
|
||||||
color: $blockquote-small-color;
|
@include font-size($blockquote-footer-font-size);
|
||||||
|
color: $blockquote-footer-color;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: "\2014\00A0"; // em dash, nbsp
|
content: "\2014\00A0"; // em dash, nbsp
|
||||||
|
|
|
@ -1,18 +1,806 @@
|
||||||
@import "utilities/align";
|
// Utilities
|
||||||
@import "utilities/background";
|
|
||||||
@import "utilities/borders";
|
$utilities: () !default;
|
||||||
@import "utilities/clearfix";
|
// stylelint-disable-next-line scss/dollar-variable-default
|
||||||
@import "utilities/display";
|
$utilities: map-merge(
|
||||||
@import "utilities/embed";
|
(
|
||||||
@import "utilities/flex";
|
// scss-docs-start utils-vertical-align
|
||||||
@import "utilities/float";
|
"align": (
|
||||||
@import "utilities/interactions";
|
property: vertical-align,
|
||||||
@import "utilities/overflow";
|
class: align,
|
||||||
@import "utilities/position";
|
values: baseline top middle bottom text-bottom text-top
|
||||||
@import "utilities/screenreaders";
|
),
|
||||||
@import "utilities/shadows";
|
// scss-docs-end utils-vertical-align
|
||||||
@import "utilities/sizing";
|
// scss-docs-start utils-float
|
||||||
@import "utilities/spacing";
|
"float": (
|
||||||
@import "utilities/stretched-link";
|
responsive: true,
|
||||||
@import "utilities/text";
|
property: float,
|
||||||
@import "utilities/visibility";
|
values: (
|
||||||
|
start: left,
|
||||||
|
end: right,
|
||||||
|
none: none,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-float
|
||||||
|
// Object Fit utilities
|
||||||
|
// scss-docs-start utils-object-fit
|
||||||
|
"object-fit": (
|
||||||
|
responsive: true,
|
||||||
|
property: object-fit,
|
||||||
|
values: (
|
||||||
|
contain: contain,
|
||||||
|
cover: cover,
|
||||||
|
fill: fill,
|
||||||
|
scale: scale-down,
|
||||||
|
none: none,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-object-fit
|
||||||
|
// Opacity utilities
|
||||||
|
// scss-docs-start utils-opacity
|
||||||
|
"opacity": (
|
||||||
|
property: opacity,
|
||||||
|
values: (
|
||||||
|
0: 0,
|
||||||
|
25: .25,
|
||||||
|
50: .5,
|
||||||
|
75: .75,
|
||||||
|
100: 1,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-opacity
|
||||||
|
// scss-docs-start utils-overflow
|
||||||
|
"overflow": (
|
||||||
|
property: overflow,
|
||||||
|
values: auto hidden visible scroll,
|
||||||
|
),
|
||||||
|
"overflow-x": (
|
||||||
|
property: overflow-x,
|
||||||
|
values: auto hidden visible scroll,
|
||||||
|
),
|
||||||
|
"overflow-y": (
|
||||||
|
property: overflow-y,
|
||||||
|
values: auto hidden visible scroll,
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-overflow
|
||||||
|
// scss-docs-start utils-display
|
||||||
|
"display": (
|
||||||
|
responsive: true,
|
||||||
|
print: true,
|
||||||
|
property: display,
|
||||||
|
class: d,
|
||||||
|
values: inline inline-block block grid inline-grid table table-row table-cell flex inline-flex none
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-display
|
||||||
|
// scss-docs-start utils-shadow
|
||||||
|
"shadow": (
|
||||||
|
property: box-shadow,
|
||||||
|
class: shadow,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}box-shadow),
|
||||||
|
sm: var(--#{$prefix}box-shadow-sm),
|
||||||
|
lg: var(--#{$prefix}box-shadow-lg),
|
||||||
|
none: none,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-shadow
|
||||||
|
// scss-docs-start utils-focus-ring
|
||||||
|
"focus-ring": (
|
||||||
|
css-var: true,
|
||||||
|
css-variable-name: focus-ring-color,
|
||||||
|
class: focus-ring,
|
||||||
|
values: map-loop($theme-colors-rgb, rgba-css-var, "$key", "focus-ring")
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-focus-ring
|
||||||
|
// scss-docs-start utils-position
|
||||||
|
"position": (
|
||||||
|
property: position,
|
||||||
|
values: static relative absolute fixed sticky
|
||||||
|
),
|
||||||
|
"top": (
|
||||||
|
property: top,
|
||||||
|
values: $position-values
|
||||||
|
),
|
||||||
|
"bottom": (
|
||||||
|
property: bottom,
|
||||||
|
values: $position-values
|
||||||
|
),
|
||||||
|
"start": (
|
||||||
|
property: left,
|
||||||
|
class: start,
|
||||||
|
values: $position-values
|
||||||
|
),
|
||||||
|
"end": (
|
||||||
|
property: right,
|
||||||
|
class: end,
|
||||||
|
values: $position-values
|
||||||
|
),
|
||||||
|
"translate-middle": (
|
||||||
|
property: transform,
|
||||||
|
class: translate-middle,
|
||||||
|
values: (
|
||||||
|
null: translate(-50%, -50%),
|
||||||
|
x: translateX(-50%),
|
||||||
|
y: translateY(-50%),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-position
|
||||||
|
// scss-docs-start utils-borders
|
||||||
|
"border": (
|
||||||
|
property: border,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
|
||||||
|
0: 0,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"border-top": (
|
||||||
|
property: border-top,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
|
||||||
|
0: 0,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"border-end": (
|
||||||
|
property: border-right,
|
||||||
|
class: border-end,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
|
||||||
|
0: 0,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"border-bottom": (
|
||||||
|
property: border-bottom,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
|
||||||
|
0: 0,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"border-start": (
|
||||||
|
property: border-left,
|
||||||
|
class: border-start,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
|
||||||
|
0: 0,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"border-color": (
|
||||||
|
property: border-color,
|
||||||
|
class: border,
|
||||||
|
local-vars: (
|
||||||
|
"border-opacity": 1
|
||||||
|
),
|
||||||
|
values: $utilities-border-colors
|
||||||
|
),
|
||||||
|
"subtle-border-color": (
|
||||||
|
property: border-color,
|
||||||
|
class: border,
|
||||||
|
values: $utilities-border-subtle
|
||||||
|
),
|
||||||
|
"border-width": (
|
||||||
|
property: border-width,
|
||||||
|
class: border,
|
||||||
|
values: $border-widths
|
||||||
|
),
|
||||||
|
"border-opacity": (
|
||||||
|
css-var: true,
|
||||||
|
class: border-opacity,
|
||||||
|
values: (
|
||||||
|
10: .1,
|
||||||
|
25: .25,
|
||||||
|
50: .5,
|
||||||
|
75: .75,
|
||||||
|
100: 1
|
||||||
|
)
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-borders
|
||||||
|
// Sizing utilities
|
||||||
|
// scss-docs-start utils-sizing
|
||||||
|
"width": (
|
||||||
|
property: width,
|
||||||
|
class: w,
|
||||||
|
values: (
|
||||||
|
25: 25%,
|
||||||
|
50: 50%,
|
||||||
|
75: 75%,
|
||||||
|
100: 100%,
|
||||||
|
auto: auto
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"max-width": (
|
||||||
|
property: max-width,
|
||||||
|
class: mw,
|
||||||
|
values: (100: 100%)
|
||||||
|
),
|
||||||
|
"viewport-width": (
|
||||||
|
property: width,
|
||||||
|
class: vw,
|
||||||
|
values: (100: 100vw)
|
||||||
|
),
|
||||||
|
"min-viewport-width": (
|
||||||
|
property: min-width,
|
||||||
|
class: min-vw,
|
||||||
|
values: (100: 100vw)
|
||||||
|
),
|
||||||
|
"height": (
|
||||||
|
property: height,
|
||||||
|
class: h,
|
||||||
|
values: (
|
||||||
|
25: 25%,
|
||||||
|
50: 50%,
|
||||||
|
75: 75%,
|
||||||
|
100: 100%,
|
||||||
|
auto: auto
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"max-height": (
|
||||||
|
property: max-height,
|
||||||
|
class: mh,
|
||||||
|
values: (100: 100%)
|
||||||
|
),
|
||||||
|
"viewport-height": (
|
||||||
|
property: height,
|
||||||
|
class: vh,
|
||||||
|
values: (100: 100vh)
|
||||||
|
),
|
||||||
|
"min-viewport-height": (
|
||||||
|
property: min-height,
|
||||||
|
class: min-vh,
|
||||||
|
values: (100: 100vh)
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-sizing
|
||||||
|
// Flex utilities
|
||||||
|
// scss-docs-start utils-flex
|
||||||
|
"flex": (
|
||||||
|
responsive: true,
|
||||||
|
property: flex,
|
||||||
|
values: (fill: 1 1 auto)
|
||||||
|
),
|
||||||
|
"flex-direction": (
|
||||||
|
responsive: true,
|
||||||
|
property: flex-direction,
|
||||||
|
class: flex,
|
||||||
|
values: row column row-reverse column-reverse
|
||||||
|
),
|
||||||
|
"flex-grow": (
|
||||||
|
responsive: true,
|
||||||
|
property: flex-grow,
|
||||||
|
class: flex,
|
||||||
|
values: (
|
||||||
|
grow-0: 0,
|
||||||
|
grow-1: 1,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"flex-shrink": (
|
||||||
|
responsive: true,
|
||||||
|
property: flex-shrink,
|
||||||
|
class: flex,
|
||||||
|
values: (
|
||||||
|
shrink-0: 0,
|
||||||
|
shrink-1: 1,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"flex-wrap": (
|
||||||
|
responsive: true,
|
||||||
|
property: flex-wrap,
|
||||||
|
class: flex,
|
||||||
|
values: wrap nowrap wrap-reverse
|
||||||
|
),
|
||||||
|
"justify-content": (
|
||||||
|
responsive: true,
|
||||||
|
property: justify-content,
|
||||||
|
values: (
|
||||||
|
start: flex-start,
|
||||||
|
end: flex-end,
|
||||||
|
center: center,
|
||||||
|
between: space-between,
|
||||||
|
around: space-around,
|
||||||
|
evenly: space-evenly,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"align-items": (
|
||||||
|
responsive: true,
|
||||||
|
property: align-items,
|
||||||
|
values: (
|
||||||
|
start: flex-start,
|
||||||
|
end: flex-end,
|
||||||
|
center: center,
|
||||||
|
baseline: baseline,
|
||||||
|
stretch: stretch,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"align-content": (
|
||||||
|
responsive: true,
|
||||||
|
property: align-content,
|
||||||
|
values: (
|
||||||
|
start: flex-start,
|
||||||
|
end: flex-end,
|
||||||
|
center: center,
|
||||||
|
between: space-between,
|
||||||
|
around: space-around,
|
||||||
|
stretch: stretch,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"align-self": (
|
||||||
|
responsive: true,
|
||||||
|
property: align-self,
|
||||||
|
values: (
|
||||||
|
auto: auto,
|
||||||
|
start: flex-start,
|
||||||
|
end: flex-end,
|
||||||
|
center: center,
|
||||||
|
baseline: baseline,
|
||||||
|
stretch: stretch,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"order": (
|
||||||
|
responsive: true,
|
||||||
|
property: order,
|
||||||
|
values: (
|
||||||
|
first: -1,
|
||||||
|
0: 0,
|
||||||
|
1: 1,
|
||||||
|
2: 2,
|
||||||
|
3: 3,
|
||||||
|
4: 4,
|
||||||
|
5: 5,
|
||||||
|
last: 6,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-flex
|
||||||
|
// Margin utilities
|
||||||
|
// scss-docs-start utils-spacing
|
||||||
|
"margin": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin,
|
||||||
|
class: m,
|
||||||
|
values: map-merge($spacers, (auto: auto))
|
||||||
|
),
|
||||||
|
"margin-x": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-right margin-left,
|
||||||
|
class: mx,
|
||||||
|
values: map-merge($spacers, (auto: auto))
|
||||||
|
),
|
||||||
|
"margin-y": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-top margin-bottom,
|
||||||
|
class: my,
|
||||||
|
values: map-merge($spacers, (auto: auto))
|
||||||
|
),
|
||||||
|
"margin-top": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-top,
|
||||||
|
class: mt,
|
||||||
|
values: map-merge($spacers, (auto: auto))
|
||||||
|
),
|
||||||
|
"margin-end": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-right,
|
||||||
|
class: me,
|
||||||
|
values: map-merge($spacers, (auto: auto))
|
||||||
|
),
|
||||||
|
"margin-bottom": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-bottom,
|
||||||
|
class: mb,
|
||||||
|
values: map-merge($spacers, (auto: auto))
|
||||||
|
),
|
||||||
|
"margin-start": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-left,
|
||||||
|
class: ms,
|
||||||
|
values: map-merge($spacers, (auto: auto))
|
||||||
|
),
|
||||||
|
// Negative margin utilities
|
||||||
|
"negative-margin": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin,
|
||||||
|
class: m,
|
||||||
|
values: $negative-spacers
|
||||||
|
),
|
||||||
|
"negative-margin-x": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-right margin-left,
|
||||||
|
class: mx,
|
||||||
|
values: $negative-spacers
|
||||||
|
),
|
||||||
|
"negative-margin-y": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-top margin-bottom,
|
||||||
|
class: my,
|
||||||
|
values: $negative-spacers
|
||||||
|
),
|
||||||
|
"negative-margin-top": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-top,
|
||||||
|
class: mt,
|
||||||
|
values: $negative-spacers
|
||||||
|
),
|
||||||
|
"negative-margin-end": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-right,
|
||||||
|
class: me,
|
||||||
|
values: $negative-spacers
|
||||||
|
),
|
||||||
|
"negative-margin-bottom": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-bottom,
|
||||||
|
class: mb,
|
||||||
|
values: $negative-spacers
|
||||||
|
),
|
||||||
|
"negative-margin-start": (
|
||||||
|
responsive: true,
|
||||||
|
property: margin-left,
|
||||||
|
class: ms,
|
||||||
|
values: $negative-spacers
|
||||||
|
),
|
||||||
|
// Padding utilities
|
||||||
|
"padding": (
|
||||||
|
responsive: true,
|
||||||
|
property: padding,
|
||||||
|
class: p,
|
||||||
|
values: $spacers
|
||||||
|
),
|
||||||
|
"padding-x": (
|
||||||
|
responsive: true,
|
||||||
|
property: padding-right padding-left,
|
||||||
|
class: px,
|
||||||
|
values: $spacers
|
||||||
|
),
|
||||||
|
"padding-y": (
|
||||||
|
responsive: true,
|
||||||
|
property: padding-top padding-bottom,
|
||||||
|
class: py,
|
||||||
|
values: $spacers
|
||||||
|
),
|
||||||
|
"padding-top": (
|
||||||
|
responsive: true,
|
||||||
|
property: padding-top,
|
||||||
|
class: pt,
|
||||||
|
values: $spacers
|
||||||
|
),
|
||||||
|
"padding-end": (
|
||||||
|
responsive: true,
|
||||||
|
property: padding-right,
|
||||||
|
class: pe,
|
||||||
|
values: $spacers
|
||||||
|
),
|
||||||
|
"padding-bottom": (
|
||||||
|
responsive: true,
|
||||||
|
property: padding-bottom,
|
||||||
|
class: pb,
|
||||||
|
values: $spacers
|
||||||
|
),
|
||||||
|
"padding-start": (
|
||||||
|
responsive: true,
|
||||||
|
property: padding-left,
|
||||||
|
class: ps,
|
||||||
|
values: $spacers
|
||||||
|
),
|
||||||
|
// Gap utility
|
||||||
|
"gap": (
|
||||||
|
responsive: true,
|
||||||
|
property: gap,
|
||||||
|
class: gap,
|
||||||
|
values: $spacers
|
||||||
|
),
|
||||||
|
"row-gap": (
|
||||||
|
responsive: true,
|
||||||
|
property: row-gap,
|
||||||
|
class: row-gap,
|
||||||
|
values: $spacers
|
||||||
|
),
|
||||||
|
"column-gap": (
|
||||||
|
responsive: true,
|
||||||
|
property: column-gap,
|
||||||
|
class: column-gap,
|
||||||
|
values: $spacers
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-spacing
|
||||||
|
// Text
|
||||||
|
// scss-docs-start utils-text
|
||||||
|
"font-family": (
|
||||||
|
property: font-family,
|
||||||
|
class: font,
|
||||||
|
values: (monospace: var(--#{$prefix}font-monospace))
|
||||||
|
),
|
||||||
|
"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: (
|
||||||
|
lighter: $font-weight-lighter,
|
||||||
|
light: $font-weight-light,
|
||||||
|
normal: $font-weight-normal,
|
||||||
|
medium: $font-weight-medium,
|
||||||
|
semibold: $font-weight-semibold,
|
||||||
|
bold: $font-weight-bold,
|
||||||
|
bolder: $font-weight-bolder
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"line-height": (
|
||||||
|
property: line-height,
|
||||||
|
class: lh,
|
||||||
|
values: (
|
||||||
|
1: 1,
|
||||||
|
sm: $line-height-sm,
|
||||||
|
base: $line-height-base,
|
||||||
|
lg: $line-height-lg,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"text-align": (
|
||||||
|
responsive: true,
|
||||||
|
property: text-align,
|
||||||
|
class: text,
|
||||||
|
values: (
|
||||||
|
start: left,
|
||||||
|
end: right,
|
||||||
|
center: center,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"text-decoration": (
|
||||||
|
property: text-decoration,
|
||||||
|
values: none underline line-through
|
||||||
|
),
|
||||||
|
"text-transform": (
|
||||||
|
property: text-transform,
|
||||||
|
class: text,
|
||||||
|
values: lowercase uppercase capitalize
|
||||||
|
),
|
||||||
|
"white-space": (
|
||||||
|
property: white-space,
|
||||||
|
class: text,
|
||||||
|
values: (
|
||||||
|
wrap: normal,
|
||||||
|
nowrap: nowrap,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"word-wrap": (
|
||||||
|
property: word-wrap word-break,
|
||||||
|
class: text,
|
||||||
|
values: (break: break-word),
|
||||||
|
rtl: false
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-text
|
||||||
|
// scss-docs-start utils-color
|
||||||
|
"color": (
|
||||||
|
property: color,
|
||||||
|
class: text,
|
||||||
|
local-vars: (
|
||||||
|
"text-opacity": 1
|
||||||
|
),
|
||||||
|
values: map-merge(
|
||||||
|
$utilities-text-colors,
|
||||||
|
(
|
||||||
|
"muted": var(--#{$prefix}secondary-color), // deprecated
|
||||||
|
"black-50": rgba($black, .5), // deprecated
|
||||||
|
"white-50": rgba($white, .5), // deprecated
|
||||||
|
"body-secondary": var(--#{$prefix}secondary-color),
|
||||||
|
"body-tertiary": var(--#{$prefix}tertiary-color),
|
||||||
|
"body-emphasis": var(--#{$prefix}emphasis-color),
|
||||||
|
"reset": inherit,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"text-opacity": (
|
||||||
|
css-var: true,
|
||||||
|
class: text-opacity,
|
||||||
|
values: (
|
||||||
|
25: .25,
|
||||||
|
50: .5,
|
||||||
|
75: .75,
|
||||||
|
100: 1
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"text-color": (
|
||||||
|
property: color,
|
||||||
|
class: text,
|
||||||
|
values: $utilities-text-emphasis-colors
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-color
|
||||||
|
// scss-docs-start utils-links
|
||||||
|
"link-opacity": (
|
||||||
|
css-var: true,
|
||||||
|
class: link-opacity,
|
||||||
|
state: hover,
|
||||||
|
values: (
|
||||||
|
10: .1,
|
||||||
|
25: .25,
|
||||||
|
50: .5,
|
||||||
|
75: .75,
|
||||||
|
100: 1
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"link-offset": (
|
||||||
|
property: text-underline-offset,
|
||||||
|
class: link-offset,
|
||||||
|
state: hover,
|
||||||
|
values: (
|
||||||
|
1: .125em,
|
||||||
|
2: .25em,
|
||||||
|
3: .375em,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"link-underline": (
|
||||||
|
property: text-decoration-color,
|
||||||
|
class: link-underline,
|
||||||
|
local-vars: (
|
||||||
|
"link-underline-opacity": 1
|
||||||
|
),
|
||||||
|
values: map-merge(
|
||||||
|
$utilities-links-underline,
|
||||||
|
(
|
||||||
|
null: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-underline-opacity, 1)),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"link-underline-opacity": (
|
||||||
|
css-var: true,
|
||||||
|
class: link-underline-opacity,
|
||||||
|
state: hover,
|
||||||
|
values: (
|
||||||
|
0: 0,
|
||||||
|
10: .1,
|
||||||
|
25: .25,
|
||||||
|
50: .5,
|
||||||
|
75: .75,
|
||||||
|
100: 1
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-links
|
||||||
|
// scss-docs-start utils-bg-color
|
||||||
|
"background-color": (
|
||||||
|
property: background-color,
|
||||||
|
class: bg,
|
||||||
|
local-vars: (
|
||||||
|
"bg-opacity": 1
|
||||||
|
),
|
||||||
|
values: map-merge(
|
||||||
|
$utilities-bg-colors,
|
||||||
|
(
|
||||||
|
"transparent": transparent,
|
||||||
|
"body-secondary": rgba(var(--#{$prefix}secondary-bg-rgb), var(--#{$prefix}bg-opacity)),
|
||||||
|
"body-tertiary": rgba(var(--#{$prefix}tertiary-bg-rgb), var(--#{$prefix}bg-opacity)),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"bg-opacity": (
|
||||||
|
css-var: true,
|
||||||
|
class: bg-opacity,
|
||||||
|
values: (
|
||||||
|
10: .1,
|
||||||
|
25: .25,
|
||||||
|
50: .5,
|
||||||
|
75: .75,
|
||||||
|
100: 1
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"subtle-background-color": (
|
||||||
|
property: background-color,
|
||||||
|
class: bg,
|
||||||
|
values: $utilities-bg-subtle
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-bg-color
|
||||||
|
"gradient": (
|
||||||
|
property: background-image,
|
||||||
|
class: bg,
|
||||||
|
values: (gradient: var(--#{$prefix}gradient))
|
||||||
|
),
|
||||||
|
// scss-docs-start utils-interaction
|
||||||
|
"user-select": (
|
||||||
|
property: user-select,
|
||||||
|
values: all auto none
|
||||||
|
),
|
||||||
|
"pointer-events": (
|
||||||
|
property: pointer-events,
|
||||||
|
class: pe,
|
||||||
|
values: none auto,
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-interaction
|
||||||
|
// scss-docs-start utils-border-radius
|
||||||
|
"rounded": (
|
||||||
|
property: border-radius,
|
||||||
|
class: rounded,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}border-radius),
|
||||||
|
0: 0,
|
||||||
|
1: var(--#{$prefix}border-radius-sm),
|
||||||
|
2: var(--#{$prefix}border-radius),
|
||||||
|
3: var(--#{$prefix}border-radius-lg),
|
||||||
|
4: var(--#{$prefix}border-radius-xl),
|
||||||
|
5: var(--#{$prefix}border-radius-xxl),
|
||||||
|
circle: 50%,
|
||||||
|
pill: var(--#{$prefix}border-radius-pill)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"rounded-top": (
|
||||||
|
property: border-top-left-radius border-top-right-radius,
|
||||||
|
class: rounded-top,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}border-radius),
|
||||||
|
0: 0,
|
||||||
|
1: var(--#{$prefix}border-radius-sm),
|
||||||
|
2: var(--#{$prefix}border-radius),
|
||||||
|
3: var(--#{$prefix}border-radius-lg),
|
||||||
|
4: var(--#{$prefix}border-radius-xl),
|
||||||
|
5: var(--#{$prefix}border-radius-xxl),
|
||||||
|
circle: 50%,
|
||||||
|
pill: var(--#{$prefix}border-radius-pill)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"rounded-end": (
|
||||||
|
property: border-top-right-radius border-bottom-right-radius,
|
||||||
|
class: rounded-end,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}border-radius),
|
||||||
|
0: 0,
|
||||||
|
1: var(--#{$prefix}border-radius-sm),
|
||||||
|
2: var(--#{$prefix}border-radius),
|
||||||
|
3: var(--#{$prefix}border-radius-lg),
|
||||||
|
4: var(--#{$prefix}border-radius-xl),
|
||||||
|
5: var(--#{$prefix}border-radius-xxl),
|
||||||
|
circle: 50%,
|
||||||
|
pill: var(--#{$prefix}border-radius-pill)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"rounded-bottom": (
|
||||||
|
property: border-bottom-right-radius border-bottom-left-radius,
|
||||||
|
class: rounded-bottom,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}border-radius),
|
||||||
|
0: 0,
|
||||||
|
1: var(--#{$prefix}border-radius-sm),
|
||||||
|
2: var(--#{$prefix}border-radius),
|
||||||
|
3: var(--#{$prefix}border-radius-lg),
|
||||||
|
4: var(--#{$prefix}border-radius-xl),
|
||||||
|
5: var(--#{$prefix}border-radius-xxl),
|
||||||
|
circle: 50%,
|
||||||
|
pill: var(--#{$prefix}border-radius-pill)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"rounded-start": (
|
||||||
|
property: border-bottom-left-radius border-top-left-radius,
|
||||||
|
class: rounded-start,
|
||||||
|
values: (
|
||||||
|
null: var(--#{$prefix}border-radius),
|
||||||
|
0: 0,
|
||||||
|
1: var(--#{$prefix}border-radius-sm),
|
||||||
|
2: var(--#{$prefix}border-radius),
|
||||||
|
3: var(--#{$prefix}border-radius-lg),
|
||||||
|
4: var(--#{$prefix}border-radius-xl),
|
||||||
|
5: var(--#{$prefix}border-radius-xxl),
|
||||||
|
circle: 50%,
|
||||||
|
pill: var(--#{$prefix}border-radius-pill)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-border-radius
|
||||||
|
// scss-docs-start utils-visibility
|
||||||
|
"visibility": (
|
||||||
|
property: visibility,
|
||||||
|
class: null,
|
||||||
|
values: (
|
||||||
|
visible: visible,
|
||||||
|
invisible: hidden,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
// scss-docs-end utils-visibility
|
||||||
|
// scss-docs-start utils-zindex
|
||||||
|
"z-index": (
|
||||||
|
property: z-index,
|
||||||
|
class: z,
|
||||||
|
values: $zindex-levels,
|
||||||
|
)
|
||||||
|
// scss-docs-end utils-zindex
|
||||||
|
),
|
||||||
|
$utilities
|
||||||
|
);
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
// Dark color mode variables
|
||||||
|
//
|
||||||
|
// Custom variables for the `[data-bs-theme="dark"]` theme. Use this as a starting point for your own custom color modes by creating a new theme-specific file like `_variables-dark.scss` and adding the variables you need.
|
||||||
|
|
||||||
|
//
|
||||||
|
// Global colors
|
||||||
|
//
|
||||||
|
|
||||||
|
// scss-docs-start sass-dark-mode-vars
|
||||||
|
// scss-docs-start theme-text-dark-variables
|
||||||
|
$primary-text-emphasis-dark: tint-color($primary, 40%) !default;
|
||||||
|
$secondary-text-emphasis-dark: tint-color($secondary, 40%) !default;
|
||||||
|
$success-text-emphasis-dark: tint-color($success, 40%) !default;
|
||||||
|
$info-text-emphasis-dark: tint-color($info, 40%) !default;
|
||||||
|
$warning-text-emphasis-dark: tint-color($warning, 40%) !default;
|
||||||
|
$danger-text-emphasis-dark: tint-color($danger, 40%) !default;
|
||||||
|
$light-text-emphasis-dark: $gray-100 !default;
|
||||||
|
$dark-text-emphasis-dark: $gray-300 !default;
|
||||||
|
// scss-docs-end theme-text-dark-variables
|
||||||
|
|
||||||
|
// scss-docs-start theme-bg-subtle-dark-variables
|
||||||
|
$primary-bg-subtle-dark: shade-color($primary, 80%) !default;
|
||||||
|
$secondary-bg-subtle-dark: shade-color($secondary, 80%) !default;
|
||||||
|
$success-bg-subtle-dark: shade-color($success, 80%) !default;
|
||||||
|
$info-bg-subtle-dark: shade-color($info, 80%) !default;
|
||||||
|
$warning-bg-subtle-dark: shade-color($warning, 80%) !default;
|
||||||
|
$danger-bg-subtle-dark: shade-color($danger, 80%) !default;
|
||||||
|
$light-bg-subtle-dark: $gray-800 !default;
|
||||||
|
$dark-bg-subtle-dark: mix($gray-800, $black) !default;
|
||||||
|
// scss-docs-end theme-bg-subtle-dark-variables
|
||||||
|
|
||||||
|
// scss-docs-start theme-border-subtle-dark-variables
|
||||||
|
$primary-border-subtle-dark: shade-color($primary, 40%) !default;
|
||||||
|
$secondary-border-subtle-dark: shade-color($secondary, 40%) !default;
|
||||||
|
$success-border-subtle-dark: shade-color($success, 40%) !default;
|
||||||
|
$info-border-subtle-dark: shade-color($info, 40%) !default;
|
||||||
|
$warning-border-subtle-dark: shade-color($warning, 40%) !default;
|
||||||
|
$danger-border-subtle-dark: shade-color($danger, 40%) !default;
|
||||||
|
$light-border-subtle-dark: $gray-700 !default;
|
||||||
|
$dark-border-subtle-dark: $gray-800 !default;
|
||||||
|
// scss-docs-end theme-border-subtle-dark-variables
|
||||||
|
|
||||||
|
$body-color-dark: $gray-300 !default;
|
||||||
|
$body-bg-dark: $gray-900 !default;
|
||||||
|
$body-secondary-color-dark: rgba($body-color-dark, .75) !default;
|
||||||
|
$body-secondary-bg-dark: $gray-800 !default;
|
||||||
|
$body-tertiary-color-dark: rgba($body-color-dark, .5) !default;
|
||||||
|
$body-tertiary-bg-dark: mix($gray-800, $gray-900, 50%) !default;
|
||||||
|
$body-emphasis-color-dark: $white !default;
|
||||||
|
$border-color-dark: $gray-700 !default;
|
||||||
|
$border-color-translucent-dark: rgba($white, .15) !default;
|
||||||
|
$headings-color-dark: inherit !default;
|
||||||
|
$link-color-dark: tint-color($primary, 40%) !default;
|
||||||
|
$link-hover-color-dark: shift-color($link-color-dark, -$link-shade-percentage) !default;
|
||||||
|
$code-color-dark: tint-color($code-color, 40%) !default;
|
||||||
|
$mark-color-dark: $body-color-dark !default;
|
||||||
|
$mark-bg-dark: $yellow-800 !default;
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Forms
|
||||||
|
//
|
||||||
|
|
||||||
|
$form-select-indicator-color-dark: $body-color-dark !default;
|
||||||
|
$form-select-indicator-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='#{$form-select-indicator-color-dark}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/></svg>") !default;
|
||||||
|
|
||||||
|
$form-switch-color-dark: rgba($white, .25) !default;
|
||||||
|
$form-switch-bg-image-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-color-dark}'/></svg>") !default;
|
||||||
|
|
||||||
|
// scss-docs-start form-validation-colors-dark
|
||||||
|
$form-valid-color-dark: $green-300 !default;
|
||||||
|
$form-valid-border-color-dark: $green-300 !default;
|
||||||
|
$form-invalid-color-dark: $red-300 !default;
|
||||||
|
$form-invalid-border-color-dark: $red-300 !default;
|
||||||
|
// scss-docs-end form-validation-colors-dark
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Accordion
|
||||||
|
//
|
||||||
|
|
||||||
|
$accordion-icon-color-dark: $primary-text-emphasis-dark !default;
|
||||||
|
$accordion-icon-active-color-dark: $primary-text-emphasis-dark !default;
|
||||||
|
|
||||||
|
$accordion-button-icon-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-color-dark}'><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-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-active-color-dark}'><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;
|
||||||
|
// scss-docs-end sass-dark-mode-vars
|
File diff suppressed because it is too large
Load Diff
|
@ -1,30 +1,62 @@
|
||||||
/*!
|
@import "mixins/banner";
|
||||||
* Bootstrap Grid v4.6.0 (https://getbootstrap.com/)
|
@include bsBanner(Grid);
|
||||||
* Copyright 2011-2021 The Bootstrap Authors
|
|
||||||
* Copyright 2011-2021 Twitter, Inc.
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
*/
|
|
||||||
|
|
||||||
html {
|
$include-column-box-sizing: true !default;
|
||||||
box-sizing: border-box;
|
|
||||||
-ms-overflow-style: scrollbar;
|
|
||||||
}
|
|
||||||
|
|
||||||
*,
|
|
||||||
*::before,
|
|
||||||
*::after {
|
|
||||||
box-sizing: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
@import "functions";
|
@import "functions";
|
||||||
@import "variables";
|
@import "variables";
|
||||||
|
@import "variables-dark";
|
||||||
|
@import "maps";
|
||||||
|
|
||||||
@import "mixins/deprecate";
|
|
||||||
@import "mixins/breakpoints";
|
@import "mixins/breakpoints";
|
||||||
@import "mixins/grid-framework";
|
@import "mixins/container";
|
||||||
@import "mixins/grid";
|
@import "mixins/grid";
|
||||||
|
@import "mixins/utilities";
|
||||||
|
|
||||||
|
@import "vendor/rfs";
|
||||||
|
|
||||||
|
@import "containers";
|
||||||
@import "grid";
|
@import "grid";
|
||||||
@import "utilities/display";
|
|
||||||
@import "utilities/flex";
|
@import "utilities";
|
||||||
@import "utilities/spacing";
|
// Only use the utilities we need
|
||||||
|
// stylelint-disable-next-line scss/dollar-variable-default
|
||||||
|
$utilities: map-get-multiple(
|
||||||
|
$utilities,
|
||||||
|
(
|
||||||
|
"display",
|
||||||
|
"order",
|
||||||
|
"flex",
|
||||||
|
"flex-direction",
|
||||||
|
"flex-grow",
|
||||||
|
"flex-shrink",
|
||||||
|
"flex-wrap",
|
||||||
|
"justify-content",
|
||||||
|
"align-items",
|
||||||
|
"align-content",
|
||||||
|
"align-self",
|
||||||
|
"margin",
|
||||||
|
"margin-x",
|
||||||
|
"margin-y",
|
||||||
|
"margin-top",
|
||||||
|
"margin-end",
|
||||||
|
"margin-bottom",
|
||||||
|
"margin-start",
|
||||||
|
"negative-margin",
|
||||||
|
"negative-margin-x",
|
||||||
|
"negative-margin-y",
|
||||||
|
"negative-margin-top",
|
||||||
|
"negative-margin-end",
|
||||||
|
"negative-margin-bottom",
|
||||||
|
"negative-margin-start",
|
||||||
|
"padding",
|
||||||
|
"padding-x",
|
||||||
|
"padding-y",
|
||||||
|
"padding-top",
|
||||||
|
"padding-end",
|
||||||
|
"padding-bottom",
|
||||||
|
"padding-start",
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
@import "utilities/api";
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
/*!
|
@import "mixins/banner";
|
||||||
* Bootstrap Reboot v4.6.0 (https://getbootstrap.com/)
|
@include bsBanner(Reboot);
|
||||||
* Copyright 2011-2021 The Bootstrap Authors
|
|
||||||
* Copyright 2011-2021 Twitter, Inc.
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
|
||||||
*/
|
|
||||||
|
|
||||||
@import "functions";
|
@import "functions";
|
||||||
@import "variables";
|
@import "variables";
|
||||||
|
@import "variables-dark";
|
||||||
|
@import "maps";
|
||||||
@import "mixins";
|
@import "mixins";
|
||||||
|
@import "root";
|
||||||
@import "reboot";
|
@import "reboot";
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
@import "mixins/banner";
|
||||||
|
@include bsBanner(Utilities);
|
||||||
|
|
||||||
|
// Configuration
|
||||||
|
@import "functions";
|
||||||
|
@import "variables";
|
||||||
|
@import "variables-dark";
|
||||||
|
@import "maps";
|
||||||
|
@import "mixins";
|
||||||
|
@import "utilities";
|
||||||
|
|
||||||
|
// Layout & components
|
||||||
|
@import "root";
|
||||||
|
|
||||||
|
// Helpers
|
||||||
|
@import "helpers";
|
||||||
|
|
||||||
|
// Utilities
|
||||||
|
@import "utilities/api";
|
|
@ -1,18 +1,22 @@
|
||||||
/*!
|
@import "mixins/banner";
|
||||||
* Bootstrap v4.6.0 (https://getbootstrap.com/)
|
@include bsBanner("");
|
||||||
* Copyright 2011-2021 The Bootstrap Authors
|
|
||||||
* Copyright 2011-2021 Twitter, Inc.
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
// scss-docs-start import-stack
|
||||||
|
// Configuration
|
||||||
@import "functions";
|
@import "functions";
|
||||||
@import "variables";
|
@import "variables";
|
||||||
|
@import "variables-dark";
|
||||||
|
@import "maps";
|
||||||
@import "mixins";
|
@import "mixins";
|
||||||
|
@import "utilities";
|
||||||
|
|
||||||
|
// Layout & components
|
||||||
@import "root";
|
@import "root";
|
||||||
@import "reboot";
|
@import "reboot";
|
||||||
@import "type";
|
@import "type";
|
||||||
@import "images";
|
@import "images";
|
||||||
@import "code";
|
@import "containers";
|
||||||
@import "grid";
|
@import "grid";
|
||||||
@import "tables";
|
@import "tables";
|
||||||
@import "forms";
|
@import "forms";
|
||||||
|
@ -20,18 +24,15 @@
|
||||||
@import "transitions";
|
@import "transitions";
|
||||||
@import "dropdown";
|
@import "dropdown";
|
||||||
@import "button-group";
|
@import "button-group";
|
||||||
@import "input-group";
|
|
||||||
@import "custom-forms";
|
|
||||||
@import "nav";
|
@import "nav";
|
||||||
@import "navbar";
|
@import "navbar";
|
||||||
@import "card";
|
@import "card";
|
||||||
|
@import "accordion";
|
||||||
@import "breadcrumb";
|
@import "breadcrumb";
|
||||||
@import "pagination";
|
@import "pagination";
|
||||||
@import "badge";
|
@import "badge";
|
||||||
@import "jumbotron";
|
|
||||||
@import "alert";
|
@import "alert";
|
||||||
@import "progress";
|
@import "progress";
|
||||||
@import "media";
|
|
||||||
@import "list-group";
|
@import "list-group";
|
||||||
@import "close";
|
@import "close";
|
||||||
@import "toasts";
|
@import "toasts";
|
||||||
|
@ -40,5 +41,12 @@
|
||||||
@import "popover";
|
@import "popover";
|
||||||
@import "carousel";
|
@import "carousel";
|
||||||
@import "spinners";
|
@import "spinners";
|
||||||
@import "utilities";
|
@import "offcanvas";
|
||||||
@import "print";
|
@import "placeholders";
|
||||||
|
|
||||||
|
// Helpers
|
||||||
|
@import "helpers";
|
||||||
|
|
||||||
|
// Utilities
|
||||||
|
@import "utilities/api";
|
||||||
|
// scss-docs-end import-stack
|
||||||
|
|
|
@ -0,0 +1,95 @@
|
||||||
|
.form-floating {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
> .form-control,
|
||||||
|
> .form-control-plaintext,
|
||||||
|
> .form-select {
|
||||||
|
height: $form-floating-height;
|
||||||
|
min-height: $form-floating-height;
|
||||||
|
line-height: $form-floating-line-height;
|
||||||
|
}
|
||||||
|
|
||||||
|
> label {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 2;
|
||||||
|
height: 100%; // allow textareas
|
||||||
|
padding: $form-floating-padding-y $form-floating-padding-x;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: start;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
> .form-control,
|
||||||
|
> .form-control-plaintext {
|
||||||
|
padding: $form-floating-padding-y $form-floating-padding-x;
|
||||||
|
|
||||||
|
&::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-control-plaintext,
|
||||||
|
> .form-select {
|
||||||
|
~ label {
|
||||||
|
color: rgba(var(--#{$prefix}body-color-rgb), #{$form-floating-label-opacity});
|
||||||
|
transform: $form-floating-label-transform;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
inset: $form-floating-padding-y ($form-floating-padding-x * .5);
|
||||||
|
z-index: -1;
|
||||||
|
height: $form-floating-label-height;
|
||||||
|
content: "";
|
||||||
|
background-color: $input-bg;
|
||||||
|
@include border-radius($input-border-radius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
|
||||||
|
> .form-control:-webkit-autofill {
|
||||||
|
~ label {
|
||||||
|
color: rgba(var(--#{$prefix}body-color-rgb), #{$form-floating-label-opacity});
|
||||||
|
transform: $form-floating-label-transform;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .form-control-plaintext {
|
||||||
|
~ label {
|
||||||
|
border-width: $input-border-width 0; // Required to properly position label text - as explained above
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> :disabled ~ label,
|
||||||
|
> .form-control:disabled ~ label { // Required for `.form-control`s because of specificity
|
||||||
|
color: $form-floating-label-disabled-color;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
background-color: $input-disabled-bg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,189 @@
|
||||||
|
//
|
||||||
|
// Check/radio
|
||||||
|
//
|
||||||
|
|
||||||
|
.form-check {
|
||||||
|
display: block;
|
||||||
|
min-height: $form-check-min-height;
|
||||||
|
padding-left: $form-check-padding-start;
|
||||||
|
margin-bottom: $form-check-margin-bottom;
|
||||||
|
|
||||||
|
.form-check-input {
|
||||||
|
float: left;
|
||||||
|
margin-left: $form-check-padding-start * -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-check-reverse {
|
||||||
|
padding-right: $form-check-padding-start;
|
||||||
|
padding-left: 0;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
.form-check-input {
|
||||||
|
float: right;
|
||||||
|
margin-right: $form-check-padding-start * -1;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-check-input {
|
||||||
|
--#{$prefix}form-check-bg: #{$form-check-input-bg};
|
||||||
|
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: $form-check-input-width;
|
||||||
|
height: $form-check-input-width;
|
||||||
|
margin-top: ($line-height-base - $form-check-input-width) * .5; // line-height minus check height
|
||||||
|
vertical-align: top;
|
||||||
|
appearance: none;
|
||||||
|
background-color: var(--#{$prefix}form-check-bg);
|
||||||
|
background-image: var(--#{$prefix}form-check-bg-image);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: contain;
|
||||||
|
border: $form-check-input-border;
|
||||||
|
print-color-adjust: exact; // Keep themed appearance for print
|
||||||
|
@include transition($form-check-transition);
|
||||||
|
|
||||||
|
&[type="checkbox"] {
|
||||||
|
@include border-radius($form-check-input-border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
&[type="radio"] {
|
||||||
|
// stylelint-disable-next-line property-disallowed-list
|
||||||
|
border-radius: $form-check-radio-border-radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
filter: $form-check-input-active-filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-color: $form-check-input-focus-border;
|
||||||
|
outline: 0;
|
||||||
|
box-shadow: $form-check-input-focus-box-shadow;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:checked {
|
||||||
|
background-color: $form-check-input-checked-bg-color;
|
||||||
|
border-color: $form-check-input-checked-border-color;
|
||||||
|
|
||||||
|
&[type="checkbox"] {
|
||||||
|
@if $enable-gradients {
|
||||||
|
--#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-checked-bg-image)}, var(--#{$prefix}gradient);
|
||||||
|
} @else {
|
||||||
|
--#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-checked-bg-image)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[type="radio"] {
|
||||||
|
@if $enable-gradients {
|
||||||
|
--#{$prefix}form-check-bg-image: #{escape-svg($form-check-radio-checked-bg-image)}, var(--#{$prefix}gradient);
|
||||||
|
} @else {
|
||||||
|
--#{$prefix}form-check-bg-image: #{escape-svg($form-check-radio-checked-bg-image)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[type="checkbox"]:indeterminate {
|
||||||
|
background-color: $form-check-input-indeterminate-bg-color;
|
||||||
|
border-color: $form-check-input-indeterminate-border-color;
|
||||||
|
|
||||||
|
@if $enable-gradients {
|
||||||
|
--#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-indeterminate-bg-image)}, var(--#{$prefix}gradient);
|
||||||
|
} @else {
|
||||||
|
--#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-indeterminate-bg-image)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
filter: none;
|
||||||
|
opacity: $form-check-input-disabled-opacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use disabled attribute in addition of :disabled pseudo-class
|
||||||
|
// See: https://github.com/twbs/bootstrap/issues/28247
|
||||||
|
&[disabled],
|
||||||
|
&:disabled {
|
||||||
|
~ .form-check-label {
|
||||||
|
cursor: default;
|
||||||
|
opacity: $form-check-label-disabled-opacity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-check-label {
|
||||||
|
color: $form-check-label-color;
|
||||||
|
cursor: $form-check-label-cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Switch
|
||||||
|
//
|
||||||
|
|
||||||
|
.form-switch {
|
||||||
|
padding-left: $form-switch-padding-start;
|
||||||
|
|
||||||
|
.form-check-input {
|
||||||
|
--#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image)};
|
||||||
|
|
||||||
|
width: $form-switch-width;
|
||||||
|
margin-left: $form-switch-padding-start * -1;
|
||||||
|
background-image: var(--#{$prefix}form-switch-bg);
|
||||||
|
background-position: left center;
|
||||||
|
@include border-radius($form-switch-border-radius);
|
||||||
|
@include transition($form-switch-transition);
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
--#{$prefix}form-switch-bg: #{escape-svg($form-switch-focus-bg-image)};
|
||||||
|
}
|
||||||
|
|
||||||
|
&:checked {
|
||||||
|
background-position: $form-switch-checked-bg-position;
|
||||||
|
|
||||||
|
@if $enable-gradients {
|
||||||
|
--#{$prefix}form-switch-bg: #{escape-svg($form-switch-checked-bg-image)}, var(--#{$prefix}gradient);
|
||||||
|
} @else {
|
||||||
|
--#{$prefix}form-switch-bg: #{escape-svg($form-switch-checked-bg-image)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.form-check-reverse {
|
||||||
|
padding-right: $form-switch-padding-start;
|
||||||
|
padding-left: 0;
|
||||||
|
|
||||||
|
.form-check-input {
|
||||||
|
margin-right: $form-switch-padding-start * -1;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-check-inline {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: $form-check-inline-margin-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-check {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $enable-dark-mode {
|
||||||
|
@include color-mode(dark) {
|
||||||
|
.form-switch .form-check-input:not(:checked):not(:focus) {
|
||||||
|
--#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image-dark)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,214 @@
|
||||||
|
//
|
||||||
|
// General form controls (plus a few specific high-level interventions)
|
||||||
|
//
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: $input-padding-y $input-padding-x;
|
||||||
|
font-family: $input-font-family;
|
||||||
|
@include font-size($input-font-size);
|
||||||
|
font-weight: $input-font-weight;
|
||||||
|
line-height: $input-line-height;
|
||||||
|
color: $input-color;
|
||||||
|
appearance: none; // Fix appearance for date inputs in Safari
|
||||||
|
background-color: $input-bg;
|
||||||
|
background-clip: padding-box;
|
||||||
|
border: $input-border-width solid $input-border-color;
|
||||||
|
|
||||||
|
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
||||||
|
@include border-radius($input-border-radius, 0);
|
||||||
|
|
||||||
|
@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;
|
||||||
|
background-color: $input-focus-bg;
|
||||||
|
border-color: $input-focus-border-color;
|
||||||
|
outline: 0;
|
||||||
|
@if $enable-shadows {
|
||||||
|
@include box-shadow($input-box-shadow, $input-focus-box-shadow);
|
||||||
|
} @else {
|
||||||
|
// Avoid using mixin so we can pass custom focus shadow properly
|
||||||
|
box-shadow: $input-focus-box-shadow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-date-and-time-value {
|
||||||
|
// On Android Chrome, form-control's "width: 100%" makes the input width too small
|
||||||
|
// Tested under Android 11 / Chrome 89, Android 12 / Chrome 100, Android 13 / Chrome 109
|
||||||
|
//
|
||||||
|
// On iOS Safari, form-control's "appearance: none" + "width: 100%" makes the input width too small
|
||||||
|
// Tested under iOS 16.2 / Safari 16.2
|
||||||
|
min-width: 85px; // Seems to be a good minimum safe width
|
||||||
|
|
||||||
|
// 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
|
||||||
|
// Multiply line-height by 1em if it has no unit
|
||||||
|
height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
|
||||||
|
|
||||||
|
// Android Chrome type="date" is taller than the other inputs
|
||||||
|
// because of "margin: 1px 24px 1px 4px" inside the shadow DOM
|
||||||
|
// Tested under Android 11 / Chrome 89, Android 12 / Chrome 100, Android 13 / Chrome 109
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prevent excessive date input height in Webkit
|
||||||
|
// https://github.com/twbs/bootstrap/issues/34433
|
||||||
|
&::-webkit-datetime-edit {
|
||||||
|
display: block;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Placeholder
|
||||||
|
&::placeholder {
|
||||||
|
color: $input-placeholder-color;
|
||||||
|
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Disabled inputs
|
||||||
|
//
|
||||||
|
// HTML5 says that controls under a fieldset > legend:first-child won't be
|
||||||
|
// disabled if the fieldset is disabled. Due to implementation difficulty, we
|
||||||
|
// don't honor that edge case; we style them as disabled anyway.
|
||||||
|
&:disabled {
|
||||||
|
color: $input-disabled-color;
|
||||||
|
background-color: $input-disabled-bg;
|
||||||
|
border-color: $input-disabled-border-color;
|
||||||
|
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// File input buttons theming
|
||||||
|
&::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);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover:not(:disabled):not([readonly])::file-selector-button {
|
||||||
|
background-color: $form-file-button-hover-bg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Readonly controls as plain text
|
||||||
|
//
|
||||||
|
// Apply class to a readonly input to make it appear like regular plain
|
||||||
|
// text (without any border, background color, focus indicator)
|
||||||
|
|
||||||
|
.form-control-plaintext {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: $input-padding-y 0;
|
||||||
|
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;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.form-control-sm,
|
||||||
|
&.form-control-lg {
|
||||||
|
padding-right: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Form control sizing
|
||||||
|
//
|
||||||
|
// Build on `.form-control` with modifier classes to decrease or increase the
|
||||||
|
// height and font-size of form controls.
|
||||||
|
//
|
||||||
|
// Repeated in `_input_group.scss` to avoid Sass extend issues.
|
||||||
|
|
||||||
|
.form-control-sm {
|
||||||
|
min-height: $input-height-sm;
|
||||||
|
padding: $input-padding-y-sm $input-padding-x-sm;
|
||||||
|
@include font-size($input-font-size-sm);
|
||||||
|
@include border-radius($input-border-radius-sm);
|
||||||
|
|
||||||
|
&::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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control-lg {
|
||||||
|
min-height: $input-height-lg;
|
||||||
|
padding: $input-padding-y-lg $input-padding-x-lg;
|
||||||
|
@include font-size($input-font-size-lg);
|
||||||
|
@include border-radius($input-border-radius-lg);
|
||||||
|
|
||||||
|
&::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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 {
|
||||||
|
width: $form-color-width;
|
||||||
|
height: $input-height;
|
||||||
|
padding: $input-padding-y;
|
||||||
|
|
||||||
|
&:not(:disabled):not([readonly]) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-moz-color-swatch {
|
||||||
|
border: 0 !important; // stylelint-disable-line declaration-no-important
|
||||||
|
@include border-radius($input-border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-color-swatch {
|
||||||
|
border: 0 !important; // stylelint-disable-line declaration-no-important
|
||||||
|
@include border-radius($input-border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.form-control-sm { height: $input-height-sm; }
|
||||||
|
&.form-control-lg { height: $input-height-lg; }
|
||||||
|
}
|
|
@ -0,0 +1,91 @@
|
||||||
|
// Range
|
||||||
|
//
|
||||||
|
// Style range inputs the same across browsers. Vendor-specific rules for pseudo
|
||||||
|
// elements cannot be mixed. As such, there are no shared styles for focus or
|
||||||
|
// active states on prefixed selectors.
|
||||||
|
|
||||||
|
.form-range {
|
||||||
|
width: 100%;
|
||||||
|
height: add($form-range-thumb-height, $form-range-thumb-focus-box-shadow-width * 2);
|
||||||
|
padding: 0; // Need to reset padding
|
||||||
|
appearance: none;
|
||||||
|
background-color: transparent;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: 0;
|
||||||
|
|
||||||
|
// Pseudo-elements must be split across multiple rulesets to have an effect.
|
||||||
|
// 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; }
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-moz-focus-outer {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-slider-thumb {
|
||||||
|
width: $form-range-thumb-width;
|
||||||
|
height: $form-range-thumb-height;
|
||||||
|
margin-top: ($form-range-track-height - $form-range-thumb-height) * .5; // Webkit specific
|
||||||
|
appearance: none;
|
||||||
|
@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);
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
@include gradient-bg($form-range-thumb-active-bg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-slider-runnable-track {
|
||||||
|
width: $form-range-track-width;
|
||||||
|
height: $form-range-track-height;
|
||||||
|
color: transparent; // Why?
|
||||||
|
cursor: $form-range-track-cursor;
|
||||||
|
background-color: $form-range-track-bg;
|
||||||
|
border-color: transparent;
|
||||||
|
@include border-radius($form-range-track-border-radius);
|
||||||
|
@include box-shadow($form-range-track-box-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-moz-range-thumb {
|
||||||
|
width: $form-range-thumb-width;
|
||||||
|
height: $form-range-thumb-height;
|
||||||
|
appearance: none;
|
||||||
|
@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);
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
@include gradient-bg($form-range-thumb-active-bg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-moz-range-track {
|
||||||
|
width: $form-range-track-width;
|
||||||
|
height: $form-range-track-height;
|
||||||
|
color: transparent;
|
||||||
|
cursor: $form-range-track-cursor;
|
||||||
|
background-color: $form-range-track-bg;
|
||||||
|
border-color: transparent; // Firefox specific?
|
||||||
|
@include border-radius($form-range-track-border-radius);
|
||||||
|
@include box-shadow($form-range-track-box-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
|
&::-webkit-slider-thumb {
|
||||||
|
background-color: $form-range-thumb-disabled-bg;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-moz-range-thumb {
|
||||||
|
background-color: $form-range-thumb-disabled-bg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
// Select
|
||||||
|
//
|
||||||
|
// Replaces the browser default select with a custom one, mostly pulled from
|
||||||
|
// https://primer.github.io/.
|
||||||
|
|
||||||
|
.form-select {
|
||||||
|
--#{$prefix}form-select-bg-img: #{escape-svg($form-select-indicator)};
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: $form-select-padding-y $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);
|
||||||
|
font-weight: $form-select-font-weight;
|
||||||
|
line-height: $form-select-line-height;
|
||||||
|
color: $form-select-color;
|
||||||
|
appearance: none;
|
||||||
|
background-color: $form-select-bg;
|
||||||
|
background-image: var(--#{$prefix}form-select-bg-img), var(--#{$prefix}form-select-bg-icon, none);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: $form-select-bg-position;
|
||||||
|
background-size: $form-select-bg-size;
|
||||||
|
border: $form-select-border-width solid $form-select-border-color;
|
||||||
|
@include border-radius($form-select-border-radius, 0);
|
||||||
|
@include box-shadow($form-select-box-shadow);
|
||||||
|
@include transition($form-select-transition);
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-color: $form-select-focus-border-color;
|
||||||
|
outline: 0;
|
||||||
|
@if $enable-shadows {
|
||||||
|
@include box-shadow($form-select-box-shadow, $form-select-focus-box-shadow);
|
||||||
|
} @else {
|
||||||
|
// Avoid using mixin so we can pass custom focus shadow properly
|
||||||
|
box-shadow: $form-select-focus-box-shadow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[multiple],
|
||||||
|
&[size]:not([size="1"]) {
|
||||||
|
padding-right: $form-select-padding-x;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
color: $form-select-disabled-color;
|
||||||
|
background-color: $form-select-disabled-bg;
|
||||||
|
border-color: $form-select-disabled-border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove outline from select box in FF
|
||||||
|
&:-moz-focusring {
|
||||||
|
color: transparent;
|
||||||
|
text-shadow: 0 0 0 $form-select-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select-sm {
|
||||||
|
padding-top: $form-select-padding-y-sm;
|
||||||
|
padding-bottom: $form-select-padding-y-sm;
|
||||||
|
padding-left: $form-select-padding-x-sm;
|
||||||
|
@include font-size($form-select-font-size-sm);
|
||||||
|
@include border-radius($form-select-border-radius-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select-lg {
|
||||||
|
padding-top: $form-select-padding-y-lg;
|
||||||
|
padding-bottom: $form-select-padding-y-lg;
|
||||||
|
padding-left: $form-select-padding-x-lg;
|
||||||
|
@include font-size($form-select-font-size-lg);
|
||||||
|
@include border-radius($form-select-border-radius-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $enable-dark-mode {
|
||||||
|
@include color-mode(dark) {
|
||||||
|
.form-select {
|
||||||
|
--#{$prefix}form-select-bg-img: #{escape-svg($form-select-indicator-dark)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
//
|
||||||
|
// Form text
|
||||||
|
//
|
||||||
|
|
||||||
|
.form-text {
|
||||||
|
margin-top: $form-text-margin-top;
|
||||||
|
@include font-size($form-text-font-size);
|
||||||
|
font-style: $form-text-font-style;
|
||||||
|
font-weight: $form-text-font-weight;
|
||||||
|
color: $form-text-color;
|
||||||
|
}
|
|
@ -0,0 +1,132 @@
|
||||||
|
//
|
||||||
|
// Base styles
|
||||||
|
//
|
||||||
|
|
||||||
|
.input-group {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap; // For form validation feedback
|
||||||
|
align-items: stretch;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
> .form-control,
|
||||||
|
> .form-select,
|
||||||
|
> .form-floating {
|
||||||
|
position: relative; // For focus state's z-index
|
||||||
|
flex: 1 1 auto;
|
||||||
|
width: 1%;
|
||||||
|
min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bring the "active" form control to the top of surrounding elements
|
||||||
|
> .form-control:focus,
|
||||||
|
> .form-select:focus,
|
||||||
|
> .form-floating:focus-within {
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
.btn {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Textual addons
|
||||||
|
//
|
||||||
|
// Serves as a catch-all element for any text or radio/checkbox input you wish
|
||||||
|
// to prepend or append to an input.
|
||||||
|
|
||||||
|
.input-group-text {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: $input-group-addon-padding-y $input-group-addon-padding-x;
|
||||||
|
@include font-size($input-font-size); // Match inputs
|
||||||
|
font-weight: $input-group-addon-font-weight;
|
||||||
|
line-height: $input-line-height;
|
||||||
|
color: $input-group-addon-color;
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
background-color: $input-group-addon-bg;
|
||||||
|
border: $input-border-width solid $input-group-addon-border-color;
|
||||||
|
@include border-radius($input-border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Sizing
|
||||||
|
//
|
||||||
|
// Remix the default form control sizing classes into new ones for easier
|
||||||
|
// manipulation.
|
||||||
|
|
||||||
|
.input-group-lg > .form-control,
|
||||||
|
.input-group-lg > .form-select,
|
||||||
|
.input-group-lg > .input-group-text,
|
||||||
|
.input-group-lg > .btn {
|
||||||
|
padding: $input-padding-y-lg $input-padding-x-lg;
|
||||||
|
@include font-size($input-font-size-lg);
|
||||||
|
@include border-radius($input-border-radius-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-sm > .form-control,
|
||||||
|
.input-group-sm > .form-select,
|
||||||
|
.input-group-sm > .input-group-text,
|
||||||
|
.input-group-sm > .btn {
|
||||||
|
padding: $input-padding-y-sm $input-padding-x-sm;
|
||||||
|
@include font-size($input-font-size-sm);
|
||||||
|
@include border-radius($input-border-radius-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-lg > .form-select,
|
||||||
|
.input-group-sm > .form-select {
|
||||||
|
padding-right: $form-select-padding-x + $form-select-indicator-padding;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Rounded corners
|
||||||
|
//
|
||||||
|
// These rulesets must come after the sizing ones to properly override sm and lg
|
||||||
|
// border-radius values when extending. They're more specific than we'd like
|
||||||
|
// with the `.input-group >` part, but without it, we cannot override the sizing.
|
||||||
|
|
||||||
|
// stylelint-disable-next-line no-duplicate-selectors
|
||||||
|
.input-group {
|
||||||
|
&:not(.has-validation) {
|
||||||
|
> :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
|
||||||
|
> .dropdown-toggle:nth-last-child(n + 3),
|
||||||
|
> .form-floating:not(:last-child) > .form-control,
|
||||||
|
> .form-floating:not(:last-child) > .form-select {
|
||||||
|
@include border-end-radius(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.has-validation {
|
||||||
|
> :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
|
||||||
|
> .dropdown-toggle:nth-last-child(n + 4),
|
||||||
|
> .form-floating:nth-last-child(n + 3) > .form-control,
|
||||||
|
> .form-floating:nth-last-child(n + 3) > .form-select {
|
||||||
|
@include border-end-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)#{$validation-messages} {
|
||||||
|
margin-left: calc(#{$input-border-width} * -1); // stylelint-disable-line function-disallowed-list
|
||||||
|
@include border-start-radius(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
> .form-floating:not(:first-child) > .form-control,
|
||||||
|
> .form-floating:not(:first-child) > .form-select {
|
||||||
|
@include border-start-radius(0);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
//
|
||||||
|
// Labels
|
||||||
|
//
|
||||||
|
|
||||||
|
.form-label {
|
||||||
|
margin-bottom: $form-label-margin-bottom;
|
||||||
|
@include font-size($form-label-font-size);
|
||||||
|
font-style: $form-label-font-style;
|
||||||
|
font-weight: $form-label-font-weight;
|
||||||
|
color: $form-label-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// For use with horizontal and inline forms, when you need the label (or legend)
|
||||||
|
// text to align with the form controls.
|
||||||
|
.col-form-label {
|
||||||
|
padding-top: add($input-padding-y, $input-border-width);
|
||||||
|
padding-bottom: add($input-padding-y, $input-border-width);
|
||||||
|
margin-bottom: 0; // Override the `<legend>` default
|
||||||
|
@include font-size(inherit); // Override the `<legend>` default
|
||||||
|
font-style: $form-label-font-style;
|
||||||
|
font-weight: $form-label-font-weight;
|
||||||
|
line-height: $input-line-height;
|
||||||
|
color: $form-label-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-form-label-lg {
|
||||||
|
padding-top: add($input-padding-y-lg, $input-border-width);
|
||||||
|
padding-bottom: add($input-padding-y-lg, $input-border-width);
|
||||||
|
@include font-size($input-font-size-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-form-label-sm {
|
||||||
|
padding-top: add($input-padding-y-sm, $input-border-width);
|
||||||
|
padding-bottom: add($input-padding-y-sm, $input-border-width);
|
||||||
|
@include font-size($input-font-size-sm);
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
// Form validation
|
||||||
|
//
|
||||||
|
// Provide feedback to users when form field values are valid or invalid. Works
|
||||||
|
// primarily for client-side validation via scoped `:invalid` and `:valid`
|
||||||
|
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
||||||
|
// server-side validation.
|
||||||
|
|
||||||
|
// scss-docs-start form-validation-states-loop
|
||||||
|
@each $state, $data in $form-validation-states {
|
||||||
|
@include form-validation-state($state, $data...);
|
||||||
|
}
|
||||||
|
// scss-docs-end form-validation-states-loop
|
|
@ -0,0 +1,7 @@
|
||||||
|
// All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
|
||||||
|
@each $color, $value in $theme-colors {
|
||||||
|
.text-bg-#{$color} {
|
||||||
|
color: color-contrast($value) if($enable-important-utilities, !important, null);
|
||||||
|
background-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
// All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
|
||||||
|
@each $color, $value in $theme-colors {
|
||||||
|
.link-#{$color} {
|
||||||
|
color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
|
||||||
|
text-decoration-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
|
||||||
|
|
||||||
|
@if $link-shade-percentage != 0 {
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
$hover-color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage));
|
||||||
|
color: RGBA(#{to-rgb($hover-color)}, var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
|
||||||
|
text-decoration-color: RGBA(to-rgb($hover-color), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// One-off special link helper as a bridge until v6
|
||||||
|
.link-body-emphasis {
|
||||||
|
color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
|
||||||
|
text-decoration-color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
|
||||||
|
|
||||||
|
@if $link-shade-percentage != 0 {
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, .75)) if($enable-important-utilities, !important, null);
|
||||||
|
text-decoration-color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, .75)) if($enable-important-utilities, !important, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
.focus-ring:focus {
|
||||||
|
outline: 0;
|
||||||
|
// By default, there is no `--bs-focus-ring-x`, `--bs-focus-ring-y`, or `--bs-focus-ring-blur`, but we provide CSS variables with fallbacks to initial `0` values
|
||||||
|
box-shadow: var(--#{$prefix}focus-ring-x, 0) var(--#{$prefix}focus-ring-y, 0) var(--#{$prefix}focus-ring-blur, 0) var(--#{$prefix}focus-ring-width) var(--#{$prefix}focus-ring-color);
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
.icon-link {
|
||||||
|
display: inline-flex;
|
||||||
|
gap: $icon-link-gap;
|
||||||
|
align-items: center;
|
||||||
|
text-decoration-color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, .5));
|
||||||
|
text-underline-offset: $icon-link-underline-offset;
|
||||||
|
backface-visibility: hidden;
|
||||||
|
|
||||||
|
> .bi {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: $icon-link-icon-size;
|
||||||
|
height: $icon-link-icon-size;
|
||||||
|
fill: currentcolor;
|
||||||
|
@include transition($icon-link-icon-transition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-link-hover {
|
||||||
|
&:hover,
|
||||||
|
&:focus-visible {
|
||||||
|
> .bi {
|
||||||
|
transform: var(--#{$prefix}icon-link-transform, $icon-link-icon-transform);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
// Shorthand
|
||||||
|
|
||||||
|
.fixed-top {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: $zindex-fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-bottom {
|
||||||
|
position: fixed;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: $zindex-fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Responsive sticky top and bottom
|
||||||
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||||
|
@include media-breakpoint-up($breakpoint) {
|
||||||
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||||
|
|
||||||
|
.sticky#{$infix}-top {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: $zindex-sticky;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sticky#{$infix}-bottom {
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: $zindex-sticky;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
// Credit: Nicolas Gallagher and SUIT CSS.
|
||||||
|
|
||||||
|
.ratio {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
display: block;
|
||||||
|
padding-top: var(--#{$prefix}aspect-ratio);
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
> * {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $key, $ratio in $aspect-ratios {
|
||||||
|
.ratio-#{$key} {
|
||||||
|
--#{$prefix}aspect-ratio: #{$ratio};
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
// scss-docs-start stacks
|
||||||
|
.hstack {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vstack {
|
||||||
|
display: flex;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
flex-direction: column;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
// scss-docs-end stacks
|
|
@ -0,0 +1,15 @@
|
||||||
|
//
|
||||||
|
// Stretched link
|
||||||
|
//
|
||||||
|
|
||||||
|
.stretched-link {
|
||||||
|
&::#{$stretched-link-pseudo-element} {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: $stretched-link-z-index;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
//
|
||||||
|
// Text truncation
|
||||||
|
//
|
||||||
|
|
||||||
|
.text-truncate {
|
||||||
|
@include text-truncate();
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
//
|
||||||
|
// Visually hidden
|
||||||
|
//
|
||||||
|
|
||||||
|
.visually-hidden,
|
||||||
|
.visually-hidden-focusable:not(:focus):not(:focus-within) {
|
||||||
|
@include visually-hidden();
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
.vr {
|
||||||
|
display: inline-block;
|
||||||
|
align-self: stretch;
|
||||||
|
width: $vr-border-width;
|
||||||
|
min-height: 1em;
|
||||||
|
background-color: currentcolor;
|
||||||
|
opacity: $hr-opacity;
|
||||||
|
}
|
|
@ -1,13 +1,18 @@
|
||||||
@mixin alert-variant($background, $border, $color) {
|
@include deprecate("`alert-variant()`", "v5.3.0", "v6.0.0");
|
||||||
color: $color;
|
|
||||||
@include gradient-bg($background);
|
|
||||||
border-color: $border;
|
|
||||||
|
|
||||||
hr {
|
// scss-docs-start alert-variant-mixin
|
||||||
border-top-color: darken($border, 5%);
|
@mixin alert-variant($background, $border, $color) {
|
||||||
|
--#{$prefix}alert-color: #{$color};
|
||||||
|
--#{$prefix}alert-bg: #{$background};
|
||||||
|
--#{$prefix}alert-border-color: #{$border};
|
||||||
|
--#{$prefix}alert-link-color: #{shade-color($color, 20%)};
|
||||||
|
|
||||||
|
@if $enable-gradients {
|
||||||
|
background-image: var(--#{$prefix}gradient);
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert-link {
|
.alert-link {
|
||||||
color: darken($color, 10%);
|
color: var(--#{$prefix}alert-link-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end alert-variant-mixin
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
// Shared between modals and offcanvases
|
||||||
|
@mixin overlay-backdrop($zindex, $backdrop-bg, $backdrop-opacity) {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: $zindex;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: $backdrop-bg;
|
||||||
|
|
||||||
|
// Fade for backdrop
|
||||||
|
&.fade { opacity: 0; }
|
||||||
|
&.show { opacity: $backdrop-opacity; }
|
||||||
|
}
|
|
@ -1,23 +0,0 @@
|
||||||
// stylelint-disable declaration-no-important
|
|
||||||
|
|
||||||
// Contextual backgrounds
|
|
||||||
|
|
||||||
@mixin bg-variant($parent, $color, $ignore-warning: false) {
|
|
||||||
#{$parent} {
|
|
||||||
background-color: $color !important;
|
|
||||||
}
|
|
||||||
a#{$parent},
|
|
||||||
button#{$parent} {
|
|
||||||
@include hover-focus() {
|
|
||||||
background-color: darken($color, 10%) !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@include deprecate("The `bg-variant` mixin", "v4.4.0", "v5", $ignore-warning);
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin bg-gradient-variant($parent, $color, $ignore-warning: false) {
|
|
||||||
#{$parent} {
|
|
||||||
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
|
|
||||||
}
|
|
||||||
@include deprecate("The `bg-gradient-variant` mixin", "v4.5.0", "v5", $ignore-warning);
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
@mixin badge-variant($bg) {
|
|
||||||
color: color-yiq($bg);
|
|
||||||
background-color: $bg;
|
|
||||||
|
|
||||||
@at-root a#{&} {
|
|
||||||
@include hover-focus() {
|
|
||||||
color: color-yiq($bg);
|
|
||||||
background-color: darken($bg, 10%);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus,
|
|
||||||
&.focus {
|
|
||||||
outline: 0;
|
|
||||||
box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
@mixin bsBanner($file) {
|
||||||
|
/*!
|
||||||
|
* Bootstrap #{$file} v5.3.2 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2023 The Bootstrap Authors
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
*/
|
||||||
|
}
|
|
@ -14,6 +14,7 @@
|
||||||
@return $return;
|
@return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// scss-docs-start border-radius-mixins
|
||||||
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
|
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
|
||||||
@if $enable-rounded {
|
@if $enable-rounded {
|
||||||
border-radius: valid-radius($radius);
|
border-radius: valid-radius($radius);
|
||||||
|
@ -23,54 +24,55 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin border-top-radius($radius) {
|
@mixin border-top-radius($radius: $border-radius) {
|
||||||
@if $enable-rounded {
|
@if $enable-rounded {
|
||||||
border-top-left-radius: valid-radius($radius);
|
border-top-left-radius: valid-radius($radius);
|
||||||
border-top-right-radius: valid-radius($radius);
|
border-top-right-radius: valid-radius($radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin border-right-radius($radius) {
|
@mixin border-end-radius($radius: $border-radius) {
|
||||||
@if $enable-rounded {
|
@if $enable-rounded {
|
||||||
border-top-right-radius: valid-radius($radius);
|
border-top-right-radius: valid-radius($radius);
|
||||||
border-bottom-right-radius: valid-radius($radius);
|
border-bottom-right-radius: valid-radius($radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin border-bottom-radius($radius) {
|
@mixin border-bottom-radius($radius: $border-radius) {
|
||||||
@if $enable-rounded {
|
@if $enable-rounded {
|
||||||
border-bottom-right-radius: valid-radius($radius);
|
border-bottom-right-radius: valid-radius($radius);
|
||||||
border-bottom-left-radius: valid-radius($radius);
|
border-bottom-left-radius: valid-radius($radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin border-left-radius($radius) {
|
@mixin border-start-radius($radius: $border-radius) {
|
||||||
@if $enable-rounded {
|
@if $enable-rounded {
|
||||||
border-top-left-radius: valid-radius($radius);
|
border-top-left-radius: valid-radius($radius);
|
||||||
border-bottom-left-radius: valid-radius($radius);
|
border-bottom-left-radius: valid-radius($radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin border-top-left-radius($radius) {
|
@mixin border-top-start-radius($radius: $border-radius) {
|
||||||
@if $enable-rounded {
|
@if $enable-rounded {
|
||||||
border-top-left-radius: valid-radius($radius);
|
border-top-left-radius: valid-radius($radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin border-top-right-radius($radius) {
|
@mixin border-top-end-radius($radius: $border-radius) {
|
||||||
@if $enable-rounded {
|
@if $enable-rounded {
|
||||||
border-top-right-radius: valid-radius($radius);
|
border-top-right-radius: valid-radius($radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin border-bottom-right-radius($radius) {
|
@mixin border-bottom-end-radius($radius: $border-radius) {
|
||||||
@if $enable-rounded {
|
@if $enable-rounded {
|
||||||
border-bottom-right-radius: valid-radius($radius);
|
border-bottom-right-radius: valid-radius($radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin border-bottom-left-radius($radius) {
|
@mixin border-bottom-start-radius($radius: $border-radius) {
|
||||||
@if $enable-rounded {
|
@if $enable-rounded {
|
||||||
border-bottom-left-radius: valid-radius($radius);
|
border-bottom-left-radius: valid-radius($radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end border-radius-mixins
|
||||||
|
|
|
@ -2,17 +2,15 @@
|
||||||
@if $enable-shadows {
|
@if $enable-shadows {
|
||||||
$result: ();
|
$result: ();
|
||||||
|
|
||||||
@if (length($shadow) == 1) {
|
@each $value in $shadow {
|
||||||
// We can pass `@include box-shadow(none);`
|
@if $value != null {
|
||||||
$result: $shadow;
|
$result: append($result, $value, "comma");
|
||||||
} @else {
|
}
|
||||||
// Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;`
|
@if $value == none and length($shadow) > 1 {
|
||||||
@for $i from 1 through length($shadow) {
|
@warn "The keyword 'none' must be used as a single argument.";
|
||||||
@if nth($shadow, $i) != "none" {
|
|
||||||
$result: append($result, nth($shadow, $i), "comma");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (length($result) > 0) {
|
@if (length($result) > 0) {
|
||||||
box-shadow: $result;
|
box-shadow: $result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
//
|
//
|
||||||
// Breakpoints are defined as a map of (name: minimum width), order from small to large:
|
// Breakpoints are defined as a map of (name: minimum width), order from small to large:
|
||||||
//
|
//
|
||||||
// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)
|
// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px)
|
||||||
//
|
//
|
||||||
// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
|
// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
|
||||||
|
|
||||||
|
@ -10,44 +10,47 @@
|
||||||
//
|
//
|
||||||
// >> breakpoint-next(sm)
|
// >> breakpoint-next(sm)
|
||||||
// md
|
// md
|
||||||
// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
||||||
// md
|
// md
|
||||||
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
|
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl xxl))
|
||||||
// md
|
// md
|
||||||
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
|
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
|
||||||
$n: index($breakpoint-names, $name);
|
$n: index($breakpoint-names, $name);
|
||||||
@return if($n != null and $n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
|
@if not $n {
|
||||||
|
@error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
|
||||||
|
}
|
||||||
|
@return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
||||||
//
|
//
|
||||||
// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
||||||
// 576px
|
// 576px
|
||||||
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
|
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
|
||||||
$min: map-get($breakpoints, $name);
|
$min: map-get($breakpoints, $name);
|
||||||
@return if($min != 0, $min, null);
|
@return if($min != 0, $min, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Maximum breakpoint width. Null for the largest (last) breakpoint.
|
// Maximum breakpoint width.
|
||||||
// The maximum value is calculated as the minimum of the next one less 0.02px
|
// The maximum value is reduced by 0.02px to work around the limitations of
|
||||||
// to work around the limitations of `min-` and `max-` prefixes and viewports with fractional widths.
|
// `min-` and `max-` prefixes and viewports with fractional widths.
|
||||||
// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
|
// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
|
||||||
// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
|
// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
|
||||||
// See https://bugs.webkit.org/show_bug.cgi?id=178261
|
// See https://bugs.webkit.org/show_bug.cgi?id=178261
|
||||||
//
|
//
|
||||||
// >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
||||||
// 767.98px
|
// 767.98px
|
||||||
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
||||||
$next: breakpoint-next($name, $breakpoints);
|
$max: map-get($breakpoints, $name);
|
||||||
@return if($next, breakpoint-min($next, $breakpoints) - .02, null);
|
@return if($max and $max > 0, $max - .02, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
|
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
|
||||||
// Useful for making responsive utilities.
|
// Useful for making responsive utilities.
|
||||||
//
|
//
|
||||||
// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
||||||
// "" (Returns a blank string)
|
// "" (Returns a blank string)
|
||||||
// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
||||||
// "-sm"
|
// "-sm"
|
||||||
@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
|
@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
|
||||||
@return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
|
@return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
|
||||||
|
@ -105,7 +108,8 @@
|
||||||
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
|
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
|
||||||
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
|
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
|
||||||
$min: breakpoint-min($name, $breakpoints);
|
$min: breakpoint-min($name, $breakpoints);
|
||||||
$max: breakpoint-max($name, $breakpoints);
|
$next: breakpoint-next($name, $breakpoints);
|
||||||
|
$max: breakpoint-max($next, $breakpoints);
|
||||||
|
|
||||||
@if $min != null and $max != null {
|
@if $min != null and $max != null {
|
||||||
@media (min-width: $min) and (max-width: $max) {
|
@media (min-width: $min) and (max-width: $max) {
|
||||||
|
@ -116,7 +120,7 @@
|
||||||
@content;
|
@content;
|
||||||
}
|
}
|
||||||
} @else if $min == null {
|
} @else if $min == null {
|
||||||
@include media-breakpoint-down($name, $breakpoints) {
|
@include media-breakpoint-down($next, $breakpoints) {
|
||||||
@content;
|
@content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,108 +3,68 @@
|
||||||
// Easily pump out default styles, as well as :hover, :focus, :active,
|
// Easily pump out default styles, as well as :hover, :focus, :active,
|
||||||
// and disabled options for all buttons
|
// and disabled options for all buttons
|
||||||
|
|
||||||
@mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
|
// scss-docs-start btn-variant-mixin
|
||||||
color: color-yiq($background);
|
@mixin button-variant(
|
||||||
@include gradient-bg($background);
|
$background,
|
||||||
border-color: $border;
|
$border,
|
||||||
@include box-shadow($btn-box-shadow);
|
$color: color-contrast($background),
|
||||||
|
$hover-background: if($color == $color-contrast-light, shade-color($background, $btn-hover-bg-shade-amount), tint-color($background, $btn-hover-bg-tint-amount)),
|
||||||
@include hover() {
|
$hover-border: if($color == $color-contrast-light, shade-color($border, $btn-hover-border-shade-amount), tint-color($border, $btn-hover-border-tint-amount)),
|
||||||
color: color-yiq($hover-background);
|
$hover-color: color-contrast($hover-background),
|
||||||
@include gradient-bg($hover-background);
|
$active-background: if($color == $color-contrast-light, shade-color($background, $btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)),
|
||||||
border-color: $hover-border;
|
$active-border: if($color == $color-contrast-light, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)),
|
||||||
}
|
$active-color: color-contrast($active-background),
|
||||||
|
$disabled-background: $background,
|
||||||
&:focus,
|
$disabled-border: $border,
|
||||||
&.focus {
|
$disabled-color: color-contrast($disabled-background)
|
||||||
color: color-yiq($hover-background);
|
) {
|
||||||
@include gradient-bg($hover-background);
|
--#{$prefix}btn-color: #{$color};
|
||||||
border-color: $hover-border;
|
--#{$prefix}btn-bg: #{$background};
|
||||||
@if $enable-shadows {
|
--#{$prefix}btn-border-color: #{$border};
|
||||||
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
|
--#{$prefix}btn-hover-color: #{$hover-color};
|
||||||
} @else {
|
--#{$prefix}btn-hover-bg: #{$hover-background};
|
||||||
// Avoid using mixin so we can pass custom focus shadow properly
|
--#{$prefix}btn-hover-border-color: #{$hover-border};
|
||||||
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb(mix($color, $border, 15%))};
|
||||||
}
|
--#{$prefix}btn-active-color: #{$active-color};
|
||||||
}
|
--#{$prefix}btn-active-bg: #{$active-background};
|
||||||
|
--#{$prefix}btn-active-border-color: #{$active-border};
|
||||||
// Disabled comes first so active can properly restyle
|
--#{$prefix}btn-active-shadow: #{$btn-active-box-shadow};
|
||||||
&.disabled,
|
--#{$prefix}btn-disabled-color: #{$disabled-color};
|
||||||
&:disabled {
|
--#{$prefix}btn-disabled-bg: #{$disabled-background};
|
||||||
color: color-yiq($background);
|
--#{$prefix}btn-disabled-border-color: #{$disabled-border};
|
||||||
background-color: $background;
|
|
||||||
border-color: $border;
|
|
||||||
// Remove CSS gradients if they're enabled
|
|
||||||
@if $enable-gradients {
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(:disabled):not(.disabled):active,
|
|
||||||
&:not(:disabled):not(.disabled).active,
|
|
||||||
.show > &.dropdown-toggle {
|
|
||||||
color: color-yiq($active-background);
|
|
||||||
background-color: $active-background;
|
|
||||||
@if $enable-gradients {
|
|
||||||
background-image: none; // Remove the gradient for the pressed/active state
|
|
||||||
}
|
|
||||||
border-color: $active-border;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
@if $enable-shadows and $btn-active-box-shadow != none {
|
|
||||||
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
|
|
||||||
} @else {
|
|
||||||
// Avoid using mixin so we can pass custom focus shadow properly
|
|
||||||
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// scss-docs-end btn-variant-mixin
|
||||||
|
|
||||||
@mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) {
|
// scss-docs-start btn-outline-variant-mixin
|
||||||
color: $color;
|
@mixin button-outline-variant(
|
||||||
border-color: $color;
|
$color,
|
||||||
|
$color-hover: color-contrast($color),
|
||||||
@include hover() {
|
$active-background: $color,
|
||||||
color: $color-hover;
|
$active-border: $color,
|
||||||
background-color: $active-background;
|
$active-color: color-contrast($active-background)
|
||||||
border-color: $active-border;
|
) {
|
||||||
}
|
--#{$prefix}btn-color: #{$color};
|
||||||
|
--#{$prefix}btn-border-color: #{$color};
|
||||||
&:focus,
|
--#{$prefix}btn-hover-color: #{$color-hover};
|
||||||
&.focus {
|
--#{$prefix}btn-hover-bg: #{$active-background};
|
||||||
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
|
--#{$prefix}btn-hover-border-color: #{$active-border};
|
||||||
}
|
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb($color)};
|
||||||
|
--#{$prefix}btn-active-color: #{$active-color};
|
||||||
&.disabled,
|
--#{$prefix}btn-active-bg: #{$active-background};
|
||||||
&:disabled {
|
--#{$prefix}btn-active-border-color: #{$active-border};
|
||||||
color: $color;
|
--#{$prefix}btn-active-shadow: #{$btn-active-box-shadow};
|
||||||
background-color: transparent;
|
--#{$prefix}btn-disabled-color: #{$color};
|
||||||
}
|
--#{$prefix}btn-disabled-bg: transparent;
|
||||||
|
--#{$prefix}btn-disabled-border-color: #{$color};
|
||||||
&:not(:disabled):not(.disabled):active,
|
--#{$prefix}gradient: none;
|
||||||
&:not(:disabled):not(.disabled).active,
|
|
||||||
.show > &.dropdown-toggle {
|
|
||||||
color: color-yiq($active-background);
|
|
||||||
background-color: $active-background;
|
|
||||||
border-color: $active-border;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
@if $enable-shadows and $btn-active-box-shadow != none {
|
|
||||||
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
|
|
||||||
} @else {
|
|
||||||
// Avoid using mixin so we can pass custom focus shadow properly
|
|
||||||
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// scss-docs-end btn-outline-variant-mixin
|
||||||
|
|
||||||
// Button sizes
|
// scss-docs-start btn-size-mixin
|
||||||
@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
|
@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
|
||||||
padding: $padding-y $padding-x;
|
--#{$prefix}btn-padding-y: #{$padding-y};
|
||||||
@include font-size($font-size);
|
--#{$prefix}btn-padding-x: #{$padding-x};
|
||||||
line-height: $line-height;
|
@include rfs($font-size, --#{$prefix}btn-font-size);
|
||||||
// Manually declare to provide an override to the browser default
|
--#{$prefix}btn-border-radius: #{$border-radius};
|
||||||
@include border-radius($border-radius, 0);
|
|
||||||
}
|
}
|
||||||
|
// scss-docs-end btn-size-mixin
|
||||||
|
|
|
@ -1,57 +1,63 @@
|
||||||
@mixin caret-down() {
|
// scss-docs-start caret-mixins
|
||||||
border-top: $caret-width solid;
|
@mixin caret-down($width: $caret-width) {
|
||||||
border-right: $caret-width solid transparent;
|
border-top: $width solid;
|
||||||
|
border-right: $width solid transparent;
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
border-left: $caret-width solid transparent;
|
border-left: $width solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin caret-up() {
|
@mixin caret-up($width: $caret-width) {
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
border-right: $caret-width solid transparent;
|
border-right: $width solid transparent;
|
||||||
border-bottom: $caret-width solid;
|
border-bottom: $width solid;
|
||||||
border-left: $caret-width solid transparent;
|
border-left: $width solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin caret-right() {
|
@mixin caret-end($width: $caret-width) {
|
||||||
border-top: $caret-width solid transparent;
|
border-top: $width solid transparent;
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
border-bottom: $caret-width solid transparent;
|
border-bottom: $width solid transparent;
|
||||||
border-left: $caret-width solid;
|
border-left: $width solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin caret-left() {
|
@mixin caret-start($width: $caret-width) {
|
||||||
border-top: $caret-width solid transparent;
|
border-top: $width solid transparent;
|
||||||
border-right: $caret-width solid;
|
border-right: $width solid;
|
||||||
border-bottom: $caret-width solid transparent;
|
border-bottom: $width solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin caret($direction: down) {
|
@mixin caret(
|
||||||
|
$direction: down,
|
||||||
|
$width: $caret-width,
|
||||||
|
$spacing: $caret-spacing,
|
||||||
|
$vertical-align: $caret-vertical-align
|
||||||
|
) {
|
||||||
@if $enable-caret {
|
@if $enable-caret {
|
||||||
&::after {
|
&::after {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: $caret-spacing;
|
margin-left: $spacing;
|
||||||
vertical-align: $caret-vertical-align;
|
vertical-align: $vertical-align;
|
||||||
content: "";
|
content: "";
|
||||||
@if $direction == down {
|
@if $direction == down {
|
||||||
@include caret-down();
|
@include caret-down($width);
|
||||||
} @else if $direction == up {
|
} @else if $direction == up {
|
||||||
@include caret-up();
|
@include caret-up($width);
|
||||||
} @else if $direction == right {
|
} @else if $direction == end {
|
||||||
@include caret-right();
|
@include caret-end($width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $direction == left {
|
@if $direction == start {
|
||||||
&::after {
|
&::after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: $caret-spacing;
|
margin-right: $spacing;
|
||||||
vertical-align: $caret-vertical-align;
|
vertical-align: $vertical-align;
|
||||||
content: "";
|
content: "";
|
||||||
@include caret-left();
|
@include caret-start($width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,3 +66,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end caret-mixins
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// scss-docs-start clearfix
|
||||||
@mixin clearfix() {
|
@mixin clearfix() {
|
||||||
&::after {
|
&::after {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -5,3 +6,4 @@
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end clearfix
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
// scss-docs-start color-mode-mixin
|
||||||
|
@mixin color-mode($mode: light, $root: false) {
|
||||||
|
@if $color-mode-type == "media-query" {
|
||||||
|
@if $root == true {
|
||||||
|
@media (prefers-color-scheme: $mode) {
|
||||||
|
:root {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} @else {
|
||||||
|
@media (prefers-color-scheme: $mode) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} @else {
|
||||||
|
[data-bs-theme="#{$mode}"] {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// scss-docs-end color-mode-mixin
|
|
@ -0,0 +1,7 @@
|
||||||
|
// scss-docs-start mixin-color-scheme
|
||||||
|
@mixin color-scheme($name) {
|
||||||
|
@media (prefers-color-scheme: #{$name}) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// scss-docs-end mixin-color-scheme
|
|
@ -0,0 +1,11 @@
|
||||||
|
// Container mixins
|
||||||
|
|
||||||
|
@mixin make-container($gutter: $container-padding-x) {
|
||||||
|
--#{$prefix}gutter-x: #{$gutter};
|
||||||
|
--#{$prefix}gutter-y: 0;
|
||||||
|
width: 100%;
|
||||||
|
padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
|
||||||
|
padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
|
@ -1,14 +0,0 @@
|
||||||
// stylelint-disable declaration-no-important
|
|
||||||
|
|
||||||
@mixin float-left() {
|
|
||||||
float: left !important;
|
|
||||||
@include deprecate("The `float-left` mixin", "v4.3.0", "v5");
|
|
||||||
}
|
|
||||||
@mixin float-right() {
|
|
||||||
float: right !important;
|
|
||||||
@include deprecate("The `float-right` mixin", "v4.3.0", "v5");
|
|
||||||
}
|
|
||||||
@mixin float-none() {
|
|
||||||
float: none !important;
|
|
||||||
@include deprecate("The `float-none` mixin", "v4.3.0", "v5");
|
|
||||||
}
|
|
|
@ -1,33 +1,7 @@
|
||||||
// Form control focus state
|
|
||||||
//
|
|
||||||
// Generate a customized focus state and for any input with the specified color,
|
|
||||||
// which defaults to the `$input-focus-border-color` variable.
|
|
||||||
//
|
|
||||||
// We highly encourage you to not customize the default value, but instead use
|
|
||||||
// this to tweak colors on an as-needed basis. This aesthetic change is based on
|
|
||||||
// WebKit's default styles, but applicable to a wider range of browsers. Its
|
|
||||||
// usability and accessibility should be taken into account with any change.
|
|
||||||
//
|
|
||||||
// Example usage: change the default blue border and shadow to white for better
|
|
||||||
// contrast against a dark gray background.
|
|
||||||
@mixin form-control-focus($ignore-warning: false) {
|
|
||||||
&:focus {
|
|
||||||
color: $input-focus-color;
|
|
||||||
background-color: $input-focus-bg;
|
|
||||||
border-color: $input-focus-border-color;
|
|
||||||
outline: 0;
|
|
||||||
@if $enable-shadows {
|
|
||||||
@include box-shadow($input-box-shadow, $input-focus-box-shadow);
|
|
||||||
} @else {
|
|
||||||
// Avoid using mixin so we can pass custom focus shadow properly
|
|
||||||
box-shadow: $input-focus-box-shadow;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@include deprecate("The `form-control-focus()` mixin", "v4.4.0", "v5", $ignore-warning);
|
|
||||||
}
|
|
||||||
|
|
||||||
// This mixin uses an `if()` technique to be compatible with Dart Sass
|
// This mixin uses an `if()` technique to be compatible with Dart Sass
|
||||||
// See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
|
// See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
|
||||||
|
|
||||||
|
// scss-docs-start form-validation-mixins
|
||||||
@mixin form-validation-state-selector($state) {
|
@mixin form-validation-state-selector($state) {
|
||||||
@if ($state == "valid" or $state == "invalid") {
|
@if ($state == "valid" or $state == "invalid") {
|
||||||
.was-validated #{if(&, "&", "")}:#{$state},
|
.was-validated #{if(&, "&", "")}:#{$state},
|
||||||
|
@ -41,19 +15,27 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin form-validation-state($state, $color, $icon) {
|
@mixin form-validation-state(
|
||||||
|
$state,
|
||||||
|
$color,
|
||||||
|
$icon,
|
||||||
|
$tooltip-color: color-contrast($color),
|
||||||
|
$tooltip-bg-color: rgba($color, $form-feedback-tooltip-opacity),
|
||||||
|
$focus-box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity),
|
||||||
|
$border-color: $color
|
||||||
|
) {
|
||||||
.#{$state}-feedback {
|
.#{$state}-feedback {
|
||||||
display: none;
|
display: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: $form-feedback-margin-top;
|
margin-top: $form-feedback-margin-top;
|
||||||
@include font-size($form-feedback-font-size);
|
@include font-size($form-feedback-font-size);
|
||||||
|
font-style: $form-feedback-font-style;
|
||||||
color: $color;
|
color: $color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.#{$state}-tooltip {
|
.#{$state}-tooltip {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
left: 0;
|
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
display: none;
|
display: none;
|
||||||
max-width: 100%; // Contain to parent when possible
|
max-width: 100%; // Contain to parent when possible
|
||||||
|
@ -61,16 +43,9 @@
|
||||||
margin-top: .1rem;
|
margin-top: .1rem;
|
||||||
@include font-size($form-feedback-tooltip-font-size);
|
@include font-size($form-feedback-tooltip-font-size);
|
||||||
line-height: $form-feedback-tooltip-line-height;
|
line-height: $form-feedback-tooltip-line-height;
|
||||||
color: color-yiq($color);
|
color: $tooltip-color;
|
||||||
background-color: rgba($color, $form-feedback-tooltip-opacity);
|
background-color: $tooltip-bg-color;
|
||||||
@include border-radius($form-feedback-tooltip-border-radius);
|
@include border-radius($form-feedback-tooltip-border-radius);
|
||||||
|
|
||||||
// See https://github.com/twbs/bootstrap/pull/31557
|
|
||||||
// Align tooltip to form elements
|
|
||||||
.form-row > .col > &,
|
|
||||||
.form-row > [class*="col-"] > & {
|
|
||||||
left: $form-grid-gutter-width / 2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@include form-validation-state-selector($state) {
|
@include form-validation-state-selector($state) {
|
||||||
|
@ -82,7 +57,7 @@
|
||||||
|
|
||||||
.form-control {
|
.form-control {
|
||||||
@include form-validation-state-selector($state) {
|
@include form-validation-state-selector($state) {
|
||||||
border-color: $color;
|
border-color: $border-color;
|
||||||
|
|
||||||
@if $enable-validation-icons {
|
@if $enable-validation-icons {
|
||||||
padding-right: $input-height-inner;
|
padding-right: $input-height-inner;
|
||||||
|
@ -93,8 +68,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
border-color: $color;
|
border-color: $border-color;
|
||||||
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
box-shadow: $focus-box-shadow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,77 +84,70 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-select {
|
.form-select {
|
||||||
@include form-validation-state-selector($state) {
|
@include form-validation-state-selector($state) {
|
||||||
border-color: $color;
|
border-color: $border-color;
|
||||||
|
|
||||||
@if $enable-validation-icons {
|
@if $enable-validation-icons {
|
||||||
padding-right: $custom-select-feedback-icon-padding-right;
|
&:not([multiple]):not([size]),
|
||||||
background: $custom-select-background, $custom-select-bg escape-svg($icon) $custom-select-feedback-icon-position / $custom-select-feedback-icon-size no-repeat;
|
&:not([multiple])[size="1"] {
|
||||||
|
--#{$prefix}form-select-bg-icon: #{escape-svg($icon)};
|
||||||
|
padding-right: $form-select-feedback-icon-padding-end;
|
||||||
|
background-position: $form-select-bg-position, $form-select-feedback-icon-position;
|
||||||
|
background-size: $form-select-bg-size, $form-select-feedback-icon-size;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
border-color: $color;
|
border-color: $border-color;
|
||||||
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
box-shadow: $focus-box-shadow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control-color {
|
||||||
|
@include form-validation-state-selector($state) {
|
||||||
|
@if $enable-validation-icons {
|
||||||
|
width: add($form-color-width, $input-height-inner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-check-input {
|
.form-check-input {
|
||||||
@include form-validation-state-selector($state) {
|
@include form-validation-state-selector($state) {
|
||||||
|
border-color: $border-color;
|
||||||
|
|
||||||
|
&:checked {
|
||||||
|
background-color: $color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
box-shadow: $focus-box-shadow;
|
||||||
|
}
|
||||||
|
|
||||||
~ .form-check-label {
|
~ .form-check-label {
|
||||||
color: $color;
|
color: $color;
|
||||||
}
|
}
|
||||||
|
|
||||||
~ .#{$state}-feedback,
|
|
||||||
~ .#{$state}-tooltip {
|
|
||||||
display: block;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.form-check-inline .form-check-input {
|
||||||
|
~ .#{$state}-feedback {
|
||||||
|
margin-left: .5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-control-input {
|
.input-group {
|
||||||
|
> .form-control:not(:focus),
|
||||||
|
> .form-select:not(:focus),
|
||||||
|
> .form-floating:not(:focus-within) {
|
||||||
@include form-validation-state-selector($state) {
|
@include form-validation-state-selector($state) {
|
||||||
~ .custom-control-label {
|
@if $state == "valid" {
|
||||||
color: $color;
|
z-index: 3;
|
||||||
|
} @else if $state == "invalid" {
|
||||||
&::before {
|
z-index: 4;
|
||||||
border-color: $color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:checked {
|
|
||||||
~ .custom-control-label::before {
|
|
||||||
border-color: lighten($color, 10%);
|
|
||||||
@include gradient-bg(lighten($color, 10%));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
~ .custom-control-label::before {
|
|
||||||
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(:checked) ~ .custom-control-label::before {
|
|
||||||
border-color: $color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// custom file
|
|
||||||
.custom-file-input {
|
|
||||||
@include form-validation-state-selector($state) {
|
|
||||||
~ .custom-file-label {
|
|
||||||
border-color: $color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
~ .custom-file-label {
|
|
||||||
border-color: $color;
|
|
||||||
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end form-validation-mixins
|
||||||
|
|
|
@ -1,45 +1,47 @@
|
||||||
// Gradients
|
// Gradients
|
||||||
|
|
||||||
@mixin gradient-bg($color) {
|
// scss-docs-start gradient-bg-mixin
|
||||||
@if $enable-gradients {
|
@mixin gradient-bg($color: null) {
|
||||||
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x;
|
|
||||||
} @else {
|
|
||||||
background-color: $color;
|
background-color: $color;
|
||||||
|
|
||||||
|
@if $enable-gradients {
|
||||||
|
background-image: var(--#{$prefix}gradient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end gradient-bg-mixin
|
||||||
|
|
||||||
|
// scss-docs-start gradient-mixins
|
||||||
// Horizontal gradient, from left to right
|
// Horizontal gradient, from left to right
|
||||||
//
|
//
|
||||||
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
||||||
@mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
|
@mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
|
||||||
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
|
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
|
||||||
background-repeat: repeat-x;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vertical gradient, from top to bottom
|
// Vertical gradient, from top to bottom
|
||||||
//
|
//
|
||||||
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
||||||
@mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
|
@mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: null, $end-percent: null) {
|
||||||
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
|
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
|
||||||
background-repeat: repeat-x;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
|
@mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
|
||||||
background-image: linear-gradient($deg, $start-color, $end-color);
|
background-image: linear-gradient($deg, $start-color, $end-color);
|
||||||
background-repeat: repeat-x;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
|
@mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
|
||||||
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
|
@mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
|
||||||
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
|
@mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
|
||||||
background-image: radial-gradient(circle, $inner-color, $outer-color);
|
background-image: radial-gradient(circle, $inner-color, $outer-color);
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
|
@mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
|
||||||
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
||||||
}
|
}
|
||||||
|
// scss-docs-end gradient-mixins
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
// Framework grid generation
|
|
||||||
//
|
|
||||||
// Used only by Bootstrap to generate the correct number of grid classes given
|
|
||||||
// any value of `$grid-columns`.
|
|
||||||
|
|
||||||
@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
|
|
||||||
// Common properties for all breakpoints
|
|
||||||
%grid-column {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
padding-right: $gutter * 0.5;
|
|
||||||
padding-left: $gutter * 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
@each $breakpoint in map-keys($breakpoints) {
|
|
||||||
$infix: breakpoint-infix($breakpoint, $breakpoints);
|
|
||||||
|
|
||||||
@if $columns > 0 {
|
|
||||||
// Allow columns to stretch full width below their breakpoints
|
|
||||||
@for $i from 1 through $columns {
|
|
||||||
.col#{$infix}-#{$i} {
|
|
||||||
@extend %grid-column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.col#{$infix},
|
|
||||||
.col#{$infix}-auto {
|
|
||||||
@extend %grid-column;
|
|
||||||
}
|
|
||||||
|
|
||||||
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
|
||||||
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
|
|
||||||
.col#{$infix} {
|
|
||||||
flex-basis: 0;
|
|
||||||
flex-grow: 1;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
@if $grid-row-columns > 0 {
|
|
||||||
@for $i from 1 through $grid-row-columns {
|
|
||||||
.row-cols#{$infix}-#{$i} {
|
|
||||||
@include row-cols($i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.col#{$infix}-auto {
|
|
||||||
@include make-col-auto();
|
|
||||||
}
|
|
||||||
|
|
||||||
@if $columns > 0 {
|
|
||||||
@for $i from 1 through $columns {
|
|
||||||
.col#{$infix}-#{$i} {
|
|
||||||
@include make-col($i, $columns);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.order#{$infix}-first { order: -1; }
|
|
||||||
|
|
||||||
.order#{$infix}-last { order: $columns + 1; }
|
|
||||||
|
|
||||||
@for $i from 0 through $columns {
|
|
||||||
.order#{$infix}-#{$i} { order: $i; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@if $columns > 0 {
|
|
||||||
// `$columns - 1` because offsetting by the width of an entire row isn't possible
|
|
||||||
@for $i from 0 through ($columns - 1) {
|
|
||||||
@if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
|
|
||||||
.offset#{$infix}-#{$i} {
|
|
||||||
@include make-col-offset($i, $columns);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,71 +1,151 @@
|
||||||
/// Grid system
|
// Grid system
|
||||||
//
|
//
|
||||||
// Generate semantic grid columns with these mixins.
|
// Generate semantic grid columns with these mixins.
|
||||||
|
|
||||||
@use "sass:math";
|
|
||||||
|
|
||||||
@mixin make-container($gutter: $grid-gutter-width) {
|
|
||||||
width: 100%;
|
|
||||||
padding-right: $gutter * 0.5;
|
|
||||||
padding-left: $gutter * 0.5;
|
|
||||||
margin-right: auto;
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin make-row($gutter: $grid-gutter-width) {
|
@mixin make-row($gutter: $grid-gutter-width) {
|
||||||
|
--#{$prefix}gutter-x: #{$gutter};
|
||||||
|
--#{$prefix}gutter-y: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-right: -$gutter * 0.5;
|
// TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed
|
||||||
margin-left: -$gutter * 0.5;
|
margin-top: calc(-1 * var(--#{$prefix}gutter-y)); // stylelint-disable-line function-disallowed-list
|
||||||
|
margin-right: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
|
||||||
|
margin-left: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
|
||||||
}
|
}
|
||||||
|
|
||||||
// For each breakpoint, define the maximum width of the container in a media query
|
@mixin make-col-ready() {
|
||||||
@mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
|
// Add box sizing if only the grid is loaded
|
||||||
@each $breakpoint, $container-max-width in $max-widths {
|
box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
|
||||||
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
|
||||||
max-width: $container-max-width;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@include deprecate("The `make-container-max-widths` mixin", "v4.5.2", "v5");
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin make-col-ready($gutter: $grid-gutter-width) {
|
|
||||||
position: relative;
|
|
||||||
// Prevent columns from becoming too narrow when at smaller grid tiers by
|
// Prevent columns from becoming too narrow when at smaller grid tiers by
|
||||||
// always setting `width: 100%;`. This works because we use `flex` values
|
// always setting `width: 100%;`. This works because we set the width
|
||||||
// later on to override this initial width.
|
// later on to override this initial width.
|
||||||
|
flex-shrink: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-right: $gutter * 0.5;
|
max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
|
||||||
padding-left: $gutter * 0.5;
|
padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
|
||||||
|
padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
|
||||||
|
margin-top: var(--#{$prefix}gutter-y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin make-col($size, $columns: $grid-columns) {
|
@mixin make-col($size: false, $columns: $grid-columns) {
|
||||||
flex: 0 0 percentage(math.div($size, $columns));
|
@if $size {
|
||||||
// Add a `max-width` to ensure content within each column does not blow out
|
flex: 0 0 auto;
|
||||||
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
|
width: percentage(divide($size, $columns));
|
||||||
// do not appear to require this.
|
|
||||||
max-width: percentage(math.div($size, $columns));
|
} @else {
|
||||||
|
flex: 1 1 0;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin make-col-auto() {
|
@mixin make-col-auto() {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
width: auto;
|
width: auto;
|
||||||
max-width: 100%; // Reset earlier grid tiers
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin make-col-offset($size, $columns: $grid-columns) {
|
@mixin make-col-offset($size, $columns: $grid-columns) {
|
||||||
$num: math.div($size, $columns);
|
$num: divide($size, $columns);
|
||||||
margin-left: if($num == 0, 0, percentage($num));
|
margin-left: if($num == 0, 0, percentage($num));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Row columns
|
// Row columns
|
||||||
//
|
//
|
||||||
// Specify on a parent element(e.g., .row) to force immediate children into NN
|
// Specify on a parent element(e.g., .row) to force immediate children into NN
|
||||||
// numberof columns. Supports wrapping to new lines, but does not do a Masonry
|
// number of columns. Supports wrapping to new lines, but does not do a Masonry
|
||||||
// style grid.
|
// style grid.
|
||||||
@mixin row-cols($count) {
|
@mixin row-cols($count) {
|
||||||
> * {
|
> * {
|
||||||
flex: 0 0 math.div(100%, $count);
|
flex: 0 0 auto;
|
||||||
max-width: math.div(100%, $count);
|
width: percentage(divide(1, $count));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Framework grid generation
|
||||||
|
//
|
||||||
|
// Used only by Bootstrap to generate the correct number of grid classes given
|
||||||
|
// any value of `$grid-columns`.
|
||||||
|
|
||||||
|
@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
|
||||||
|
@each $breakpoint in map-keys($breakpoints) {
|
||||||
|
$infix: breakpoint-infix($breakpoint, $breakpoints);
|
||||||
|
|
||||||
|
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
||||||
|
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
|
||||||
|
.col#{$infix} {
|
||||||
|
flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
||||||
|
}
|
||||||
|
|
||||||
|
.row-cols#{$infix}-auto > * {
|
||||||
|
@include make-col-auto();
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $grid-row-columns > 0 {
|
||||||
|
@for $i from 1 through $grid-row-columns {
|
||||||
|
.row-cols#{$infix}-#{$i} {
|
||||||
|
@include row-cols($i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.col#{$infix}-auto {
|
||||||
|
@include make-col-auto();
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $columns > 0 {
|
||||||
|
@for $i from 1 through $columns {
|
||||||
|
.col#{$infix}-#{$i} {
|
||||||
|
@include make-col($i, $columns);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// `$columns - 1` because offsetting by the width of an entire row isn't possible
|
||||||
|
@for $i from 0 through ($columns - 1) {
|
||||||
|
@if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
|
||||||
|
.offset#{$infix}-#{$i} {
|
||||||
|
@include make-col-offset($i, $columns);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gutters
|
||||||
|
//
|
||||||
|
// Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
|
||||||
|
@each $key, $value in $gutters {
|
||||||
|
.g#{$infix}-#{$key},
|
||||||
|
.gx#{$infix}-#{$key} {
|
||||||
|
--#{$prefix}gutter-x: #{$value};
|
||||||
|
}
|
||||||
|
|
||||||
|
.g#{$infix}-#{$key},
|
||||||
|
.gy#{$infix}-#{$key} {
|
||||||
|
--#{$prefix}gutter-y: #{$value};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {
|
||||||
|
@each $breakpoint in map-keys($breakpoints) {
|
||||||
|
$infix: breakpoint-infix($breakpoint, $breakpoints);
|
||||||
|
|
||||||
|
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
||||||
|
@if $columns > 0 {
|
||||||
|
@for $i from 1 through $columns {
|
||||||
|
.g-col#{$infix}-#{$i} {
|
||||||
|
grid-column: auto / span $i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start with `1` because `0` is and invalid value.
|
||||||
|
// Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.
|
||||||
|
@for $i from 1 through ($columns - 1) {
|
||||||
|
.g-start#{$infix}-#{$i} {
|
||||||
|
grid-column-start: $i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
// Hover mixin and `$enable-hover-media-query` are deprecated.
|
|
||||||
//
|
|
||||||
// Originally added during our alphas and maintained during betas, this mixin was
|
|
||||||
// designed to prevent `:hover` stickiness on iOS-an issue where hover styles
|
|
||||||
// would persist after initial touch.
|
|
||||||
//
|
|
||||||
// For backward compatibility, we've kept these mixins and updated them to
|
|
||||||
// always return their regular pseudo-classes instead of a shimmed media query.
|
|
||||||
//
|
|
||||||
// Issue: https://github.com/twbs/bootstrap/issues/25195
|
|
||||||
|
|
||||||
@mixin hover() {
|
|
||||||
&:hover { @content; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin hover-focus() {
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin plain-hover-focus() {
|
|
||||||
&,
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin hover-focus-active() {
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&:active {
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -7,30 +7,10 @@
|
||||||
//
|
//
|
||||||
// Keep images from scaling beyond the width of their parents.
|
// Keep images from scaling beyond the width of their parents.
|
||||||
|
|
||||||
@mixin img-fluid() {
|
@mixin img-fluid {
|
||||||
// Part 1: Set a maximum relative to the parent
|
// Part 1: Set a maximum relative to the parent
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
// Part 2: Override the height to auto, otherwise images will be stretched
|
// Part 2: Override the height to auto, otherwise images will be stretched
|
||||||
// when setting a width and height attribute on the img element.
|
// when setting a width and height attribute on the img element.
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Retina image
|
|
||||||
//
|
|
||||||
// Short retina mixin for setting background-image and -size.
|
|
||||||
|
|
||||||
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
|
|
||||||
background-image: url($file-1x);
|
|
||||||
|
|
||||||
// Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
|
|
||||||
// but doesn't convert dppx=>dpi.
|
|
||||||
// There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
|
|
||||||
// Compatibility info: https://caniuse.com/css-media-resolution
|
|
||||||
@media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
|
|
||||||
only screen and (min-resolution: 2dppx) { // Standardized
|
|
||||||
background-image: url($file-2x);
|
|
||||||
background-size: $width-1x $height-1x;
|
|
||||||
}
|
|
||||||
@include deprecate("`img-retina()`", "v4.3.0", "v5");
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
|
@include deprecate("`list-group-item-variant()`", "v5.3.0", "v6.0.0");
|
||||||
|
|
||||||
// List Groups
|
// List Groups
|
||||||
|
|
||||||
|
// scss-docs-start list-group-mixin
|
||||||
@mixin list-group-item-variant($state, $background, $color) {
|
@mixin list-group-item-variant($state, $background, $color) {
|
||||||
.list-group-item-#{$state} {
|
.list-group-item-#{$state} {
|
||||||
color: $color;
|
color: $color;
|
||||||
background-color: $background;
|
background-color: $background;
|
||||||
|
|
||||||
&.list-group-item-action {
|
&.list-group-item-action {
|
||||||
@include hover-focus() {
|
&:hover,
|
||||||
|
&:focus {
|
||||||
color: $color;
|
color: $color;
|
||||||
background-color: darken($background, 5%);
|
background-color: shade-color($background, 10%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
|
@ -19,3 +23,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// scss-docs-end list-group-mixin
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Lists
|
// Lists
|
||||||
|
|
||||||
// Unstyled keeps list items block level, just removes default browser padding and list-style
|
// Unstyled keeps list items block level, just removes default browser padding and list-style
|
||||||
@mixin list-unstyled() {
|
@mixin list-unstyled {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
// Horizontal dividers
|
|
||||||
//
|
|
||||||
// Dividers (basically an hr) within dropdowns and nav lists
|
|
||||||
|
|
||||||
@mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y, $ignore-warning: false) {
|
|
||||||
height: 0;
|
|
||||||
margin: $margin-y 0;
|
|
||||||
overflow: hidden;
|
|
||||||
border-top: 1px solid $color;
|
|
||||||
@include deprecate("The `nav-divider()` mixin", "v4.4.0", "v5", $ignore-warning);
|
|
||||||
}
|
|
|
@ -1,22 +1,10 @@
|
||||||
// Pagination
|
// Pagination
|
||||||
|
|
||||||
@mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
|
// scss-docs-start pagination-mixin
|
||||||
.page-link {
|
@mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
|
||||||
padding: $padding-y $padding-x;
|
--#{$prefix}pagination-padding-x: #{$padding-x};
|
||||||
@include font-size($font-size);
|
--#{$prefix}pagination-padding-y: #{$padding-y};
|
||||||
line-height: $line-height;
|
@include rfs($font-size, --#{$prefix}pagination-font-size);
|
||||||
}
|
--#{$prefix}pagination-border-radius: #{$border-radius};
|
||||||
|
|
||||||
.page-item {
|
|
||||||
&:first-child {
|
|
||||||
.page-link {
|
|
||||||
@include border-left-radius($border-radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:last-child {
|
|
||||||
.page-link {
|
|
||||||
@include border-right-radius($border-radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// scss-docs-end pagination-mixin
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@mixin reset-text() {
|
@mixin reset-text {
|
||||||
font-family: $font-family-base;
|
font-family: $font-family-base;
|
||||||
// We deliberately do NOT reset font-size or word-wrap.
|
// We deliberately do NOT reset font-size or overflow-wrap / word-wrap.
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: $font-weight-normal;
|
font-weight: $font-weight-normal;
|
||||||
line-height: $line-height-base;
|
line-height: $line-height-base;
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
letter-spacing: normal;
|
letter-spacing: normal;
|
||||||
word-break: normal;
|
word-break: normal;
|
||||||
word-spacing: normal;
|
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
word-spacing: normal;
|
||||||
line-break: auto;
|
line-break: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
// Only display content to screen readers
|
|
||||||
//
|
|
||||||
// See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
|
|
||||||
// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
|
|
||||||
|
|
||||||
@mixin sr-only() {
|
|
||||||
position: absolute;
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
padding: 0;
|
|
||||||
margin: -1px; // Fix for https://github.com/twbs/bootstrap/issues/25686
|
|
||||||
overflow: hidden;
|
|
||||||
clip: rect(0, 0, 0, 0);
|
|
||||||
white-space: nowrap;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use in conjunction with .sr-only to only display content when it's focused.
|
|
||||||
//
|
|
||||||
// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
|
|
||||||
//
|
|
||||||
// Credit: HTML5 Boilerplate
|
|
||||||
|
|
||||||
@mixin sr-only-focusable() {
|
|
||||||
&:active,
|
|
||||||
&:focus {
|
|
||||||
position: static;
|
|
||||||
width: auto;
|
|
||||||
height: auto;
|
|
||||||
overflow: visible;
|
|
||||||
clip: auto;
|
|
||||||
white-space: normal;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
// Sizing shortcuts
|
|
||||||
|
|
||||||
@mixin size($width, $height: $width) {
|
|
||||||
width: $width;
|
|
||||||
height: $height;
|
|
||||||
@include deprecate("`size()`", "v4.3.0", "v5");
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
// Tables
|
|
||||||
|
|
||||||
@mixin table-row-variant($state, $background, $border: null) {
|
|
||||||
// Exact selectors below required to override `.table-striped` and prevent
|
|
||||||
// inheritance to nested tables.
|
|
||||||
.table-#{$state} {
|
|
||||||
&,
|
|
||||||
> th,
|
|
||||||
> td {
|
|
||||||
background-color: $background;
|
|
||||||
}
|
|
||||||
|
|
||||||
@if $border != null {
|
|
||||||
th,
|
|
||||||
td,
|
|
||||||
thead th,
|
|
||||||
tbody + tbody {
|
|
||||||
border-color: $border;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hover states for `.table-hover`
|
|
||||||
// Note: this is not available for cells or rows within `thead` or `tfoot`.
|
|
||||||
.table-hover {
|
|
||||||
$hover-background: darken($background, 5%);
|
|
||||||
|
|
||||||
.table-#{$state} {
|
|
||||||
@include hover() {
|
|
||||||
background-color: $hover-background;
|
|
||||||
|
|
||||||
> td,
|
|
||||||
> th {
|
|
||||||
background-color: $hover-background;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
// scss-docs-start table-variant
|
||||||
|
@mixin table-variant($state, $background) {
|
||||||
|
.table-#{$state} {
|
||||||
|
$color: color-contrast(opaque($body-bg, $background));
|
||||||
|
$hover-bg: mix($color, $background, percentage($table-hover-bg-factor));
|
||||||
|
$striped-bg: mix($color, $background, percentage($table-striped-bg-factor));
|
||||||
|
$active-bg: mix($color, $background, percentage($table-active-bg-factor));
|
||||||
|
$table-border-color: mix($color, $background, percentage($table-border-factor));
|
||||||
|
|
||||||
|
--#{$prefix}table-color: #{$color};
|
||||||
|
--#{$prefix}table-bg: #{$background};
|
||||||
|
--#{$prefix}table-border-color: #{$table-border-color};
|
||||||
|
--#{$prefix}table-striped-bg: #{$striped-bg};
|
||||||
|
--#{$prefix}table-striped-color: #{color-contrast($striped-bg)};
|
||||||
|
--#{$prefix}table-active-bg: #{$active-bg};
|
||||||
|
--#{$prefix}table-active-color: #{color-contrast($active-bg)};
|
||||||
|
--#{$prefix}table-hover-bg: #{$hover-bg};
|
||||||
|
--#{$prefix}table-hover-color: #{color-contrast($hover-bg)};
|
||||||
|
|
||||||
|
color: var(--#{$prefix}table-color);
|
||||||
|
border-color: var(--#{$prefix}table-border-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// scss-docs-end table-variant
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue