1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-01-23 05:35:21 +00:00

update bootstrap&bootswatch 5.0.2 -> 5.2.2. Seperate bootswatch overrides for future update easiness

This commit is contained in:
catborise 2022-11-04 18:49:41 +03:00
parent 1348679997
commit e3fb820b50
175 changed files with 3120 additions and 1823 deletions

View file

@ -21,7 +21,7 @@ def appsettings(request):
sass_dir = AppSettings.objects.get(key="SASS_DIR") sass_dir = AppSettings.objects.get(key="SASS_DIR")
bootstrap_theme = AppSettings.objects.get(key="BOOTSTRAP_THEME") bootstrap_theme = AppSettings.objects.get(key="BOOTSTRAP_THEME")
try: try:
themes_list = os.listdir(sass_dir.value + "/wvc-theme") themes_list = os.listdir(sass_dir.value + "/wvc-themes")
except FileNotFoundError as err: except FileNotFoundError as err:
messages.error(request, err) messages.error(request, err)
addlogmsg(request.user.username, "-", "", err) addlogmsg(request.user.username, "-", "", err)
@ -50,11 +50,11 @@ def appsettings(request):
if "BOOTSTRAP_THEME" in request.POST: if "BOOTSTRAP_THEME" in request.POST:
theme = request.POST.get("BOOTSTRAP_THEME", "") theme = request.POST.get("BOOTSTRAP_THEME", "")
scss_var = f"@import '{sass_dir.value}/wvc-theme/{theme}/variables';" scss_var = f"@import '{sass_dir.value}/wvc-themes/{theme}/variables';"
# scss_boot = f"@import '{sass_dir.value}/bootstrap/bootstrap.scss';" # scss_boot = f"@import '{sass_dir.value}/bootstrap/bootstrap.scss';"
scss_boot = f"@import '{sass_dir.value}/bootstrap-overrides.scss';" scss_boot = f"@import '{sass_dir.value}/bootstrap-overrides.scss';"
scss_bootswatch = ( scss_bootswatch = (
f"@import '{sass_dir.value}/wvc-theme/{theme}/bootswatch';" f"@import '{sass_dir.value}/wvc-themes/{theme}/bootswatch';"
) )
try: try:

View file

@ -1,7 +1,7 @@
/*! /*!
* Bootstrap v5.0.2 (https://getbootstrap.com/) * Bootstrap v5.2.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -9,54 +9,60 @@
/*! /*!
* Bootstrap v5.0.2 (https://getbootstrap.com/) * Bootstrap v5.2.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
// scss-docs-start import-stack @import "bootstrap/mixins/banner";
// Configuration @include bsBanner("");
@import "bootstrap/functions";
@import "bootstrap/variables";
@import "bootstrap/mixins";
@import "bootstrap/utilities";
// Layout & components
@import "bootstrap/root";
@import "bootstrap/reboot";
@import "bootstrap/type";
@import "bootstrap/images";
@import "bootstrap/containers";
@import "bootstrap/grid";
@import "bootstrap/tables";
@import "bootstrap/forms";
@import "bootstrap/buttons";
@import "bootstrap/transitions";
@import "bootstrap/dropdown";
@import "bootstrap/button-group";
@import "bootstrap/nav";
@import "bootstrap/navbar";
@import "bootstrap/card";
@import "bootstrap/accordion";
@import "bootstrap/breadcrumb";
@import "bootstrap/pagination";
@import "bootstrap/badge";
@import "bootstrap/alert";
@import "bootstrap/progress";
@import "bootstrap/list-group";
@import "bootstrap/close";
@import "bootstrap/toasts";
@import "bootstrap/modal";
@import "bootstrap/tooltip";
@import "bootstrap/popover";
@import "bootstrap/carousel";
@import "bootstrap/spinners";
@import "bootstrap/offcanvas";
// Helpers // scss-docs-start import-stack
@import "bootstrap/helpers"; // Configuration
@import "bootstrap/functions";
@import "bootstrap/variables";
@import "bootstrap/maps";
@import "bootstrap/mixins";
@import "bootstrap/utilities";
// Utilities // Layout & components
@import "bootstrap/utilities/api"; @import "bootstrap/root";
// scss-docs-end import-stack @import "bootstrap/reboot";
@import "bootstrap/type";
@import "bootstrap/images";
@import "bootstrap/containers";
@import "bootstrap/grid";
@import "bootstrap/tables";
@import "bootstrap/forms";
@import "bootstrap/buttons";
@import "bootstrap/transitions";
@import "bootstrap/dropdown";
@import "bootstrap/button-group";
@import "bootstrap/nav";
@import "bootstrap/navbar";
@import "bootstrap/card";
@import "bootstrap/accordion";
@import "bootstrap/breadcrumb";
@import "bootstrap/pagination";
@import "bootstrap/badge";
@import "bootstrap/alert";
@import "bootstrap/progress";
@import "bootstrap/list-group";
@import "bootstrap/close";
@import "bootstrap/toasts";
@import "bootstrap/modal";
@import "bootstrap/tooltip";
@import "bootstrap/popover";
@import "bootstrap/carousel";
@import "bootstrap/spinners";
@import "bootstrap/offcanvas";
@import "bootstrap/placeholders";
// Helpers
@import "bootstrap/helpers";
// Utilities
@import "bootstrap/utilities/api";
// scss-docs-end import-stack

View file

@ -2,43 +2,70 @@
// Base styles // 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 { .accordion-button {
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
padding: $accordion-button-padding-y $accordion-button-padding-x; padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x);
@include font-size($font-size-base); @include font-size($font-size-base);
color: $accordion-button-color; color: var(--#{$prefix}accordion-btn-color);
text-align: left; // Reset button style text-align: left; // Reset button style
background-color: $accordion-button-bg; background-color: var(--#{$prefix}accordion-btn-bg);
border: 0; border: 0;
@include border-radius(0); @include border-radius(0);
overflow-anchor: none; overflow-anchor: none;
@include transition($accordion-transition); @include transition(var(--#{$prefix}accordion-transition));
&:not(.collapsed) { &:not(.collapsed) {
color: $accordion-button-active-color; color: var(--#{$prefix}accordion-active-color);
background-color: $accordion-button-active-bg; background-color: var(--#{$prefix}accordion-active-bg);
box-shadow: inset 0 ($accordion-border-width * -1) 0 $accordion-border-color; box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
&::after { &::after {
background-image: escape-svg($accordion-button-active-icon); background-image: var(--#{$prefix}accordion-btn-active-icon);
transform: $accordion-icon-transform; transform: var(--#{$prefix}accordion-btn-icon-transform);
} }
} }
// Accordion icon // Accordion icon
&::after { &::after {
flex-shrink: 0; flex-shrink: 0;
width: $accordion-icon-width; width: var(--#{$prefix}accordion-btn-icon-width);
height: $accordion-icon-width; height: var(--#{$prefix}accordion-btn-icon-width);
margin-left: auto; margin-left: auto;
content: ""; content: "";
background-image: escape-svg($accordion-button-icon); background-image: var(--#{$prefix}accordion-btn-icon);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: $accordion-icon-width; background-size: var(--#{$prefix}accordion-btn-icon-width);
@include transition($accordion-icon-transition); @include transition(var(--#{$prefix}accordion-btn-icon-transition));
} }
&:hover { &:hover {
@ -47,9 +74,9 @@
&:focus { &:focus {
z-index: 3; z-index: 3;
border-color: $accordion-button-focus-border-color; border-color: var(--#{$prefix}accordion-btn-focus-border-color);
outline: 0; outline: 0;
box-shadow: $accordion-button-focus-box-shadow; box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow);
} }
} }
@ -58,14 +85,15 @@
} }
.accordion-item { .accordion-item {
background-color: $accordion-bg; color: var(--#{$prefix}accordion-color);
border: $accordion-border-width solid $accordion-border-color; background-color: var(--#{$prefix}accordion-bg);
border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color);
&:first-of-type { &:first-of-type {
@include border-top-radius($accordion-border-radius); @include border-top-radius(var(--#{$prefix}accordion-border-radius));
.accordion-button { .accordion-button {
@include border-top-radius($accordion-inner-border-radius); @include border-top-radius(var(--#{$prefix}accordion-inner-border-radius));
} }
} }
@ -75,22 +103,22 @@
// Only set a border-radius on the last item if the accordion is collapsed // Only set a border-radius on the last item if the accordion is collapsed
&:last-of-type { &:last-of-type {
@include border-bottom-radius($accordion-border-radius); @include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
.accordion-button { .accordion-button {
&.collapsed { &.collapsed {
@include border-bottom-radius($accordion-inner-border-radius); @include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius));
} }
} }
.accordion-collapse { .accordion-collapse {
@include border-bottom-radius($accordion-border-radius); @include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
} }
} }
} }
.accordion-body { .accordion-body {
padding: $accordion-body-padding-y $accordion-body-padding-x; padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x);
} }
@ -112,7 +140,10 @@
&:last-child { border-bottom: 0; } &:last-child { border-bottom: 0; }
.accordion-button { .accordion-button {
&,
&.collapsed {
@include border-radius(0); @include border-radius(0);
} }
} }
}
} }

View file

@ -3,11 +3,24 @@
// //
.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};
// 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
@ -47,6 +60,7 @@
$alert-background: shift-color($value, $alert-bg-scale); $alert-background: shift-color($value, $alert-bg-scale);
$alert-border: shift-color($value, $alert-border-scale); $alert-border: shift-color($value, $alert-border-scale);
$alert-color: shift-color($value, $alert-color-scale); $alert-color: shift-color($value, $alert-color-scale);
@if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) { @if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) {
$alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale)); $alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
} }

View file

@ -4,16 +4,25 @@
// `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: $badge-color; 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 gradient-bg(); @include gradient-bg();
// Empty badges collapse automatically // Empty badges collapse automatically

View file

@ -1,28 +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-x; 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-x; padding-right: var(--#{$prefix}breadcrumb-item-padding-x);
color: $breadcrumb-divider-color; color: var(--#{$prefix}breadcrumb-divider-color);
content: var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"}; content: var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
} }
} }
&.active { &.active {
color: $breadcrumb-active-color; color: var(--#{$prefix}breadcrumb-item-active-color);
} }
} }

View file

@ -34,14 +34,17 @@
} }
.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: -$btn-border-width;
} }
// 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-end-radius(0); @include border-end-radius(0);
} }

View file

@ -3,49 +3,112 @@
// //
.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: #{$body-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);
line-height: $btn-line-height; @include font-size(var(--#{$prefix}btn-font-size));
color: $body-color; 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); 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-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);
&:hover { &:hover {
color: $body-color; color: var(--#{$prefix}btn-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null); text-decoration: if($link-hover-decoration == underline, none, null);
background-color: var(--#{$prefix}btn-hover-bg);
border-color: var(--#{$prefix}btn-hover-border-color);
} }
.btn-check: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);
}
}
.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 + &, .btn-check:checked + &,
.btn-check:active + &, :not(.btn-check) + &:active,
&:active, &:first-child:active,
&.active { &.active,
@include box-shadow($btn-active-box-shadow); &.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 { &:focus-visible {
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow); // 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 & { fieldset:disabled & {
color: var(--#{$prefix}btn-disabled-color);
pointer-events: none; pointer-events: none;
opacity: $btn-disabled-opacity; 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);
} }
} }
@ -58,8 +121,28 @@
// scss-docs-start btn-variant-loops // 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 {
@ -76,22 +159,35 @@
// 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: $btn-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: none;
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb(mix(color-contrast($primary), $primary, 15%))};
text-decoration: $link-decoration; text-decoration: $link-decoration;
@if $enable-gradients {
background-image: none;
}
&:hover,
&:focus-visible {
text-decoration: $link-hover-decoration;
}
&:focus-visible {
color: var(--#{$prefix}btn-color);
}
&:hover { &:hover {
color: $btn-link-hover-color; color: var(--#{$prefix}btn-hover-color);
text-decoration: $link-hover-decoration;
}
&:focus {
text-decoration: $link-hover-decoration;
}
&:disabled,
&.disabled {
color: $btn-link-disabled-color;
} }
// No need for an active state here // No need for an active state here

View file

@ -3,16 +3,37 @@
// //
.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-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);
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 +46,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,16 +67,16 @@
// 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;
padding: $card-spacer-y $card-spacer-x; padding: var(--#{$prefix}card-spacer-y) var(--#{$prefix}card-spacer-x);
color: $card-color; color: var(--#{$prefix}card-color);
} }
.card-title { .card-title {
margin-bottom: $card-title-spacer-y; margin-bottom: var(--#{$prefix}card-title-spacer-y);
} }
.card-subtitle { .card-subtitle {
margin-top: -$card-title-spacer-y * .5; margin-top: calc(-.5 * var(--#{$prefix}card-title-spacer-y)); // stylelint-disable-line function-disallowed-list
margin-bottom: 0; margin-bottom: 0;
} }
@ -65,11 +86,11 @@
.card-link { .card-link {
&: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);
} }
} }
@ -78,25 +99,25 @@
// //
.card-header { .card-header {
padding: $card-cap-padding-y $card-cap-padding-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-cap-padding-y $card-cap-padding-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));
} }
} }
@ -106,22 +127,20 @@
// //
.card-header-tabs { .card-header-tabs {
margin-right: -$card-cap-padding-x * .5; margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-bottom: -$card-cap-padding-y; margin-bottom: calc(-1 * var(--#{$prefix}card-cap-padding-y)); // stylelint-disable-line function-disallowed-list
margin-left: -$card-cap-padding-x * .5; margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
border-bottom: 0; border-bottom: 0;
@if $nav-tabs-link-active-bg != $card-bg {
.nav-link.active { .nav-link.active {
background-color: $card-bg; background-color: var(--#{$prefix}card-bg);
border-bottom-color: $card-bg; border-bottom-color: var(--#{$prefix}card-bg);
}
} }
} }
.card-header-pills { .card-header-pills {
margin-right: -$card-cap-padding-x * .5; margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-left: -$card-cap-padding-x * .5; margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
} }
// Card image // Card image
@ -131,8 +150,8 @@
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,
@ -143,12 +162,12 @@
.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));
} }
@ -160,7 +179,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) {

View file

@ -1,4 +1,4 @@
// transparent background and border properties included for button version. // Transparent background and border properties included 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

View file

@ -2,7 +2,7 @@
// //
// Set the container width, and override it for fixed navbars in media queries. // Set the container width, and override it for fixed navbars in media queries.
@if $enable-grid-classes { @if $enable-container-classes {
// Single container class with breakpoint max-widths // Single container class with breakpoint max-widths
.container, .container,
// 100% wide container at all breakpoints // 100% wide container at all breakpoints

View file

@ -2,7 +2,9 @@
.dropup, .dropup,
.dropend, .dropend,
.dropdown, .dropdown,
.dropstart { .dropstart,
.dropup-center,
.dropdown-center {
position: relative; position: relative;
} }
@ -15,26 +17,67 @@
// 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;
z-index: $zindex-dropdown; z-index: var(--#{$prefix}dropdown-zindex);
display: none; // none by default, but block on "open" of the menu display: none; // none by default, but block on "open" of the menu
min-width: $dropdown-min-width; min-width: var(--#{$prefix}dropdown-min-width);
padding: $dropdown-padding-y $dropdown-padding-x; padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x);
margin: 0; // Override default margin of ul margin: 0; // Override default margin of ul
@include font-size($dropdown-font-size); @include font-size(var(--#{$prefix}dropdown-font-size));
color: $dropdown-color; color: var(--#{$prefix}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] { &[data-bs-popper] {
top: 100%; top: 100%;
left: 0; left: 0;
margin-top: $dropdown-spacer; 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));
}
} }
} }
@ -74,7 +117,7 @@
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 {
@ -88,7 +131,7 @@
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 {
@ -105,7 +148,7 @@
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 {
@ -120,9 +163,10 @@
// Dividers (basically an `<hr>`) within the dropdown // Dividers (basically an `<hr>`) within the dropdown
.dropdown-divider { .dropdown-divider {
height: 0; height: 0;
margin: $dropdown-divider-margin-y 0; margin: var(--#{$prefix}dropdown-divider-margin-y) 0;
overflow: hidden; overflow: hidden;
border-top: 1px solid $dropdown-divider-bg; 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
@ -131,45 +175,33 @@
.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
// Prevent dropdown overflow if there's no padding
// See https://github.com/twbs/bootstrap/pull/27703
@if $dropdown-padding-y == 0 {
&:first-child {
@include border-top-radius($dropdown-inner-border-radius);
}
&:last-child {
@include border-bottom-radius($dropdown-inner-border-radius);
}
}
&:hover, &:hover,
&:focus { &:focus {
color: $dropdown-link-hover-color; color: var(--#{$prefix}dropdown-link-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null); text-decoration: if($link-hover-decoration == underline, none, null);
@include gradient-bg($dropdown-link-hover-bg); @include gradient-bg(var(--#{$prefix}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
@ -184,57 +216,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 // Dark dropdowns
.dropdown-menu-dark { .dropdown-menu-dark {
color: $dropdown-dark-color; // scss-docs-start dropdown-dark-css-vars
background-color: $dropdown-dark-bg; --#{$prefix}dropdown-color: #{$dropdown-dark-color};
border-color: $dropdown-dark-border-color; --#{$prefix}dropdown-bg: #{$dropdown-dark-bg};
@include box-shadow($dropdown-dark-box-shadow); --#{$prefix}dropdown-border-color: #{$dropdown-dark-border-color};
--#{$prefix}dropdown-box-shadow: #{$dropdown-dark-box-shadow};
.dropdown-item { --#{$prefix}dropdown-link-color: #{$dropdown-dark-link-color};
color: $dropdown-dark-link-color; --#{$prefix}dropdown-link-hover-color: #{$dropdown-dark-link-hover-color};
--#{$prefix}dropdown-divider-bg: #{$dropdown-dark-divider-bg};
&:hover, --#{$prefix}dropdown-link-hover-bg: #{$dropdown-dark-link-hover-bg};
&:focus { --#{$prefix}dropdown-link-active-color: #{$dropdown-dark-link-active-color};
color: $dropdown-dark-link-hover-color; --#{$prefix}dropdown-link-active-bg: #{$dropdown-dark-link-active-bg};
@include gradient-bg($dropdown-dark-link-hover-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
&.active,
&:active {
color: $dropdown-dark-link-active-color;
@include gradient-bg($dropdown-dark-link-active-bg);
}
&.disabled,
&:disabled {
color: $dropdown-dark-link-disabled-color;
}
}
.dropdown-divider {
border-color: $dropdown-dark-divider-bg;
}
.dropdown-item-text {
color: $dropdown-dark-link-color;
}
.dropdown-header {
color: $dropdown-dark-header-color;
}
} }

View file

@ -32,6 +32,47 @@
} }
} }
// 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. // Internal Bootstrap function to turn maps into its negative variant.
// It prefixes the keys with `n` and makes the value negative. // It prefixes the keys with `n` and makes the value negative.
@function negativify-map($map) { @function negativify-map($map) {
@ -55,10 +96,20 @@
@return $result; @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
@ -126,9 +177,9 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
@return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05)); @return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
} }
// Return WCAG2.0 relative luminance // Return WCAG2.1 relative luminance
// See https://www.w3.org/WAI/GL/wiki/Relative_luminance // See https://www.w3.org/TR/WCAG/#dfn-relative-luminance
// See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests // See https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
@function luminance($color) { @function luminance($color) {
$rgb: ( $rgb: (
"r": red($color), "r": red($color),
@ -181,14 +232,6 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
@return $value1 + $value2; @return $value1 + $value2;
} }
@if type-of($value1) != number {
$value1: unquote("(") + $value1 + unquote(")");
}
@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);
} }
@ -209,10 +252,6 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
@return $value1 - $value2; @return $value1 - $value2;
} }
@if type-of($value1) != number {
$value1: unquote("(") + $value1 + unquote(")");
}
@if type-of($value2) != number { @if type-of($value2) != number {
$value2: unquote("(") + $value2 + unquote(")"); $value2: unquote("(") + $value2 + unquote(")");
} }

View file

@ -12,6 +12,17 @@
} }
} }
@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
// //

View file

@ -1,7 +1,10 @@
@import "helpers/clearfix"; @import "helpers/clearfix";
@import "helpers/color-bg";
@import "helpers/colored-links"; @import "helpers/colored-links";
@import "helpers/ratio"; @import "helpers/ratio";
@import "helpers/position"; @import "helpers/position";
@import "helpers/stacks";
@import "helpers/visually-hidden"; @import "helpers/visually-hidden";
@import "helpers/stretched-link"; @import "helpers/stretched-link";
@import "helpers/text-truncation"; @import "helpers/text-truncation";
@import "helpers/vr";

View file

@ -3,27 +3,46 @@
// 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-group-numbered {
list-style-type: none; list-style-type: none;
counter-reset: section; counter-reset: section;
> li::before { > .list-group-item::before {
// Increments only this instance of the section counter // Increments only this instance of the section counter
content: counters(section, ".") ". "; content: counters(section, ".") ". ";
counter-increment: section; counter-increment: section;
} }
} }
// Interactive list items // Interactive list items
// //
// Use anchor or button elements instead of `li`s or `div`s to create interactive // Use anchor or button elements instead of `li`s or `div`s to create interactive
@ -31,25 +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
&:hover, &:hover,
&:focus { &: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.
@ -57,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);
@ -73,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.
@ -109,13 +127,13 @@
flex-direction: row; flex-direction: row;
> .list-group-item { > .list-group-item {
&:first-child { &:first-child:not(:last-child) {
@include border-bottom-start-radius($list-group-border-radius); @include border-bottom-start-radius(var(--#{$prefix}list-group-border-radius));
@include border-top-end-radius(0); @include border-top-end-radius(0);
} }
&:last-child { &:last-child:not(:first-child) {
@include border-top-end-radius($list-group-border-radius); @include border-top-end-radius(var(--#{$prefix}list-group-border-radius));
@include border-bottom-start-radius(0); @include border-bottom-start-radius(0);
} }
@ -124,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);
} }
} }
} }
@ -147,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;

54
dev/scss/bootstrap/_maps.scss Executable file
View file

@ -0,0 +1,54 @@
// 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
// 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;
// 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;
// scss-docs-end utilities-bg-colors
// scss-docs-start utilities-border-colors
$utilities-border: map-merge(
$utilities-colors,
(
"white": to-rgb($white)
)
) !default;
$utilities-border-colors: map-loop($utilities-border, rgba-css-var, "$key", "border") !default;
// scss-docs-end utilities-border-colors
$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
$gutters: $spacers !default;

View file

@ -22,6 +22,7 @@
// Components // Components
@import "mixins/alert"; @import "mixins/alert";
@import "mixins/backdrop";
@import "mixins/buttons"; @import "mixins/buttons";
@import "mixins/caret"; @import "mixins/caret";
@import "mixins/pagination"; @import "mixins/pagination";

View file

@ -1,3 +1,5 @@
// 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
@ -6,10 +8,34 @@
// 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%;
@ -27,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;
@ -47,7 +73,7 @@
} }
.modal-dialog-scrollable { .modal-dialog-scrollable {
height: subtract(100%, $modal-dialog-margin * 2); height: calc(100% - var(--#{$prefix}modal-margin) * 2);
.modal-content { .modal-content {
max-height: 100%; max-height: 100%;
@ -62,7 +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);
} }
// Actual modal // Actual modal
@ -72,30 +98,26 @@
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
@ -105,20 +127,20 @@
flex-shrink: 0; flex-shrink: 0;
align-items: center; 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));
.btn-close { .btn-close {
padding: ($modal-header-padding-y * .5) ($modal-header-padding-x * .5); padding: calc(var(--#{$prefix}modal-header-padding-y) * .5) calc(var(--#{$prefix}modal-header-padding-x) * .5);
margin: ($modal-header-padding-y * -.5) ($modal-header-padding-x * -.5) ($modal-header-padding-y * -.5) auto; 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;
} }
} }
// 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
@ -128,60 +150,59 @@
// 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-wrap: wrap;
flex-shrink: 0; flex-shrink: 0;
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 * .5; 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 * .5; margin: calc(var(--#{$prefix}modal-footer-gap) * .5); // Todo in v6: replace with gap on parent class
} }
} }
// 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 {
height: subtract(100%, $modal-dialog-margin-y-sm-up * 2); --#{$prefix}modal-width: #{$modal-sm};
} }
.modal-dialog-centered {
min-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
}
.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 // scss-docs-start modal-fullscreen-loop
@ -202,17 +223,14 @@
@include border-radius(0); @include border-radius(0);
} }
.modal-header { .modal-header,
.modal-footer {
@include border-radius(0); @include border-radius(0);
} }
.modal-body { .modal-body {
overflow-y: auto; overflow-y: auto;
} }
.modal-footer {
@include border-radius(0);
}
} }
} }
} }

View file

@ -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,22 +23,22 @@
.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($nav-link-font-size); @include font-size(var(--#{$prefix}nav-link-font-size));
font-weight: $nav-link-font-weight; font-weight: var(--#{$prefix}nav-link-font-weight);
color: $nav-link-color; color: var(--#{$prefix}nav-link-color);
text-decoration: if($link-decoration == none, null, none); text-decoration: if($link-decoration == none, null, none);
@include transition($nav-link-transition); @include transition($nav-link-transition);
&:hover, &:hover,
&:focus { &:focus {
color: $nav-link-hover-color; color: var(--#{$prefix}nav-link-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null); text-decoration: if($link-hover-decoration == underline, none, null);
} }
// Disabled state lightens text // Disabled state lightens text
&.disabled { &.disabled {
color: $nav-link-disabled-color; color: var(--#{$prefix}nav-link-disabled-color);
pointer-events: none; pointer-events: none;
cursor: default; cursor: default;
} }
@ -39,23 +49,34 @@
// //
.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
background: none; background: none;
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));
&:hover, &:hover,
&:focus { &:focus {
border-color: $nav-tabs-link-hover-border-color;
// Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link // Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link
isolation: isolate; isolation: isolate;
border-color: var(--#{$prefix}nav-tabs-link-hover-border-color);
} }
&.disabled { &.disabled,
color: $nav-link-disabled-color; &:disabled {
color: var(--#{$prefix}nav-link-disabled-color);
background-color: transparent; background-color: transparent;
border-color: transparent; border-color: transparent;
} }
@ -63,14 +84,14 @@
.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);
} }
@ -82,16 +103,28 @@
// //
.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 {
background: none; background: none;
border: 0; border: 0;
@include border-radius($nav-pills-border-radius); @include border-radius(var(--#{$prefix}nav-pills-border-radius));
&:disabled {
color: var(--#{$prefix}nav-link-disabled-color);
background-color: transparent;
border-color: transparent;
}
} }
.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);
@include gradient-bg($nav-pills-link-active-bg); @include gradient-bg(var(--#{$prefix}nav-pills-link-active-bg));
} }
} }

View file

@ -1,29 +1,38 @@
// Contents
//
// Navbar
// Navbar brand
// Navbar nav
// Navbar text
// 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-top: $navbar-padding-y; padding: var(--#{$prefix}navbar-padding-y) var(--#{$prefix}navbar-padding-x);
padding-right: $navbar-padding-x; // default: null
padding-bottom: $navbar-padding-y;
padding-left: $navbar-padding-x; // default: null
@include gradient-bg(); @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
@ -54,15 +63,17 @@
// Used for brand, project, or site names. // Used for brand, project, or site names.
.navbar-brand { .navbar-brand {
padding-top: $navbar-brand-padding-y; padding-top: var(--#{$prefix}navbar-brand-padding-y);
padding-bottom: $navbar-brand-padding-y; padding-bottom: var(--#{$prefix}navbar-brand-padding-y);
margin-right: $navbar-brand-margin-end; margin-right: var(--#{$prefix}navbar-brand-margin-end);
@include font-size($navbar-brand-font-size); @include font-size(var(--#{$prefix}navbar-brand-font-size));
color: var(--#{$prefix}navbar-brand-color);
text-decoration: if($link-decoration == none, null, none); text-decoration: if($link-decoration == none, null, none);
white-space: nowrap; white-space: nowrap;
&:hover, &:hover,
&:focus { &:focus {
color: var(--#{$prefix}navbar-brand-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null); text-decoration: if($link-hover-decoration == underline, none, null);
} }
} }
@ -73,15 +84,25 @@
// 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;
margin-bottom: 0; margin-bottom: 0;
list-style: none; list-style: none;
.nav-link { .show > .nav-link,
padding-right: 0; .nav-link.active {
padding-left: 0; color: var(--#{$prefix}navbar-active-color);
} }
.dropdown-menu { .dropdown-menu {
@ -97,6 +118,13 @@
.navbar-text { .navbar-text {
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);
}
} }
@ -118,13 +146,14 @@
// 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($navbar-toggler-transition); @include transition(var(--#{$prefix}navbar-toggler-transition));
&:hover { &:hover {
text-decoration: none; text-decoration: none;
@ -133,7 +162,7 @@
&:focus { &:focus {
text-decoration: none; text-decoration: none;
outline: 0; outline: 0;
box-shadow: 0 0 0 $navbar-toggler-focus-width; box-shadow: 0 0 0 var(--#{$prefix}navbar-toggler-focus-width);
} }
} }
@ -144,13 +173,14 @@
width: 1.5em; width: 1.5em;
height: 1.5em; height: 1.5em;
vertical-align: middle; vertical-align: middle;
background-image: var(--#{$prefix}navbar-toggler-icon-bg);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: 100%; background-size: 100%;
} }
.navbar-nav-scroll { .navbar-nav-scroll {
max-height: var(--#{$variable-prefix}scroll-height, 75vh); max-height: var(--#{$prefix}scroll-height, 75vh);
overflow-y: auto; overflow-y: auto;
} }
@ -176,8 +206,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);
} }
} }
@ -193,114 +223,56 @@
.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 // 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;
&:hover,
&:focus {
color: $navbar-light-brand-hover-color;
}
}
.navbar-nav {
.nav-link {
color: $navbar-light-color;
&:hover,
&:focus {
color: $navbar-light-hover-color;
}
&.disabled {
color: $navbar-light-disabled-color;
}
}
.show > .nav-link,
.nav-link.active {
color: $navbar-light-active-color;
}
}
.navbar-toggler {
color: $navbar-light-color;
border-color: $navbar-light-toggler-border-color;
}
.navbar-toggler-icon {
background-image: escape-svg($navbar-light-toggler-icon-bg);
}
.navbar-text {
color: $navbar-light-color;
a,
a:hover,
a:focus {
color: $navbar-light-active-color;
}
}
} }
// White links against a dark background
.navbar-dark { .navbar-dark {
.navbar-brand { // scss-docs-start navbar-dark-css-vars
color: $navbar-dark-brand-color; --#{$prefix}navbar-color: #{$navbar-dark-color};
--#{$prefix}navbar-hover-color: #{$navbar-dark-hover-color};
&:hover, --#{$prefix}navbar-disabled-color: #{$navbar-dark-disabled-color};
&:focus { --#{$prefix}navbar-active-color: #{$navbar-dark-active-color};
color: $navbar-dark-brand-hover-color; --#{$prefix}navbar-brand-color: #{$navbar-dark-brand-color};
} --#{$prefix}navbar-brand-hover-color: #{$navbar-dark-brand-hover-color};
} --#{$prefix}navbar-toggler-border-color: #{$navbar-dark-toggler-border-color};
--#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-dark-toggler-icon-bg)};
.navbar-nav { // scss-docs-end navbar-dark-css-vars
.nav-link {
color: $navbar-dark-color;
&:hover,
&:focus {
color: $navbar-dark-hover-color;
}
&.disabled {
color: $navbar-dark-disabled-color;
}
}
.show > .nav-link,
.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,
a:hover,
a:focus {
color: $navbar-dark-active-color;
}
}
} }

View file

@ -1,30 +1,134 @@
.offcanvas { // 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};
// 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; position: fixed;
bottom: 0; bottom: 0;
z-index: $zindex-offcanvas; z-index: var(--#{$prefix}offcanvas-zindex);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-width: 100%; max-width: 100%;
color: $offcanvas-color; color: var(--#{$prefix}offcanvas-color);
visibility: hidden; visibility: hidden;
background-color: $offcanvas-bg-color; background-color: var(--#{$prefix}offcanvas-bg);
background-clip: padding-box; background-clip: padding-box;
outline: 0; outline: 0;
@include box-shadow($offcanvas-box-shadow); @include box-shadow(var(--#{$prefix}offcanvas-box-shadow));
@include transition(transform $offcanvas-transition-duration ease-in-out); @include transition(transform $offcanvas-transition-duration ease-in-out);
&.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 { .offcanvas-header {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: $offcanvas-padding-y $offcanvas-padding-x; padding: var(--#{$prefix}offcanvas-padding-y) var(--#{$prefix}offcanvas-padding-x);
.btn-close { .btn-close {
padding: ($offcanvas-padding-y * .5) ($offcanvas-padding-x * .5); padding: calc(var(--#{$prefix}offcanvas-padding-y) * .5) calc(var(--#{$prefix}offcanvas-padding-x) * .5);
margin-top: $offcanvas-padding-y * -.5; margin-top: calc(-.5 * var(--#{$prefix}offcanvas-padding-y));
margin-right: $offcanvas-padding-x * -.5; margin-right: calc(-.5 * var(--#{$prefix}offcanvas-padding-x));
margin-bottom: $offcanvas-padding-y * -.5; margin-bottom: calc(-.5 * var(--#{$prefix}offcanvas-padding-y));
} }
} }
@ -35,45 +139,6 @@
.offcanvas-body { .offcanvas-body {
flex-grow: 1; flex-grow: 1;
padding: $offcanvas-padding-y $offcanvas-padding-x; padding: var(--#{$prefix}offcanvas-padding-y) var(--#{$prefix}offcanvas-padding-x);
overflow-y: auto; overflow-y: auto;
} }
.offcanvas-start {
top: 0;
left: 0;
width: $offcanvas-horizontal-width;
border-right: $offcanvas-border-width solid $offcanvas-border-color;
transform: translateX(-100%);
}
.offcanvas-end {
top: 0;
right: 0;
width: $offcanvas-horizontal-width;
border-left: $offcanvas-border-width solid $offcanvas-border-color;
transform: translateX(100%);
}
.offcanvas-top {
top: 0;
right: 0;
left: 0;
height: $offcanvas-vertical-height;
max-height: 100%;
border-bottom: $offcanvas-border-width solid $offcanvas-border-color;
transform: translateY(-100%);
}
.offcanvas-bottom {
right: 0;
left: 0;
height: $offcanvas-vertical-height;
max-height: 100%;
border-top: $offcanvas-border-width solid $offcanvas-border-color;
transform: translateY(100%);
}
.offcanvas.show {
transform: none;
}

View file

@ -1,4 +1,27 @@
.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();
} }
@ -6,26 +29,44 @@
.page-link { .page-link {
position: relative; position: relative;
display: block; display: block;
color: $pagination-color; padding: var(--#{$prefix}pagination-padding-y) var(--#{$prefix}pagination-padding-x);
@include font-size(var(--#{$prefix}pagination-font-size));
color: var(--#{$prefix}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); @include transition($pagination-transition);
&:hover { &:hover {
z-index: 2; z-index: 2;
color: $pagination-hover-color; color: var(--#{$prefix}pagination-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null); 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: $pagination-focus-color; color: var(--#{$prefix}pagination-focus-color);
background-color: $pagination-focus-bg; 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);
} }
} }
@ -34,18 +75,23 @@
margin-left: $pagination-margin-start; margin-left: $pagination-margin-start;
} }
&.active .page-link { @if $pagination-margin-start == ($pagination-border-width * -1) {
z-index: 3; &:first-child {
color: $pagination-active-color; .page-link {
@include gradient-bg($pagination-active-bg); @include border-start-radius(var(--#{$prefix}pagination-border-radius));
border-color: $pagination-active-border-color; }
} }
&.disabled .page-link { &:last-child {
color: $pagination-disabled-color; .page-link {
pointer-events: none; @include border-end-radius(var(--#{$prefix}pagination-border-radius));
background-color: $pagination-disabled-bg; }
border-color: $pagination-disabled-border-color; }
} @else {
// Add border-radius to all pageLinks in case they have left margin
.page-link {
@include border-radius(var(--#{$prefix}pagination-border-radius));
}
} }
} }
@ -53,7 +99,6 @@
// //
// Sizing // Sizing
// //
@include pagination-size($pagination-padding-y, $pagination-padding-x, null, $pagination-border-radius);
.pagination-lg { .pagination-lg {
@include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $pagination-border-radius-lg); @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $pagination-border-radius-lg);

View file

@ -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%;
}
}

View file

@ -1,27 +1,46 @@
.popover { .popover {
position: absolute; // scss-docs-start popover-css-vars
top: 0; --#{$prefix}popover-zindex: #{$zindex-popover};
left: 0 #{"/* rtl:ignore */"}; --#{$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));
.popover-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);
&::before, &::before,
&::after { &::after {
@ -30,62 +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 {
> .popover-arrow { > .popover-arrow {
bottom: subtract(-$popover-arrow-height, $popover-border-width); bottom: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
&::before,
&::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 * .5) 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 * .5) 0; border-top-color: var(--#{$prefix}popover-bg);
border-top-color: $popover-arrow-color;
} }
} }
} }
/* rtl:begin:ignore */
.bs-popover-end { .bs-popover-end {
> .popover-arrow { > .popover-arrow {
left: subtract(-$popover-arrow-height, $popover-border-width); left: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
width: $popover-arrow-height; width: var(--#{$prefix}popover-arrow-height);
height: $popover-arrow-width; height: var(--#{$prefix}popover-arrow-width);
&::before,
&::after {
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
}
&::before { &::before {
left: 0; left: 0;
border-width: ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5) 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 * .5) $popover-arrow-height ($popover-arrow-width * .5) 0; border-right-color: var(--#{$prefix}popover-bg);
border-right-color: $popover-arrow-color;
} }
} }
} }
/* rtl:end:ignore */
.bs-popover-bottom { .bs-popover-bottom {
> .popover-arrow { > .popover-arrow {
top: subtract(-$popover-arrow-height, $popover-border-width); 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 * .5) $popover-arrow-height ($popover-arrow-width * .5); 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 * .5) $popover-arrow-height ($popover-arrow-width * .5); border-bottom-color: var(--#{$prefix}popover-bg);
border-bottom-color: $popover-arrow-color;
} }
} }
@ -95,33 +127,39 @@
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 * .5; 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);
} }
} }
/* rtl:begin:ignore */
.bs-popover-start { .bs-popover-start {
> .popover-arrow { > .popover-arrow {
right: subtract(-$popover-arrow-height, $popover-border-width); right: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
width: $popover-arrow-height; width: var(--#{$prefix}popover-arrow-height);
height: $popover-arrow-width; height: var(--#{$prefix}popover-arrow-width);
&::before,
&::after {
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
}
&::before { &::before {
right: 0; right: 0;
border-width: ($popover-arrow-width * .5) 0 ($popover-arrow-width * .5) $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 * .5) 0 ($popover-arrow-width * .5) $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 {
&[data-popper-placement^="top"] { &[data-popper-placement^="top"] {
@extend .bs-popover-top; @extend .bs-popover-top;
@ -139,13 +177,13 @@
// 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 $popover-border-color; 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;
@ -153,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);
} }

View file

@ -9,13 +9,24 @@
// scss-docs-end progress-keyframes // scss-docs-end progress-keyframes
.progress { .progress {
// 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
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
@include font-size($progress-font-size); @include font-size(var(--#{$prefix}progress-font-size));
background-color: $progress-bg; background-color: var(--#{$prefix}progress-bg);
@include border-radius($progress-border-radius); @include border-radius(var(--#{$prefix}progress-border-radius));
@include box-shadow($progress-box-shadow); @include box-shadow(var(--#{$prefix}progress-box-shadow));
} }
.progress-bar { .progress-bar {
@ -23,16 +34,16 @@
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);
} }
@if $enable-transitions { @if $enable-transitions {

View file

@ -26,7 +26,9 @@
// null by default, thus nothing is generated. // null by default, thus nothing is generated.
:root { :root {
font-size: $font-size-root; @if $font-size-root != null {
@include font-size(var(--#{$prefix}root-font-size));
}
@if $enable-smooth-scroll { @if $enable-smooth-scroll {
@media (prefers-reduced-motion: no-preference) { @media (prefers-reduced-motion: no-preference) {
@ -43,37 +45,34 @@
// 3. Prevent adjustments of font size after orientation changes in iOS. // 3. Prevent adjustments of font size after orientation changes in iOS.
// 4. Change the default tap highlight to be completely transparent in iOS. // 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: $body-text-align; 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-text-size-adjust: 100%; // 3
-webkit-tap-highlight-color: rgba($black, 0); // 4 -webkit-tap-highlight-color: rgba($black, 0); // 4
} }
// scss-docs-end reboot-body-rules
// Content grouping // Content grouping
// //
// 1. Reset Firefox's gray color // 1. Reset Firefox's gray color
// 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field
hr { hr {
margin: $hr-margin-y 0; margin: $hr-margin-y 0;
color: $hr-color; // 1 color: $hr-color; // 1
background-color: currentColor;
border: 0; border: 0;
border-top: $hr-border-width solid $hr-border-color;
opacity: $hr-opacity; opacity: $hr-opacity;
} }
hr:not([size]) {
height: $hr-height; // 2
}
// Typography // Typography
// //
@ -135,16 +134,14 @@ p {
// Abbreviations // Abbreviations
// //
// 1. Duplicate behavior to the data-bs-* 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, 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. Prevent the text-decoration to be skipped.
abbr[title], abbr[title] {
abbr[data-bs-original-title] { // 1 text-decoration: underline dotted; // 1
text-decoration: underline dotted; // 2 cursor: help; // 2
cursor: help; // 3 text-decoration-skip-ink: none; // 3
text-decoration-skip-ink: none; // 4
} }
@ -220,7 +217,7 @@ small {
mark { mark {
padding: $mark-padding; padding: $mark-padding;
background-color: $mark-bg; background-color: var(--#{$prefix}highlight-bg);
} }
@ -244,11 +241,11 @@ sup { top: -.5em; }
// Links // Links
a { a {
color: $link-color; color: var(--#{$prefix}link-color);
text-decoration: $link-decoration; text-decoration: $link-decoration;
&:hover { &:hover {
color: $link-hover-color; color: var(--#{$prefix}link-hover-color);
text-decoration: $link-hover-decoration; text-decoration: $link-hover-decoration;
} }
} }
@ -275,8 +272,6 @@ kbd,
samp { samp {
font-family: $font-family-code; 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.
direction: ltr #{"/* rtl:ignore */"};
unicode-bidi: bidi-override;
} }
// 1. Remove browser default top margin // 1. Remove browser default top margin
@ -301,7 +296,7 @@ pre {
code { code {
@include font-size($code-font-size); @include font-size($code-font-size);
color: $code-color; color: var(--#{$prefix}code-color);
word-wrap: break-word; word-wrap: break-word;
// Streamline the style when inside anchors to avoid broken underline and more // Streamline the style when inside anchors to avoid broken underline and more
@ -441,11 +436,11 @@ select {
} }
} }
// Remove the dropdown arrow in Chrome from inputs built with datalists. // Remove the dropdown arrow only from text type inputs built with datalists in Chrome.
// See https://stackoverflow.com/a/54997118 // See https://stackoverflow.com/a/54997118
[list]::-webkit-calendar-picker-indicator { [list]:not([type="date"]):not([type="datetime-local"]):not([type="month"]):not([type="week"]):not([type="time"])::-webkit-calendar-picker-indicator {
display: none; 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`
@ -567,16 +562,10 @@ legend {
} }
// Inherit font family and line height for file input buttons // 1. Inherit font family and line height for file input buttons
::file-selector-button {
font: inherit;
}
// 1. Change font properties to `inherit`
// 2. Correct the inability to style clickable types in iOS and Safari. // 2. Correct the inability to style clickable types in iOS and Safari.
::-webkit-file-upload-button { ::file-selector-button {
font: inherit; // 1 font: inherit; // 1
-webkit-appearance: button; // 2 -webkit-appearance: button; // 2
} }

View file

@ -1,16 +1,73 @@
:root { :root {
// Custom variable values only support SassScript inside `#{}`. // 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 {
--#{$variable-prefix}#{$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 {
--#{$variable-prefix}#{$color}: #{$value}; --#{$prefix}#{$color}: #{$value};
} }
// Use `inspect` for lists so that quoted items keep the quotes. @each $color, $value in $theme-colors-rgb {
--#{$prefix}#{$color}-rgb: #{$value};
}
--#{$prefix}white-rgb: #{to-rgb($white)};
--#{$prefix}black-rgb: #{to-rgb($black)};
--#{$prefix}body-color-rgb: #{to-rgb($body-color)};
--#{$prefix}body-bg-rgb: #{to-rgb($body-bg)};
// 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
--#{$variable-prefix}font-sans-serif: #{inspect($font-family-sans-serif)}; --#{$prefix}font-sans-serif: #{inspect($font-family-sans-serif)};
--#{$variable-prefix}font-monospace: #{inspect($font-family-monospace)}; --#{$prefix}font-monospace: #{inspect($font-family-monospace)};
--#{$variable-prefix}gradient: #{$gradient}; --#{$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: #{$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};
--#{$prefix}body-color: #{$body-color};
@if $body-text-align != null {
--#{$prefix}body-text-align: #{$body-text-align};
}
--#{$prefix}body-bg: #{$body-bg};
// scss-docs-end root-body-variables
// 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-2xl: #{$border-radius-2xl};
--#{$prefix}border-radius-pill: #{$border-radius-pill};
// scss-docs-end root-border-var
--#{$prefix}link-color: #{$link-color};
--#{$prefix}link-hover-color: #{$link-hover-color};
--#{$prefix}code-color: #{$code-color};
--#{$prefix}highlight-bg: #{$mark-bg};
} }

View file

@ -2,6 +2,17 @@
// Rotating border // Rotating border
// //
.spinner-grow,
.spinner-border {
display: inline-block;
width: var(--#{$prefix}spinner-width);
height: var(--#{$prefix}spinner-height);
vertical-align: var(--#{$prefix}spinner-vertical-align);
// stylelint-disable-next-line property-disallowed-list
border-radius: 50%;
animation: var(--#{$prefix}spinner-animation-speed) linear infinite var(--#{$prefix}spinner-animation-name);
}
// scss-docs-start spinner-border-keyframes // scss-docs-start spinner-border-keyframes
@keyframes spinner-border { @keyframes spinner-border {
to { transform: rotate(360deg) #{"/* rtl:ignore */"}; } to { transform: rotate(360deg) #{"/* rtl:ignore */"}; }
@ -9,21 +20,25 @@
// scss-docs-end spinner-border-keyframes // scss-docs-end spinner-border-keyframes
.spinner-border { .spinner-border {
display: inline-block; // scss-docs-start spinner-border-css-vars
width: $spinner-width; --#{$prefix}spinner-width: #{$spinner-width};
height: $spinner-height; --#{$prefix}spinner-height: #{$spinner-height};
vertical-align: $spinner-vertical-align; --#{$prefix}spinner-vertical-align: #{$spinner-vertical-align};
border: $spinner-border-width solid currentColor; --#{$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; border-right-color: transparent;
// stylelint-disable-next-line property-disallowed-list
border-radius: 50%;
animation: $spinner-animation-speed linear infinite spinner-border;
} }
.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
} }
// //
@ -43,27 +58,28 @@
// scss-docs-end spinner-grow-keyframes // 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: $spinner-vertical-align; --#{$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: $spinner-animation-speed 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-reduced-motion { @if $enable-reduced-motion {
@media (prefers-reduced-motion: reduce) { @media (prefers-reduced-motion: reduce) {
.spinner-border, .spinner-border,
.spinner-grow { .spinner-grow {
animation-duration: $spinner-animation-speed * 2; --#{$prefix}spinner-animation-speed: #{$spinner-animation-speed * 2};
} }
} }
} }

View file

@ -3,20 +3,22 @@
// //
.table { .table {
--#{$variable-prefix}table-bg: #{$table-bg}; --#{$prefix}table-color: #{$table-color};
--#{$variable-prefix}table-accent-bg: #{$table-accent-bg}; --#{$prefix}table-bg: #{$table-bg};
--#{$variable-prefix}table-striped-color: #{$table-striped-color}; --#{$prefix}table-border-color: #{$table-border-color};
--#{$variable-prefix}table-striped-bg: #{$table-striped-bg}; --#{$prefix}table-accent-bg: #{$table-accent-bg};
--#{$variable-prefix}table-active-color: #{$table-active-color}; --#{$prefix}table-striped-color: #{$table-striped-color};
--#{$variable-prefix}table-active-bg: #{$table-active-bg}; --#{$prefix}table-striped-bg: #{$table-striped-bg};
--#{$variable-prefix}table-hover-color: #{$table-hover-color}; --#{$prefix}table-active-color: #{$table-active-color};
--#{$variable-prefix}table-hover-bg: #{$table-hover-bg}; --#{$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; color: var(--#{$prefix}table-color);
vertical-align: $table-cell-vertical-align; vertical-align: $table-cell-vertical-align;
border-color: $table-border-color; border-color: var(--#{$prefix}table-border-color);
// Target th & td // Target th & td
// We need the child combinator to prevent styles leaking to nested tables which doesn't have a `.table` class. // We need the child combinator to prevent styles leaking to nested tables which doesn't have a `.table` class.
@ -25,9 +27,9 @@
// stylelint-disable-next-line selector-max-universal // stylelint-disable-next-line selector-max-universal
> :not(caption) > * > * { > :not(caption) > * > * {
padding: $table-cell-padding-y $table-cell-padding-x; padding: $table-cell-padding-y $table-cell-padding-x;
background-color: var(--#{$variable-prefix}table-bg); background-color: var(--#{$prefix}table-bg);
border-bottom-width: $table-border-width; border-bottom-width: $table-border-width;
box-shadow: inset 0 0 0 9999px var(--#{$variable-prefix}table-accent-bg); box-shadow: inset 0 0 0 9999px var(--#{$prefix}table-accent-bg);
} }
> tbody { > tbody {
@ -37,13 +39,11 @@
> thead { > thead {
vertical-align: bottom; vertical-align: bottom;
} }
// Highlight border color between thead, tbody and tfoot.
> :not(:last-child) > :last-child > * {
border-bottom-color: $table-group-separator-color;
}
} }
.table-group-divider {
border-top: ($table-border-width * 2) solid $table-group-separator-color;
}
// //
// Change placement of captions with a class // Change placement of captions with a class
@ -91,16 +91,29 @@
> :not(caption) > * > * { > :not(caption) > * > * {
border-bottom-width: 0; border-bottom-width: 0;
} }
> :not(:first-child) {
border-top-width: 0;
}
} }
// Zebra-striping // Zebra-striping
// //
// 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}) > * {
--#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-striped-bg); --#{$prefix}table-accent-bg: var(--#{$prefix}table-striped-bg);
color: var(--#{$variable-prefix}table-striped-color); color: var(--#{$prefix}table-striped-color);
}
}
// For columns
.table-striped-columns {
> :not(caption) > tr > :nth-child(#{$table-striped-columns-order}) {
--#{$prefix}table-accent-bg: var(--#{$prefix}table-striped-bg);
color: var(--#{$prefix}table-striped-color);
} }
} }
@ -109,8 +122,8 @@
// The `.table-active` class can be added to highlight rows or cells // The `.table-active` class can be added to highlight rows or cells
.table-active { .table-active {
--#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-active-bg); --#{$prefix}table-accent-bg: var(--#{$prefix}table-active-bg);
color: var(--#{$variable-prefix}table-active-color); color: var(--#{$prefix}table-active-color);
} }
// Hover effect // Hover effect
@ -118,9 +131,9 @@
// 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:hover { > tbody > tr:hover > * {
--#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-hover-bg); --#{$prefix}table-accent-bg: var(--#{$prefix}table-hover-bg);
color: var(--#{$variable-prefix}table-hover-color); color: var(--#{$prefix}table-hover-color);
} }
} }

View file

@ -1,51 +1,73 @@
.toast { .toast {
width: $toast-max-width; // scss-docs-start toast-css-vars
max-width: 100%; --#{$prefix}toast-zindex: #{$zindex-toast};
@include font-size($toast-font-size); --#{$prefix}toast-padding-x: #{$toast-padding-x};
color: $toast-color; --#{$prefix}toast-padding-y: #{$toast-padding-y};
pointer-events: auto; --#{$prefix}toast-spacing: #{$toast-spacing};
background-color: $toast-background-color; --#{$prefix}toast-max-width: #{$toast-max-width};
background-clip: padding-box; @include rfs($toast-font-size, --#{$prefix}toast-font-size);
border: $toast-border-width solid $toast-border-color; --#{$prefix}toast-color: #{$toast-color};
box-shadow: $toast-box-shadow; --#{$prefix}toast-bg: #{$toast-background-color};
@include border-radius($toast-border-radius); --#{$prefix}toast-border-width: #{$toast-border-width};
--#{$prefix}toast-border-color: #{$toast-border-color};
--#{$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(.showing):not(.show) { width: var(--#{$prefix}toast-max-width);
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 {
opacity: 0; opacity: 0;
} }
&.hide { &:not(.show) {
display: none; display: none;
} }
} }
.toast-container { .toast-container {
--#{$prefix}toast-zindex: #{$zindex-toast};
position: absolute;
z-index: var(--#{$prefix}toast-zindex);
width: max-content; width: max-content;
max-width: 100%; max-width: 100%;
pointer-events: none; pointer-events: none;
> :not(:last-child) { > :not(:last-child) {
margin-bottom: $toast-spacing; 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 { .btn-close {
margin-right: $toast-padding-x * -.5; margin-right: calc(-.5 * var(--#{$prefix}toast-padding-x)); // stylelint-disable-line function-disallowed-list
margin-left: $toast-padding-x; 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; word-wrap: break-word;
} }

View file

@ -1,24 +1,39 @@
// 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; padding: var(--#{$prefix}tooltip-arrow-height);
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); }
.tooltip-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,66 +44,56 @@
} }
} }
.bs-tooltip-top { .bs-tooltip-top .tooltip-arrow {
padding: $tooltip-arrow-height 0;
.tooltip-arrow {
bottom: 0; bottom: 0;
&::before { &::before {
top: -1px; top: -1px;
border-width: $tooltip-arrow-height ($tooltip-arrow-width * .5) 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-end { /* rtl:begin:ignore */
padding: 0 $tooltip-arrow-height; .bs-tooltip-end .tooltip-arrow {
.tooltip-arrow {
left: 0; left: 0;
width: $tooltip-arrow-height; width: var(--#{$prefix}tooltip-arrow-height);
height: $tooltip-arrow-width; height: var(--#{$prefix}tooltip-arrow-width);
&::before { &::before {
right: -1px; right: -1px;
border-width: ($tooltip-arrow-width * .5) $tooltip-arrow-height ($tooltip-arrow-width * .5) 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;
.tooltip-arrow { .bs-tooltip-bottom .tooltip-arrow {
top: 0; top: 0;
&::before { &::before {
bottom: -1px; bottom: -1px;
border-width: 0 ($tooltip-arrow-width * .5) $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-start { /* rtl:begin:ignore */
padding: 0 $tooltip-arrow-height; .bs-tooltip-start .tooltip-arrow {
.tooltip-arrow {
right: 0; right: 0;
width: $tooltip-arrow-height; width: var(--#{$prefix}tooltip-arrow-height);
height: $tooltip-arrow-width; height: var(--#{$prefix}tooltip-arrow-width);
&::before { &::before {
left: -1px; left: -1px;
border-width: ($tooltip-arrow-width * .5) 0 ($tooltip-arrow-width * .5) $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 {
&[data-popper-placement^="top"] { &[data-popper-placement^="top"] {
@extend .bs-tooltip-top; @extend .bs-tooltip-top;
@ -106,10 +111,10 @@
// 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));
} }

View file

@ -17,5 +17,11 @@
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 // scss-docs-end collapse-classes

View file

@ -35,6 +35,8 @@
@each $display, $font-size in $display-font-sizes { @each $display, $font-size in $display-font-sizes {
.display-#{$display} { .display-#{$display} {
@include font-size($font-size); @include font-size($font-size);
font-family: $display-font-family;
font-style: $display-font-style;
font-weight: $display-font-weight; font-weight: $display-font-weight;
line-height: $display-line-height; line-height: $display-line-height;
} }

View file

@ -1,5 +1,3 @@
// stylelint-disable indentation
// Utilities // Utilities
$utilities: () !default; $utilities: () !default;
@ -24,6 +22,19 @@ $utilities: map-merge(
) )
), ),
// scss-docs-end utils-float // scss-docs-end utils-float
// 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 // scss-docs-start utils-overflow
"overflow": ( "overflow": (
property: overflow, property: overflow,
@ -88,14 +99,14 @@ $utilities: map-merge(
"border": ( "border": (
property: border, property: border,
values: ( values: (
null: $border-width solid $border-color, null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0, 0: 0,
) )
), ),
"border-top": ( "border-top": (
property: border-top, property: border-top,
values: ( values: (
null: $border-width solid $border-color, null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0, 0: 0,
) )
), ),
@ -103,14 +114,14 @@ $utilities: map-merge(
property: border-right, property: border-right,
class: border-end, class: border-end,
values: ( values: (
null: $border-width solid $border-color, null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0, 0: 0,
) )
), ),
"border-bottom": ( "border-bottom": (
property: border-bottom, property: border-bottom,
values: ( values: (
null: $border-width solid $border-color, null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0, 0: 0,
) )
), ),
@ -118,20 +129,35 @@ $utilities: map-merge(
property: border-left, property: border-left,
class: border-start, class: border-start,
values: ( values: (
null: $border-width solid $border-color, null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0, 0: 0,
) )
), ),
"border-color": ( "border-color": (
property: border-color, property: border-color,
class: border, class: border,
values: map-merge($theme-colors, ("white": $white)) local-vars: (
"border-opacity": 1
),
values: $utilities-border-colors
), ),
"border-width": ( "border-width": (
property: border-width, css-var: true,
css-variable-name: border-width,
class: border, class: border,
values: $border-widths 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 // scss-docs-end utils-borders
// Sizing utilities // Sizing utilities
// scss-docs-start utils-sizing // scss-docs-start utils-sizing
@ -225,12 +251,6 @@ $utilities: map-merge(
class: flex, class: flex,
values: wrap nowrap wrap-reverse values: wrap nowrap wrap-reverse
), ),
"gap": (
responsive: true,
property: gap,
class: gap,
values: $spacers
),
"justify-content": ( "justify-content": (
responsive: true, responsive: true,
property: justify-content, property: justify-content,
@ -423,13 +443,20 @@ $utilities: map-merge(
class: ps, class: ps,
values: $spacers values: $spacers
), ),
// Gap utility
"gap": (
responsive: true,
property: gap,
class: gap,
values: $spacers
),
// scss-docs-end utils-spacing // scss-docs-end utils-spacing
// Text // Text
// scss-docs-start utils-text // scss-docs-start utils-text
"font-family": ( "font-family": (
property: font-family, property: font-family,
class: font, class: font,
values: (monospace: var(--#{$variable-prefix}font-monospace)) values: (monospace: var(--#{$prefix}font-monospace))
), ),
"font-size": ( "font-size": (
rfs: true, rfs: true,
@ -450,6 +477,7 @@ $utilities: map-merge(
lighter: $font-weight-lighter, lighter: $font-weight-lighter,
normal: $font-weight-normal, normal: $font-weight-normal,
bold: $font-weight-bold, bold: $font-weight-bold,
semibold: $font-weight-semibold,
bolder: $font-weight-bolder bolder: $font-weight-bolder
) )
), ),
@ -501,37 +529,60 @@ $utilities: map-merge(
"color": ( "color": (
property: color, property: color,
class: text, class: text,
local-vars: (
"text-opacity": 1
),
values: map-merge( values: map-merge(
$theme-colors, $utilities-text-colors,
( (
"white": $white,
"body": $body-color,
"muted": $text-muted, "muted": $text-muted,
"black-50": rgba($black, .5), "black-50": rgba($black, .5), // deprecated
"white-50": rgba($white, .5), "white-50": rgba($white, .5), // deprecated
"reset": inherit, "reset": inherit,
) )
) )
), ),
"text-opacity": (
css-var: true,
class: text-opacity,
values: (
25: .25,
50: .5,
75: .75,
100: 1
)
),
// scss-docs-end utils-color // scss-docs-end utils-color
// scss-docs-start utils-bg-color // scss-docs-start utils-bg-color
"background-color": ( "background-color": (
property: background-color, property: background-color,
class: bg, class: bg,
local-vars: (
"bg-opacity": 1
),
values: map-merge( values: map-merge(
$theme-colors, $utilities-bg-colors,
( (
"body": $body-bg,
"white": $white,
"transparent": transparent "transparent": transparent
) )
) )
), ),
"bg-opacity": (
css-var: true,
class: bg-opacity,
values: (
10: .1,
25: .25,
50: .5,
75: .75,
100: 1
)
),
// scss-docs-end utils-bg-color // scss-docs-end utils-bg-color
"gradient": ( "gradient": (
property: background-image, property: background-image,
class: bg, class: bg,
values: (gradient: var(--#{$variable-prefix}gradient)) values: (gradient: var(--#{$prefix}gradient))
), ),
// scss-docs-start utils-interaction // scss-docs-start utils-interaction
"user-select": ( "user-select": (
@ -549,34 +600,36 @@ $utilities: map-merge(
property: border-radius, property: border-radius,
class: rounded, class: rounded,
values: ( values: (
null: $border-radius, null: var(--#{$prefix}border-radius),
0: 0, 0: 0,
1: $border-radius-sm, 1: var(--#{$prefix}border-radius-sm),
2: $border-radius, 2: var(--#{$prefix}border-radius),
3: $border-radius-lg, 3: var(--#{$prefix}border-radius-lg),
4: var(--#{$prefix}border-radius-xl),
5: var(--#{$prefix}border-radius-2xl),
circle: 50%, circle: 50%,
pill: $border-radius-pill pill: var(--#{$prefix}border-radius-pill)
) )
), ),
"rounded-top": ( "rounded-top": (
property: border-top-left-radius border-top-right-radius, property: border-top-left-radius border-top-right-radius,
class: rounded-top, class: rounded-top,
values: (null: $border-radius) values: (null: var(--#{$prefix}border-radius))
), ),
"rounded-end": ( "rounded-end": (
property: border-top-right-radius border-bottom-right-radius, property: border-top-right-radius border-bottom-right-radius,
class: rounded-end, class: rounded-end,
values: (null: $border-radius) values: (null: var(--#{$prefix}border-radius))
), ),
"rounded-bottom": ( "rounded-bottom": (
property: border-bottom-right-radius border-bottom-left-radius, property: border-bottom-right-radius border-bottom-left-radius,
class: rounded-bottom, class: rounded-bottom,
values: (null: $border-radius) values: (null: var(--#{$prefix}border-radius))
), ),
"rounded-start": ( "rounded-start": (
property: border-bottom-left-radius border-top-left-radius, property: border-bottom-left-radius border-top-left-radius,
class: rounded-start, class: rounded-start,
values: (null: $border-radius) values: (null: var(--#{$prefix}border-radius))
), ),
// scss-docs-end utils-border-radius // scss-docs-end utils-border-radius
// scss-docs-start utils-visibility // scss-docs-start utils-visibility

View file

@ -60,36 +60,13 @@ $colors: (
"green": $green, "green": $green,
"teal": $teal, "teal": $teal,
"cyan": $cyan, "cyan": $cyan,
"black": $black,
"white": $white, "white": $white,
"gray": $gray-600, "gray": $gray-600,
"gray-dark": $gray-800 "gray-dark": $gray-800
) !default; ) !default;
// scss-docs-end colors-map // scss-docs-end colors-map
// scss-docs-start theme-color-variables
$primary: $blue !default;
$secondary: $gray-600 !default;
$success: $green !default;
$info: $cyan !default;
$warning: $yellow !default;
$danger: $red !default;
$light: $gray-100 !default;
$dark: $gray-900 !default;
// scss-docs-end theme-color-variables
// scss-docs-start theme-colors-map
$theme-colors: (
"primary": $primary,
"secondary": $secondary,
"success": $success,
"info": $info,
"warning": $warning,
"danger": $danger,
"light": $light,
"dark": $dark
) !default;
// scss-docs-end theme-colors-map
// The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7. // The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.
// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast // See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast
$min-contrast-ratio: 4.5 !default; $min-contrast-ratio: 4.5 !default;
@ -198,8 +175,152 @@ $cyan-600: shade-color($cyan, 20%) !default;
$cyan-700: shade-color($cyan, 40%) !default; $cyan-700: shade-color($cyan, 40%) !default;
$cyan-800: shade-color($cyan, 60%) !default; $cyan-800: shade-color($cyan, 60%) !default;
$cyan-900: shade-color($cyan, 80%) !default; $cyan-900: shade-color($cyan, 80%) !default;
$blues: (
"blue-100": $blue-100,
"blue-200": $blue-200,
"blue-300": $blue-300,
"blue-400": $blue-400,
"blue-500": $blue-500,
"blue-600": $blue-600,
"blue-700": $blue-700,
"blue-800": $blue-800,
"blue-900": $blue-900
) !default;
$indigos: (
"indigo-100": $indigo-100,
"indigo-200": $indigo-200,
"indigo-300": $indigo-300,
"indigo-400": $indigo-400,
"indigo-500": $indigo-500,
"indigo-600": $indigo-600,
"indigo-700": $indigo-700,
"indigo-800": $indigo-800,
"indigo-900": $indigo-900
) !default;
$purples: (
"purple-100": $purple-100,
"purple-200": $purple-200,
"purple-300": $purple-300,
"purple-400": $purple-400,
"purple-500": $purple-500,
"purple-600": $purple-600,
"purple-700": $purple-700,
"purple-800": $purple-800,
"purple-900": $purple-900
) !default;
$pinks: (
"pink-100": $pink-100,
"pink-200": $pink-200,
"pink-300": $pink-300,
"pink-400": $pink-400,
"pink-500": $pink-500,
"pink-600": $pink-600,
"pink-700": $pink-700,
"pink-800": $pink-800,
"pink-900": $pink-900
) !default;
$reds: (
"red-100": $red-100,
"red-200": $red-200,
"red-300": $red-300,
"red-400": $red-400,
"red-500": $red-500,
"red-600": $red-600,
"red-700": $red-700,
"red-800": $red-800,
"red-900": $red-900
) !default;
$oranges: (
"orange-100": $orange-100,
"orange-200": $orange-200,
"orange-300": $orange-300,
"orange-400": $orange-400,
"orange-500": $orange-500,
"orange-600": $orange-600,
"orange-700": $orange-700,
"orange-800": $orange-800,
"orange-900": $orange-900
) !default;
$yellows: (
"yellow-100": $yellow-100,
"yellow-200": $yellow-200,
"yellow-300": $yellow-300,
"yellow-400": $yellow-400,
"yellow-500": $yellow-500,
"yellow-600": $yellow-600,
"yellow-700": $yellow-700,
"yellow-800": $yellow-800,
"yellow-900": $yellow-900
) !default;
$greens: (
"green-100": $green-100,
"green-200": $green-200,
"green-300": $green-300,
"green-400": $green-400,
"green-500": $green-500,
"green-600": $green-600,
"green-700": $green-700,
"green-800": $green-800,
"green-900": $green-900
) !default;
$teals: (
"teal-100": $teal-100,
"teal-200": $teal-200,
"teal-300": $teal-300,
"teal-400": $teal-400,
"teal-500": $teal-500,
"teal-600": $teal-600,
"teal-700": $teal-700,
"teal-800": $teal-800,
"teal-900": $teal-900
) !default;
$cyans: (
"cyan-100": $cyan-100,
"cyan-200": $cyan-200,
"cyan-300": $cyan-300,
"cyan-400": $cyan-400,
"cyan-500": $cyan-500,
"cyan-600": $cyan-600,
"cyan-700": $cyan-700,
"cyan-800": $cyan-800,
"cyan-900": $cyan-900
) !default;
// fusv-enable // fusv-enable
// scss-docs-start theme-color-variables
$primary: $blue !default;
$secondary: $gray-600 !default;
$success: $green !default;
$info: $cyan !default;
$warning: $yellow !default;
$danger: $red !default;
$light: $gray-100 !default;
$dark: $gray-900 !default;
// scss-docs-end theme-color-variables
// scss-docs-start theme-colors-map
$theme-colors: (
"primary": $primary,
"secondary": $secondary,
"success": $success,
"info": $info,
"warning": $warning,
"danger": $danger,
"light": $light,
"dark": $dark
) !default;
// scss-docs-end theme-colors-map
// Characters which are escaped by the escape-svg function // Characters which are escaped by the escape-svg function
$escaped-characters: ( $escaped-characters: (
("<", "%3c"), ("<", "%3c"),
@ -221,6 +342,8 @@ $enable-transitions: true !default;
$enable-reduced-motion: true !default; $enable-reduced-motion: true !default;
$enable-smooth-scroll: true !default; $enable-smooth-scroll: true !default;
$enable-grid-classes: true !default; $enable-grid-classes: true !default;
$enable-container-classes: true !default;
$enable-cssgrid: false !default;
$enable-button-pointers: true !default; $enable-button-pointers: true !default;
$enable-rfs: true !default; $enable-rfs: true !default;
$enable-validation-icons: true !default; $enable-validation-icons: true !default;
@ -230,7 +353,8 @@ $enable-important-utilities: true !default;
// Prefix for :root CSS variables // Prefix for :root CSS variables
$variable-prefix: bs- !default; $variable-prefix: bs- !default; // Deprecated in v5.2.0 for the shorter `$prefix`
$prefix: $variable-prefix !default;
// Gradient // Gradient
// //
@ -256,8 +380,6 @@ $spacers: (
4: $spacer * 1.5, 4: $spacer * 1.5,
5: $spacer * 3, 5: $spacer * 3,
) !default; ) !default;
$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
// scss-docs-end spacer-variables-maps // scss-docs-end spacer-variables-maps
// Position // Position
@ -280,7 +402,6 @@ $body-bg: $white !default;
$body-color: $gray-900 !default; $body-color: $gray-900 !default;
$body-text-align: null !default; $body-text-align: null !default;
// Links // Links
// //
// Style anchor elements. // Style anchor elements.
@ -346,11 +467,9 @@ $grid-columns: 12 !default;
$grid-gutter-width: 1.5rem !default; $grid-gutter-width: 1.5rem !default;
$grid-row-columns: 6 !default; $grid-row-columns: 6 !default;
$gutters: $spacers !default;
// Container padding // Container padding
$container-padding-x: $grid-gutter-width * .5 !default; $container-padding-x: $grid-gutter-width !default;
// Components // Components
@ -367,13 +486,17 @@ $border-widths: (
5: 5px 5: 5px
) !default; ) !default;
$border-style: solid !default;
$border-color: $gray-300 !default; $border-color: $gray-300 !default;
$border-color-translucent: rgba($black, .175) !default;
// scss-docs-end border-variables // scss-docs-end border-variables
// scss-docs-start border-radius-variables // scss-docs-start border-radius-variables
$border-radius: .25rem !default; $border-radius: .375rem !default;
$border-radius-sm: .2rem !default; $border-radius-sm: .25rem !default;
$border-radius-lg: .3rem !default; $border-radius-lg: .5rem !default;
$border-radius-xl: 1rem !default;
$border-radius-2xl: 2rem !default;
$border-radius-pill: 50rem !default; $border-radius-pill: 50rem !default;
// scss-docs-end border-radius-variables // scss-docs-end border-radius-variables
@ -397,6 +520,7 @@ $transition-base: all .2s ease-in-out !default;
$transition-fade: opacity .15s linear !default; $transition-fade: opacity .15s linear !default;
// scss-docs-start collapse-transition // scss-docs-start collapse-transition
$transition-collapse: height .35s ease !default; $transition-collapse: height .35s ease !default;
$transition-collapse-width: width .35s ease !default;
// scss-docs-end collapse-transition // scss-docs-end collapse-transition
// stylelint-disable function-disallowed-list // stylelint-disable function-disallowed-list
@ -416,11 +540,11 @@ $aspect-ratios: (
// scss-docs-start font-variables // scss-docs-start font-variables
// stylelint-disable value-keyword-case // stylelint-disable value-keyword-case
$font-family-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default; $font-family-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default; $font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
// stylelint-enable value-keyword-case // stylelint-enable value-keyword-case
$font-family-base: var(--#{$variable-prefix}font-sans-serif) !default; $font-family-base: var(--#{$prefix}font-sans-serif) !default;
$font-family-code: var(--#{$variable-prefix}font-monospace) !default; $font-family-code: var(--#{$prefix}font-monospace) !default;
// $font-size-root affects the value of `rem`, which is used for as well font sizes, paddings, and margins // $font-size-root affects the value of `rem`, which is used for as well font sizes, paddings, and margins
// $font-size-base affects the font size of the body text // $font-size-base affects the font size of the body text
@ -432,6 +556,7 @@ $font-size-lg: $font-size-base * 1.25 !default;
$font-weight-lighter: lighter !default; $font-weight-lighter: lighter !default;
$font-weight-light: 300 !default; $font-weight-light: 300 !default;
$font-weight-normal: 400 !default; $font-weight-normal: 400 !default;
$font-weight-semibold: 600 !default;
$font-weight-bold: 700 !default; $font-weight-bold: 700 !default;
$font-weight-bolder: bolder !default; $font-weight-bolder: bolder !default;
@ -479,6 +604,8 @@ $display-font-sizes: (
6: 2.5rem 6: 2.5rem
) !default; ) !default;
$display-font-family: null !default;
$display-font-style: null !default;
$display-font-weight: 300 !default; $display-font-weight: 300 !default;
$display-line-height: $headings-line-height !default; $display-line-height: $headings-line-height !default;
// scss-docs-end display-headings // scss-docs-end display-headings
@ -502,22 +629,26 @@ $blockquote-footer-font-size: $small-font-size !default;
$hr-margin-y: $spacer !default; $hr-margin-y: $spacer !default;
$hr-color: inherit !default; $hr-color: inherit !default;
$hr-height: $border-width !default;
// fusv-disable
$hr-bg-color: null !default; // Deprecated in v5.2.0
$hr-height: null !default; // Deprecated in v5.2.0
// fusv-enable
$hr-border-color: null !default; // Allows for inherited colors
$hr-border-width: $border-width !default;
$hr-opacity: .25 !default; $hr-opacity: .25 !default;
$legend-margin-bottom: .5rem !default; $legend-margin-bottom: .5rem !default;
$legend-font-size: 1.5rem !default; $legend-font-size: 1.5rem !default;
$legend-font-weight: null !default; $legend-font-weight: null !default;
$mark-padding: .2em !default;
$dt-font-weight: $font-weight-bold !default; $dt-font-weight: $font-weight-bold !default;
$nested-kbd-font-weight: $font-weight-bold !default;
$list-inline-padding: .5rem !default; $list-inline-padding: .5rem !default;
$mark-bg: #fcf8e3 !default; $mark-padding: .1875em !default;
$mark-bg: $yellow-100 !default;
// scss-docs-end type-variables // scss-docs-end type-variables
@ -533,7 +664,7 @@ $table-cell-padding-x-sm: .25rem !default;
$table-cell-vertical-align: top !default; $table-cell-vertical-align: top !default;
$table-color: $body-color !default; $table-color: var(--#{$prefix}body-color) !default;
$table-bg: transparent !default; $table-bg: transparent !default;
$table-accent-bg: transparent !default; $table-accent-bg: transparent !default;
@ -553,11 +684,12 @@ $table-hover-bg: rgba($black, $table-hover-bg-factor) !default;
$table-border-factor: .1 !default; $table-border-factor: .1 !default;
$table-border-width: $border-width !default; $table-border-width: $border-width !default;
$table-border-color: $border-color !default; $table-border-color: var(--#{$prefix}border-color) !default;
$table-striped-order: odd !default; $table-striped-order: odd !default;
$table-striped-columns-order: even !default;
$table-group-separator-color: currentColor !default; $table-group-separator-color: currentcolor !default;
$table-caption-color: $text-muted !default; $table-caption-color: $text-muted !default;
@ -636,8 +768,8 @@ $btn-focus-box-shadow: $input-btn-focus-box-shadow !default;
$btn-disabled-opacity: .65 !default; $btn-disabled-opacity: .65 !default;
$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default; $btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default;
$btn-link-color: $link-color !default; $btn-link-color: var(--#{$prefix}link-color) !default;
$btn-link-hover-color: $link-hover-color !default; $btn-link-hover-color: var(--#{$prefix}link-hover-color) !default;
$btn-link-disabled-color: $gray-600 !default; $btn-link-disabled-color: $gray-600 !default;
// Allows for customizing button radius independently from global border radius // Allows for customizing button radius independently from global border radius
@ -692,7 +824,8 @@ $input-padding-y-lg: $input-btn-padding-y-lg !default;
$input-padding-x-lg: $input-btn-padding-x-lg !default; $input-padding-x-lg: $input-btn-padding-x-lg !default;
$input-font-size-lg: $input-btn-font-size-lg !default; $input-font-size-lg: $input-btn-font-size-lg !default;
$input-bg: $white !default; $input-bg: $body-bg !default;
$input-disabled-color: null !default;
$input-disabled-bg: $gray-200 !default; $input-disabled-bg: $gray-200 !default;
$input-disabled-border-color: null !default; $input-disabled-border-color: null !default;
@ -725,6 +858,8 @@ $input-height-sm: add($input-line-height * 1em, add($input
$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default; $input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;
$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; $input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
$form-color-width: 3rem !default;
// scss-docs-end form-input-variables // scss-docs-end form-input-variables
// scss-docs-start form-check-variables // scss-docs-start form-check-variables
@ -748,7 +883,7 @@ $form-check-input-focus-box-shadow: $input-btn-focus-box-shadow !default;
$form-check-input-checked-color: $component-active-color !default; $form-check-input-checked-color: $component-active-color !default;
$form-check-input-checked-bg-color: $component-active-bg !default; $form-check-input-checked-bg-color: $component-active-bg !default;
$form-check-input-checked-border-color: $form-check-input-checked-bg-color !default; $form-check-input-checked-border-color: $form-check-input-checked-bg-color !default;
$form-check-input-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#{$form-check-input-checked-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/></svg>") !default; $form-check-input-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#{$form-check-input-checked-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/></svg>") !default;
$form-check-radio-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='2' fill='#{$form-check-input-checked-color}'/></svg>") !default; $form-check-radio-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='2' fill='#{$form-check-input-checked-color}'/></svg>") !default;
$form-check-input-indeterminate-color: $component-active-color !default; $form-check-input-indeterminate-color: $component-active-color !default;
@ -764,7 +899,7 @@ $form-check-inline-margin-end: 1rem !default;
// scss-docs-end form-check-variables // scss-docs-end form-check-variables
// scss-docs-start form-switch-variables // scss-docs-start form-switch-variables
$form-switch-color: rgba(0, 0, 0, .25) !default; $form-switch-color: rgba($black, .25) !default;
$form-switch-width: 2em !default; $form-switch-width: 2em !default;
$form-switch-padding-start: $form-switch-width + .5em !default; $form-switch-padding-start: $form-switch-width + .5em !default;
$form-switch-bg-image: 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}'/></svg>") !default; $form-switch-bg-image: 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}'/></svg>") !default;
@ -804,7 +939,7 @@ $form-select-disabled-border-color: $input-disabled-border-color !default;
$form-select-bg-position: right $form-select-padding-x center !default; $form-select-bg-position: right $form-select-padding-x center !default;
$form-select-bg-size: 16px 12px !default; // In pixels because image dimensions $form-select-bg-size: 16px 12px !default; // In pixels because image dimensions
$form-select-indicator-color: $gray-800 !default; $form-select-indicator-color: $gray-800 !default;
$form-select-indicator: 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}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/></svg>") !default; $form-select-indicator: 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}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/></svg>") !default;
$form-select-feedback-icon-padding-end: $form-select-padding-x * 2.5 + $form-select-indicator-padding !default; $form-select-feedback-icon-padding-end: $form-select-padding-x * 2.5 + $form-select-indicator-padding !default;
$form-select-feedback-icon-position: center right $form-select-indicator-padding !default; $form-select-feedback-icon-position: center right $form-select-indicator-padding !default;
@ -812,7 +947,7 @@ $form-select-feedback-icon-size: $input-height-inner-half $input-height-i
$form-select-border-width: $input-border-width !default; $form-select-border-width: $input-border-width !default;
$form-select-border-color: $input-border-color !default; $form-select-border-color: $input-border-color !default;
$form-select-border-radius: $border-radius !default; $form-select-border-radius: $input-border-radius !default;
$form-select-box-shadow: $box-shadow-inset !default; $form-select-box-shadow: $box-shadow-inset !default;
$form-select-focus-border-color: $input-focus-border-color !default; $form-select-focus-border-color: $input-focus-border-color !default;
@ -822,10 +957,12 @@ $form-select-focus-box-shadow: 0 0 0 $form-select-focus-width $input-btn-focu
$form-select-padding-y-sm: $input-padding-y-sm !default; $form-select-padding-y-sm: $input-padding-y-sm !default;
$form-select-padding-x-sm: $input-padding-x-sm !default; $form-select-padding-x-sm: $input-padding-x-sm !default;
$form-select-font-size-sm: $input-font-size-sm !default; $form-select-font-size-sm: $input-font-size-sm !default;
$form-select-border-radius-sm: $input-border-radius-sm !default;
$form-select-padding-y-lg: $input-padding-y-lg !default; $form-select-padding-y-lg: $input-padding-y-lg !default;
$form-select-padding-x-lg: $input-padding-x-lg !default; $form-select-padding-x-lg: $input-padding-x-lg !default;
$form-select-font-size-lg: $input-font-size-lg !default; $form-select-font-size-lg: $input-font-size-lg !default;
$form-select-border-radius-lg: $input-border-radius-lg !default;
$form-select-transition: $input-transition !default; $form-select-transition: $input-transition !default;
// scss-docs-end form-select-variables // scss-docs-end form-select-variables
@ -879,7 +1016,7 @@ $form-feedback-valid-color: $success !default;
$form-feedback-invalid-color: $danger !default; $form-feedback-invalid-color: $danger !default;
$form-feedback-icon-valid-color: $form-feedback-valid-color !default; $form-feedback-icon-valid-color: $form-feedback-valid-color !default;
$form-feedback-icon-valid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='#{$form-feedback-icon-valid-color}' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/></svg>") !default; $form-feedback-icon-valid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='#{$form-feedback-icon-valid-color}' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/></svg>") !default;
$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default; $form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;
$form-feedback-icon-invalid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='#{$form-feedback-icon-invalid-color}'><circle cx='6' cy='6' r='4.5'/><path stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/><circle cx='6' cy='8.2' r='.6' fill='#{$form-feedback-icon-invalid-color}' stroke='none'/></svg>") !default; $form-feedback-icon-invalid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='#{$form-feedback-icon-invalid-color}'><circle cx='6' cy='6' r='4.5'/><path stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/><circle cx='6' cy='8.2' r='.6' fill='#{$form-feedback-icon-invalid-color}' stroke='none'/></svg>") !default;
// scss-docs-end form-feedback-variables // scss-docs-end form-feedback-variables
@ -906,11 +1043,13 @@ $form-validation-states: (
$zindex-dropdown: 1000 !default; $zindex-dropdown: 1000 !default;
$zindex-sticky: 1020 !default; $zindex-sticky: 1020 !default;
$zindex-fixed: 1030 !default; $zindex-fixed: 1030 !default;
$zindex-modal-backdrop: 1040 !default; $zindex-offcanvas-backdrop: 1040 !default;
$zindex-offcanvas: 1050 !default; $zindex-offcanvas: 1045 !default;
$zindex-modal: 1060 !default; $zindex-modal-backdrop: 1050 !default;
$zindex-modal: 1055 !default;
$zindex-popover: 1070 !default; $zindex-popover: 1070 !default;
$zindex-tooltip: 1080 !default; $zindex-tooltip: 1080 !default;
$zindex-toast: 1090 !default;
// scss-docs-end zindex-stack // scss-docs-end zindex-stack
@ -921,8 +1060,8 @@ $nav-link-padding-y: .5rem !default;
$nav-link-padding-x: 1rem !default; $nav-link-padding-x: 1rem !default;
$nav-link-font-size: null !default; $nav-link-font-size: null !default;
$nav-link-font-weight: null !default; $nav-link-font-weight: null !default;
$nav-link-color: $link-color !default; $nav-link-color: var(--#{$prefix}link-color) !default;
$nav-link-hover-color: $link-hover-color !default; $nav-link-hover-color: var(--#{$prefix}link-hover-color) !default;
$nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default; $nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default;
$nav-link-disabled-color: $gray-600 !default; $nav-link-disabled-color: $gray-600 !default;
@ -961,15 +1100,6 @@ $navbar-toggler-font-size: $font-size-lg !default;
$navbar-toggler-border-radius: $btn-border-radius !default; $navbar-toggler-border-radius: $btn-border-radius !default;
$navbar-toggler-focus-width: $btn-focus-width !default; $navbar-toggler-focus-width: $btn-focus-width !default;
$navbar-toggler-transition: box-shadow .15s ease-in-out !default; $navbar-toggler-transition: box-shadow .15s ease-in-out !default;
// scss-docs-end navbar-variables
// scss-docs-start navbar-theme-variables
$navbar-dark-color: rgba($white, .55) !default;
$navbar-dark-hover-color: rgba($white, .75) !default;
$navbar-dark-active-color: $white !default;
$navbar-dark-disabled-color: rgba($white, .25) !default;
$navbar-dark-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path stroke='#{$navbar-dark-color}' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
$navbar-dark-toggler-border-color: rgba($white, .1) !default;
$navbar-light-color: rgba($black, .55) !default; $navbar-light-color: rgba($black, .55) !default;
$navbar-light-hover-color: rgba($black, .7) !default; $navbar-light-hover-color: rgba($black, .7) !default;
@ -977,12 +1107,20 @@ $navbar-light-active-color: rgba($black, .9) !default;
$navbar-light-disabled-color: rgba($black, .3) !default; $navbar-light-disabled-color: rgba($black, .3) !default;
$navbar-light-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path stroke='#{$navbar-light-color}' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default; $navbar-light-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path stroke='#{$navbar-light-color}' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
$navbar-light-toggler-border-color: rgba($black, .1) !default; $navbar-light-toggler-border-color: rgba($black, .1) !default;
$navbar-light-brand-color: $navbar-light-active-color !default; $navbar-light-brand-color: $navbar-light-active-color !default;
$navbar-light-brand-hover-color: $navbar-light-active-color !default; $navbar-light-brand-hover-color: $navbar-light-active-color !default;
// scss-docs-end navbar-variables
// scss-docs-start navbar-dark-variables
$navbar-dark-color: rgba($white, .55) !default;
$navbar-dark-hover-color: rgba($white, .75) !default;
$navbar-dark-active-color: $white !default;
$navbar-dark-disabled-color: rgba($white, .25) !default;
$navbar-dark-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path stroke='#{$navbar-dark-color}' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
$navbar-dark-toggler-border-color: rgba($white, .1) !default;
$navbar-dark-brand-color: $navbar-dark-active-color !default; $navbar-dark-brand-color: $navbar-dark-active-color !default;
$navbar-dark-brand-hover-color: $navbar-dark-active-color !default; $navbar-dark-brand-hover-color: $navbar-dark-active-color !default;
// scss-docs-end navbar-theme-variables // scss-docs-end navbar-dark-variables
// Dropdowns // Dropdowns
@ -997,7 +1135,7 @@ $dropdown-spacer: .125rem !default;
$dropdown-font-size: $font-size-base !default; $dropdown-font-size: $font-size-base !default;
$dropdown-color: $body-color !default; $dropdown-color: $body-color !default;
$dropdown-bg: $white !default; $dropdown-bg: $white !default;
$dropdown-border-color: rgba($black, .15) !default; $dropdown-border-color: var(--#{$prefix}border-color-translucent) !default;
$dropdown-border-radius: $border-radius !default; $dropdown-border-radius: $border-radius !default;
$dropdown-border-width: $border-width !default; $dropdown-border-width: $border-width !default;
$dropdown-inner-border-radius: subtract($dropdown-border-radius, $dropdown-border-width) !default; $dropdown-inner-border-radius: subtract($dropdown-border-radius, $dropdown-border-width) !default;
@ -1006,7 +1144,7 @@ $dropdown-divider-margin-y: $spacer * .5 !default;
$dropdown-box-shadow: $box-shadow !default; $dropdown-box-shadow: $box-shadow !default;
$dropdown-link-color: $gray-900 !default; $dropdown-link-color: $gray-900 !default;
$dropdown-link-hover-color: shade-color($gray-900, 10%) !default; $dropdown-link-hover-color: shade-color($dropdown-link-color, 10%) !default;
$dropdown-link-hover-bg: $gray-200 !default; $dropdown-link-hover-bg: $gray-200 !default;
$dropdown-link-active-color: $component-active-color !default; $dropdown-link-active-color: $component-active-color !default;
@ -1018,7 +1156,11 @@ $dropdown-item-padding-y: $spacer * .25 !default;
$dropdown-item-padding-x: $spacer !default; $dropdown-item-padding-x: $spacer !default;
$dropdown-header-color: $gray-600 !default; $dropdown-header-color: $gray-600 !default;
$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default; $dropdown-header-padding-x: $dropdown-item-padding-x !default;
$dropdown-header-padding-y: $dropdown-padding-y !default;
// fusv-disable
$dropdown-header-padding: $dropdown-header-padding-y $dropdown-header-padding-x !default; // Deprecated in v5.2.0
// fusv-enable
// scss-docs-end dropdown-variables // scss-docs-end dropdown-variables
// scss-docs-start dropdown-dark-variables // scss-docs-start dropdown-dark-variables
@ -1047,19 +1189,21 @@ $pagination-padding-x-sm: .5rem !default;
$pagination-padding-y-lg: .75rem !default; $pagination-padding-y-lg: .75rem !default;
$pagination-padding-x-lg: 1.5rem !default; $pagination-padding-x-lg: 1.5rem !default;
$pagination-color: $link-color !default; $pagination-font-size: $font-size-base !default;
$pagination-color: var(--#{$prefix}link-color) !default;
$pagination-bg: $white !default; $pagination-bg: $white !default;
$pagination-border-width: $border-width !default;
$pagination-border-radius: $border-radius !default; $pagination-border-radius: $border-radius !default;
$pagination-margin-start: -$pagination-border-width !default; $pagination-border-width: $border-width !default;
$pagination-margin-start: ($pagination-border-width * -1) !default;
$pagination-border-color: $gray-300 !default; $pagination-border-color: $gray-300 !default;
$pagination-focus-color: $link-hover-color !default; $pagination-focus-color: var(--#{$prefix}link-hover-color) !default;
$pagination-focus-bg: $gray-200 !default; $pagination-focus-bg: $gray-200 !default;
$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default; $pagination-focus-box-shadow: $input-btn-focus-box-shadow !default;
$pagination-focus-outline: 0 !default; $pagination-focus-outline: 0 !default;
$pagination-hover-color: $link-hover-color !default; $pagination-hover-color: var(--#{$prefix}link-hover-color) !default;
$pagination-hover-bg: $gray-200 !default; $pagination-hover-bg: $gray-200 !default;
$pagination-hover-border-color: $gray-300 !default; $pagination-hover-border-color: $gray-300 !default;
@ -1078,6 +1222,13 @@ $pagination-border-radius-lg: $border-radius-lg !default;
// scss-docs-end pagination-variables // scss-docs-end pagination-variables
// Placeholders
// scss-docs-start placeholders
$placeholder-opacity-max: .5 !default;
$placeholder-opacity-min: .2 !default;
// scss-docs-end placeholders
// Cards // Cards
// scss-docs-start card-variables // scss-docs-start card-variables
@ -1085,8 +1236,9 @@ $card-spacer-y: $spacer !default;
$card-spacer-x: $spacer !default; $card-spacer-x: $spacer !default;
$card-title-spacer-y: $spacer * .5 !default; $card-title-spacer-y: $spacer * .5 !default;
$card-border-width: $border-width !default; $card-border-width: $border-width !default;
$card-border-color: var(--#{$prefix}border-color-translucent) !default;
$card-border-radius: $border-radius !default; $card-border-radius: $border-radius !default;
$card-border-color: rgba($black, .125) !default; $card-box-shadow: null !default;
$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default; $card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default;
$card-cap-padding-y: $card-spacer-y * .5 !default; $card-cap-padding-y: $card-spacer-y * .5 !default;
$card-cap-padding-x: $card-spacer-x !default; $card-cap-padding-x: $card-spacer-x !default;
@ -1104,10 +1256,10 @@ $card-group-margin: $grid-gutter-width * .5 !default;
// scss-docs-start accordion-variables // scss-docs-start accordion-variables
$accordion-padding-y: 1rem !default; $accordion-padding-y: 1rem !default;
$accordion-padding-x: 1.25rem !default; $accordion-padding-x: 1.25rem !default;
$accordion-color: $body-color !default; $accordion-color: $body-color !default; // Sass variable because of $accordion-button-icon
$accordion-bg: $body-bg !default; $accordion-bg: $body-bg !default;
$accordion-border-width: $border-width !default; $accordion-border-width: $border-width !default;
$accordion-border-color: rgba($black, .125) !default; $accordion-border-color: var(--#{$prefix}border-color) !default;
$accordion-border-radius: $border-radius !default; $accordion-border-radius: $border-radius !default;
$accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default; $accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default;
@ -1117,7 +1269,7 @@ $accordion-body-padding-x: $accordion-padding-x !default;
$accordion-button-padding-y: $accordion-padding-y !default; $accordion-button-padding-y: $accordion-padding-y !default;
$accordion-button-padding-x: $accordion-padding-x !default; $accordion-button-padding-x: $accordion-padding-x !default;
$accordion-button-color: $accordion-color !default; $accordion-button-color: $accordion-color !default;
$accordion-button-bg: $accordion-bg !default; $accordion-button-bg: var(--#{$prefix}accordion-bg) !default;
$accordion-transition: $btn-transition, border-radius .15s ease !default; $accordion-transition: $btn-transition, border-radius .15s ease !default;
$accordion-button-active-bg: tint-color($component-active-bg, 90%) !default; $accordion-button-active-bg: tint-color($component-active-bg, 90%) !default;
$accordion-button-active-color: shade-color($primary, 10%) !default; $accordion-button-active-color: shade-color($primary, 10%) !default;
@ -1126,7 +1278,7 @@ $accordion-button-focus-border-color: $input-focus-border-color !default;
$accordion-button-focus-box-shadow: $btn-focus-box-shadow !default; $accordion-button-focus-box-shadow: $btn-focus-box-shadow !default;
$accordion-icon-width: 1.25rem !default; $accordion-icon-width: 1.25rem !default;
$accordion-icon-color: $accordion-color !default; $accordion-icon-color: $accordion-button-color !default;
$accordion-icon-active-color: $accordion-button-active-color !default; $accordion-icon-active-color: $accordion-button-active-color !default;
$accordion-icon-transition: transform .2s ease-in-out !default; $accordion-icon-transition: transform .2s ease-in-out !default;
$accordion-icon-transform: rotate(-180deg) !default; $accordion-icon-transform: rotate(-180deg) !default;
@ -1146,11 +1298,13 @@ $tooltip-border-radius: $border-radius !default;
$tooltip-opacity: .9 !default; $tooltip-opacity: .9 !default;
$tooltip-padding-y: $spacer * .25 !default; $tooltip-padding-y: $spacer * .25 !default;
$tooltip-padding-x: $spacer * .5 !default; $tooltip-padding-x: $spacer * .5 !default;
$tooltip-margin: 0 !default; $tooltip-margin: null !default; // TODO: remove this in v6
$tooltip-arrow-width: .8rem !default; $tooltip-arrow-width: .8rem !default;
$tooltip-arrow-height: .4rem !default; $tooltip-arrow-height: .4rem !default;
$tooltip-arrow-color: $tooltip-bg !default; // fusv-disable
$tooltip-arrow-color: null !default; // Deprecated in Bootstrap 5.2.0 for CSS variables
// fusv-enable
// scss-docs-end tooltip-variables // scss-docs-end tooltip-variables
// Form tooltips must come after regular tooltips // Form tooltips must come after regular tooltips
@ -1171,11 +1325,12 @@ $popover-font-size: $font-size-sm !default;
$popover-bg: $white !default; $popover-bg: $white !default;
$popover-max-width: 276px !default; $popover-max-width: 276px !default;
$popover-border-width: $border-width !default; $popover-border-width: $border-width !default;
$popover-border-color: rgba($black, .2) !default; $popover-border-color: var(--#{$prefix}border-color-translucent) !default;
$popover-border-radius: $border-radius-lg !default; $popover-border-radius: $border-radius-lg !default;
$popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default; $popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default;
$popover-box-shadow: $box-shadow !default; $popover-box-shadow: $box-shadow !default;
$popover-header-font-size: $font-size-base !default;
$popover-header-bg: shade-color($popover-bg, 6%) !default; $popover-header-bg: shade-color($popover-bg, 6%) !default;
$popover-header-color: $headings-color !default; $popover-header-color: $headings-color !default;
$popover-header-padding-y: .5rem !default; $popover-header-padding-y: .5rem !default;
@ -1187,11 +1342,14 @@ $popover-body-padding-x: $spacer !default;
$popover-arrow-width: 1rem !default; $popover-arrow-width: 1rem !default;
$popover-arrow-height: .5rem !default; $popover-arrow-height: .5rem !default;
$popover-arrow-color: $popover-bg !default;
$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default;
// scss-docs-end popover-variables // scss-docs-end popover-variables
// fusv-disable
// Deprecated in Bootstrap 5.2.0 for CSS variables
$popover-arrow-color: $popover-bg !default;
$popover-arrow-outer-color: var(--#{$prefix}border-color-translucent) !default;
// fusv-enable
// Toasts // Toasts
@ -1202,15 +1360,15 @@ $toast-padding-y: .5rem !default;
$toast-font-size: .875rem !default; $toast-font-size: .875rem !default;
$toast-color: null !default; $toast-color: null !default;
$toast-background-color: rgba($white, .85) !default; $toast-background-color: rgba($white, .85) !default;
$toast-border-width: 1px !default; $toast-border-width: $border-width !default;
$toast-border-color: rgba(0, 0, 0, .1) !default; $toast-border-color: var(--#{$prefix}border-color-translucent) !default;
$toast-border-radius: $border-radius !default; $toast-border-radius: $border-radius !default;
$toast-box-shadow: $box-shadow !default; $toast-box-shadow: $box-shadow !default;
$toast-spacing: $container-padding-x !default; $toast-spacing: $container-padding-x !default;
$toast-header-color: $gray-600 !default; $toast-header-color: $gray-600 !default;
$toast-header-background-color: rgba($white, .85) !default; $toast-header-background-color: rgba($white, .85) !default;
$toast-header-border-color: rgba(0, 0, 0, .05) !default; $toast-header-border-color: rgba($black, .05) !default;
// scss-docs-end toast-variables // scss-docs-end toast-variables
@ -1240,7 +1398,7 @@ $modal-title-line-height: $line-height-base !default;
$modal-content-color: null !default; $modal-content-color: null !default;
$modal-content-bg: $white !default; $modal-content-bg: $white !default;
$modal-content-border-color: rgba($black, .2) !default; $modal-content-border-color: var(--#{$prefix}border-color-translucent) !default;
$modal-content-border-width: $border-width !default; $modal-content-border-width: $border-width !default;
$modal-content-border-radius: $border-radius-lg !default; $modal-content-border-radius: $border-radius-lg !default;
$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default; $modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default;
@ -1249,14 +1407,17 @@ $modal-content-box-shadow-sm-up: $box-shadow !default;
$modal-backdrop-bg: $black !default; $modal-backdrop-bg: $black !default;
$modal-backdrop-opacity: .5 !default; $modal-backdrop-opacity: .5 !default;
$modal-header-border-color: $border-color !default;
$modal-footer-border-color: $modal-header-border-color !default; $modal-header-border-color: var(--#{$prefix}border-color) !default;
$modal-header-border-width: $modal-content-border-width !default; $modal-header-border-width: $modal-content-border-width !default;
$modal-footer-border-width: $modal-header-border-width !default;
$modal-header-padding-y: $modal-inner-padding !default; $modal-header-padding-y: $modal-inner-padding !default;
$modal-header-padding-x: $modal-inner-padding !default; $modal-header-padding-x: $modal-inner-padding !default;
$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility $modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility
$modal-footer-bg: null !default;
$modal-footer-border-color: $modal-header-border-color !default;
$modal-footer-border-width: $modal-header-border-width !default;
$modal-sm: 300px !default; $modal-sm: 300px !default;
$modal-md: 500px !default; $modal-md: 500px !default;
$modal-lg: 800px !default; $modal-lg: 800px !default;
@ -1338,7 +1499,7 @@ $list-group-action-active-bg: $gray-200 !default;
$thumbnail-padding: .25rem !default; $thumbnail-padding: .25rem !default;
$thumbnail-bg: $body-bg !default; $thumbnail-bg: $body-bg !default;
$thumbnail-border-width: $border-width !default; $thumbnail-border-width: $border-width !default;
$thumbnail-border-color: $gray-300 !default; $thumbnail-border-color: var(--#{$prefix}border-color) !default;
$thumbnail-border-radius: $border-radius !default; $thumbnail-border-radius: $border-radius !default;
$thumbnail-box-shadow: $box-shadow-sm !default; $thumbnail-box-shadow: $box-shadow-sm !default;
// scss-docs-end thumbnail-variables // scss-docs-end thumbnail-variables
@ -1398,11 +1559,13 @@ $carousel-control-next-icon-bg: url("data:image/svg+xml,<svg xmlns='http://
$carousel-transition-duration: .6s !default; $carousel-transition-duration: .6s !default;
$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`) $carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)
// scss-docs-end carousel-variables
// scss-docs-start carousel-dark-variables
$carousel-dark-indicator-active-bg: $black !default; $carousel-dark-indicator-active-bg: $black !default;
$carousel-dark-caption-color: $black !default; $carousel-dark-caption-color: $black !default;
$carousel-dark-control-icon-filter: invert(1) grayscale(100) !default; $carousel-dark-control-icon-filter: invert(1) grayscale(100) !default;
// scss-docs-end carousel-variables // scss-docs-end carousel-dark-variables
// Spinners // Spinners
@ -1428,7 +1591,7 @@ $btn-close-height: $btn-close-width !default;
$btn-close-padding-x: .25em !default; $btn-close-padding-x: .25em !default;
$btn-close-padding-y: $btn-close-padding-x !default; $btn-close-padding-y: $btn-close-padding-x !default;
$btn-close-color: $black !default; $btn-close-color: $black !default;
$btn-close-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$btn-close-color}'><path d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/></svg>") !default; $btn-close-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$btn-close-color}'><path d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/></svg>") !default;
$btn-close-focus-shadow: $input-btn-focus-box-shadow !default; $btn-close-focus-shadow: $input-btn-focus-box-shadow !default;
$btn-close-opacity: .5 !default; $btn-close-opacity: .5 !default;
$btn-close-hover-opacity: .75 !default; $btn-close-hover-opacity: .75 !default;
@ -1452,6 +1615,8 @@ $offcanvas-title-line-height: $modal-title-line-height !default;
$offcanvas-bg-color: $modal-content-bg !default; $offcanvas-bg-color: $modal-content-bg !default;
$offcanvas-color: $modal-content-color !default; $offcanvas-color: $modal-content-color !default;
$offcanvas-box-shadow: $modal-content-box-shadow-xs !default; $offcanvas-box-shadow: $modal-content-box-shadow-xs !default;
$offcanvas-backdrop-bg: $modal-backdrop-bg !default;
$offcanvas-backdrop-opacity: $modal-backdrop-opacity !default;
// scss-docs-end offcanvas-variables // scss-docs-end offcanvas-variables
// Code // Code
@ -1459,10 +1624,11 @@ $offcanvas-box-shadow: $modal-content-box-shadow-xs !default;
$code-font-size: $small-font-size !default; $code-font-size: $small-font-size !default;
$code-color: $pink !default; $code-color: $pink !default;
$kbd-padding-y: .2rem !default; $kbd-padding-y: .1875rem !default;
$kbd-padding-x: .4rem !default; $kbd-padding-x: .375rem !default;
$kbd-font-size: $code-font-size !default; $kbd-font-size: $code-font-size !default;
$kbd-color: $white !default; $kbd-color: var(--#{$prefix}body-bg) !default;
$kbd-bg: $gray-900 !default; $kbd-bg: var(--#{$prefix}body-color) !default;
$nested-kbd-font-weight: null !default; // Deprecated in v5.2.0, removing in v6
$pre-color: null !default; $pre-color: null !default;

View file

@ -1,14 +1,11 @@
/*! @import "mixins/banner";
* Bootstrap Grid v5.0.2 (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)
*/
$include-column-box-sizing: true !default; $include-column-box-sizing: true !default;
@import "functions"; @import "functions";
@import "variables"; @import "variables";
@import "maps";
@import "mixins/lists"; @import "mixins/lists";
@import "mixins/breakpoints"; @import "mixins/breakpoints";
@ -18,6 +15,8 @@ $include-column-box-sizing: true !default;
@import "vendor/rfs"; @import "vendor/rfs";
@import "root";
@import "containers"; @import "containers";
@import "grid"; @import "grid";

View file

@ -1,15 +1,9 @@
/*! @import "mixins/banner";
* Bootstrap Reboot v5.0.2 (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";
// Prevent the usage of custom properties since we don't add them to `:root` in reboot @import "maps";
$font-family-base: $font-family-sans-serif; // stylelint-disable-line scss/dollar-variable-default
$font-family-code: $font-family-monospace; // stylelint-disable-line scss/dollar-variable-default
@import "mixins"; @import "mixins";
@import "root";
@import "reboot"; @import "reboot";

View file

@ -1,13 +1,10 @@
/*! @import "mixins/banner";
* Bootstrap Utilities v5.0.2 (https://getbootstrap.com/) @include bsBanner(Utilities);
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
// Configuration // Configuration
@import "functions"; @import "functions";
@import "variables"; @import "variables";
@import "maps";
@import "mixins"; @import "mixins";
@import "utilities"; @import "utilities";

View file

@ -1,14 +1,12 @@
/*! @import "mixins/banner";
* Bootstrap v5.0.2 (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 // scss-docs-start import-stack
// Configuration // Configuration
@import "functions"; @import "functions";
@import "variables"; @import "variables";
@import "maps";
@import "mixins"; @import "mixins";
@import "utilities"; @import "utilities";
@ -43,6 +41,7 @@
@import "carousel"; @import "carousel";
@import "spinners"; @import "spinners";
@import "offcanvas"; @import "offcanvas";
@import "placeholders";
// Helpers // Helpers
@import "helpers"; @import "helpers";

View file

@ -2,6 +2,7 @@
position: relative; position: relative;
> .form-control, > .form-control,
> .form-control-plaintext,
> .form-select { > .form-select {
height: $form-floating-height; height: $form-floating-height;
line-height: $form-floating-line-height; line-height: $form-floating-line-height;
@ -11,16 +12,21 @@
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%;
height: 100%; // allow textareas height: 100%; // allow textareas
padding: $form-floating-padding-y $form-floating-padding-x; padding: $form-floating-padding-y $form-floating-padding-x;
overflow: hidden;
text-align: start;
text-overflow: ellipsis;
white-space: nowrap;
pointer-events: none; pointer-events: none;
border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model 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; transform-origin: 0 0;
@include transition($form-floating-transition); @include transition($form-floating-transition);
} }
// stylelint-disable no-duplicate-selectors > .form-control,
> .form-control { > .form-control-plaintext {
padding: $form-floating-padding-y $form-floating-padding-x; padding: $form-floating-padding-y $form-floating-padding-x;
&::placeholder { &::placeholder {
@ -46,6 +52,7 @@
> .form-control:focus, > .form-control:focus,
> .form-control:not(:placeholder-shown), > .form-control:not(:placeholder-shown),
> .form-control-plaintext,
> .form-select { > .form-select {
~ label { ~ label {
opacity: $form-floating-label-opacity; opacity: $form-floating-label-opacity;
@ -59,5 +66,10 @@
transform: $form-floating-label-transform; transform: $form-floating-label-transform;
} }
} }
// stylelint-enable no-duplicate-selectors
> .form-control-plaintext {
~ label {
border-width: $input-border-width 0; // Required to properly position label text - as explained above
}
}
} }

View file

@ -14,6 +14,18 @@
} }
} }
.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 { .form-check-input {
width: $form-check-input-width; width: $form-check-input-width;
height: $form-check-input-width; height: $form-check-input-width;
@ -25,7 +37,7 @@
background-size: contain; background-size: contain;
border: $form-check-input-border; border: $form-check-input-border;
appearance: none; appearance: none;
color-adjust: exact; // Keep themed appearance for print print-color-adjust: exact; // Keep themed appearance for print
@include transition($form-check-transition); @include transition($form-check-transition);
&[type="checkbox"] { &[type="checkbox"] {
@ -53,7 +65,7 @@
&[type="checkbox"] { &[type="checkbox"] {
@if $enable-gradients { @if $enable-gradients {
background-image: escape-svg($form-check-input-checked-bg-image), var(--#{$variable-prefix}gradient); background-image: escape-svg($form-check-input-checked-bg-image), var(--#{$prefix}gradient);
} @else { } @else {
background-image: escape-svg($form-check-input-checked-bg-image); background-image: escape-svg($form-check-input-checked-bg-image);
} }
@ -61,7 +73,7 @@
&[type="radio"] { &[type="radio"] {
@if $enable-gradients { @if $enable-gradients {
background-image: escape-svg($form-check-radio-checked-bg-image), var(--#{$variable-prefix}gradient); background-image: escape-svg($form-check-radio-checked-bg-image), var(--#{$prefix}gradient);
} @else { } @else {
background-image: escape-svg($form-check-radio-checked-bg-image); background-image: escape-svg($form-check-radio-checked-bg-image);
} }
@ -73,7 +85,7 @@
border-color: $form-check-input-indeterminate-border-color; border-color: $form-check-input-indeterminate-border-color;
@if $enable-gradients { @if $enable-gradients {
background-image: escape-svg($form-check-input-indeterminate-bg-image), var(--#{$variable-prefix}gradient); background-image: escape-svg($form-check-input-indeterminate-bg-image), var(--#{$prefix}gradient);
} @else { } @else {
background-image: escape-svg($form-check-input-indeterminate-bg-image); background-image: escape-svg($form-check-input-indeterminate-bg-image);
} }
@ -90,6 +102,7 @@
&[disabled], &[disabled],
&:disabled { &:disabled {
~ .form-check-label { ~ .form-check-label {
cursor: default;
opacity: $form-check-label-disabled-opacity; opacity: $form-check-label-disabled-opacity;
} }
} }
@ -123,12 +136,22 @@
background-position: $form-switch-checked-bg-position; background-position: $form-switch-checked-bg-position;
@if $enable-gradients { @if $enable-gradients {
background-image: escape-svg($form-switch-checked-bg-image), var(--#{$variable-prefix}gradient); background-image: escape-svg($form-switch-checked-bg-image), var(--#{$prefix}gradient);
} @else { } @else {
background-image: escape-svg($form-switch-checked-bg-image); background-image: 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 { .form-check-inline {

View file

@ -59,13 +59,13 @@
opacity: 1; opacity: 1;
} }
// Disabled and read-only inputs // Disabled inputs
// //
// HTML5 says that controls under a fieldset > legend:first-child won't be // HTML5 says that controls under a fieldset > legend:first-child won't be
// disabled if the fieldset is disabled. Due to implementation difficulty, we // disabled if the fieldset is disabled. Due to implementation difficulty, we
// don't honor that edge case; we style them as disabled anyway. // don't honor that edge case; we style them as disabled anyway.
&:disabled, &:disabled {
&[readonly] { color: $input-disabled-color;
background-color: $input-disabled-bg; background-color: $input-disabled-bg;
border-color: $input-disabled-border-color; border-color: $input-disabled-border-color;
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655. // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
@ -91,25 +91,6 @@
&:hover:not(:disabled):not([readonly])::file-selector-button { &:hover:not(:disabled):not([readonly])::file-selector-button {
background-color: $form-file-button-hover-bg; background-color: $form-file-button-hover-bg;
} }
&::-webkit-file-upload-button {
padding: $input-padding-y $input-padding-x;
margin: (-$input-padding-y) (-$input-padding-x);
margin-inline-end: $input-padding-x;
color: $form-file-button-color;
@include gradient-bg($form-file-button-bg);
pointer-events: none;
border-color: inherit;
border-style: solid;
border-width: 0;
border-inline-end-width: $input-border-width;
border-radius: 0; // stylelint-disable-line property-disallowed-list
@include transition($btn-transition);
}
&:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
background-color: $form-file-button-hover-bg;
}
} }
// Readonly controls as plain text // Readonly controls as plain text
@ -128,6 +109,10 @@
border: solid transparent; border: solid transparent;
border-width: $input-border-width 0; border-width: $input-border-width 0;
&:focus {
outline: 0;
}
&.form-control-sm, &.form-control-sm,
&.form-control-lg { &.form-control-lg {
padding-right: 0; padding-right: 0;
@ -153,12 +138,6 @@
margin: (-$input-padding-y-sm) (-$input-padding-x-sm); margin: (-$input-padding-y-sm) (-$input-padding-x-sm);
margin-inline-end: $input-padding-x-sm; margin-inline-end: $input-padding-x-sm;
} }
&::-webkit-file-upload-button {
padding: $input-padding-y-sm $input-padding-x-sm;
margin: (-$input-padding-y-sm) (-$input-padding-x-sm);
margin-inline-end: $input-padding-x-sm;
}
} }
.form-control-lg { .form-control-lg {
@ -172,12 +151,6 @@
margin: (-$input-padding-y-lg) (-$input-padding-x-lg); margin: (-$input-padding-y-lg) (-$input-padding-x-lg);
margin-inline-end: $input-padding-x-lg; margin-inline-end: $input-padding-x-lg;
} }
&::-webkit-file-upload-button {
padding: $input-padding-y-lg $input-padding-x-lg;
margin: (-$input-padding-y-lg) (-$input-padding-x-lg);
margin-inline-end: $input-padding-x-lg;
}
} }
// Make sure textareas don't shrink too much when resized // Make sure textareas don't shrink too much when resized
@ -199,8 +172,8 @@ textarea {
// stylelint-enable selector-no-qualifying-type // stylelint-enable selector-no-qualifying-type
.form-control-color { .form-control-color {
max-width: 3rem; width: $form-color-width;
height: auto; // Override fixed browser height height: $input-height;
padding: $input-padding-y; padding: $input-padding-y;
&:not(:disabled):not([readonly]) { &:not(:disabled):not([readonly]) {
@ -208,12 +181,14 @@ textarea {
} }
&::-moz-color-swatch { &::-moz-color-swatch {
height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height); border: 0 !important; // stylelint-disable-line declaration-no-important
@include border-radius($input-border-radius); @include border-radius($input-border-radius);
} }
&::-webkit-color-swatch { &::-webkit-color-swatch {
height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
@include border-radius($input-border-radius); @include border-radius($input-border-radius);
} }
&.form-control-sm { height: $input-height-sm; }
&.form-control-lg { height: $input-height-lg; }
} }

View file

@ -7,7 +7,6 @@
display: block; display: block;
width: 100%; width: 100%;
padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x; padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x;
// stylelint-disable-next-line property-no-vendor-prefix
-moz-padding-start: subtract($form-select-padding-x, 3px); // See https://github.com/twbs/bootstrap/issues/32636 -moz-padding-start: subtract($form-select-padding-x, 3px); // See https://github.com/twbs/bootstrap/issues/32636
font-family: $form-select-font-family; font-family: $form-select-font-family;
@include font-size($form-select-font-size); @include font-size($form-select-font-size);
@ -60,6 +59,7 @@
padding-bottom: $form-select-padding-y-sm; padding-bottom: $form-select-padding-y-sm;
padding-left: $form-select-padding-x-sm; padding-left: $form-select-padding-x-sm;
@include font-size($form-select-font-size-sm); @include font-size($form-select-font-size-sm);
@include border-radius($form-select-border-radius-sm);
} }
.form-select-lg { .form-select-lg {
@ -67,4 +67,5 @@
padding-bottom: $form-select-padding-y-lg; padding-bottom: $form-select-padding-y-lg;
padding-left: $form-select-padding-x-lg; padding-left: $form-select-padding-x-lg;
@include font-size($form-select-font-size-lg); @include font-size($form-select-font-size-lg);
@include border-radius($form-select-border-radius-lg);
} }

View file

@ -10,7 +10,8 @@
width: 100%; width: 100%;
> .form-control, > .form-control,
> .form-select { > .form-select,
> .form-floating {
position: relative; // For focus state's z-index position: relative; // For focus state's z-index
flex: 1 1 auto; flex: 1 1 auto;
width: 1%; width: 1%;
@ -19,8 +20,9 @@
// Bring the "active" form control to the top of surrounding elements // Bring the "active" form control to the top of surrounding elements
> .form-control:focus, > .form-control:focus,
> .form-select:focus { > .form-select:focus,
z-index: 3; > .form-floating:focus-within {
z-index: 5;
} }
// Ensure buttons are always above inputs for more visually pleasing borders. // Ensure buttons are always above inputs for more visually pleasing borders.
@ -31,7 +33,7 @@
z-index: 2; z-index: 2;
&:focus { &:focus {
z-index: 3; z-index: 5;
} }
} }
} }
@ -96,15 +98,19 @@
// stylelint-disable-next-line no-duplicate-selectors // stylelint-disable-next-line no-duplicate-selectors
.input-group { .input-group {
&:not(.has-validation) { &:not(.has-validation) {
> :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu), > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
> .dropdown-toggle:nth-last-child(n + 3) { > .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); @include border-end-radius(0);
} }
} }
&.has-validation { &.has-validation {
> :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu), > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
> .dropdown-toggle:nth-last-child(n + 4) { > .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); @include border-end-radius(0);
} }
} }
@ -118,4 +124,9 @@
margin-left: -$input-border-width; margin-left: -$input-border-width;
@include border-start-radius(0); @include border-start-radius(0);
} }
> .form-floating:not(:first-child) > .form-control,
> .form-floating:not(:first-child) > .form-select {
@include border-start-radius(0);
}
} }

View file

@ -0,0 +1,10 @@
// stylelint-disable function-name-case
// All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
@each $color, $value in $theme-colors {
$color-rgb: to-rgb($value);
.text-bg-#{$color} {
color: color-contrast($value) if($enable-important-utilities, !important, null);
background-color: RGBA($color-rgb, var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
}
}

View file

@ -1,11 +1,11 @@
@each $color, $value in $theme-colors { @each $color, $value in $theme-colors {
.link-#{$color} { .link-#{$color} {
color: $value; color: $value !important; // stylelint-disable-line declaration-no-important
@if $link-shade-percentage != 0 { @if $link-shade-percentage != 0 {
&:hover, &:hover,
&:focus { &:focus {
color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage)); color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage)) !important; // stylelint-disable-line declaration-no-important
} }
} }
} }

View file

@ -16,7 +16,7 @@
z-index: $zindex-fixed; z-index: $zindex-fixed;
} }
// Responsive sticky top // Responsive sticky top and bottom
@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);
@ -26,5 +26,11 @@
top: 0; top: 0;
z-index: $zindex-sticky; z-index: $zindex-sticky;
} }
.sticky#{$infix}-bottom {
position: sticky;
bottom: 0;
z-index: $zindex-sticky;
}
} }
} }

View file

@ -6,7 +6,7 @@
&::before { &::before {
display: block; display: block;
padding-top: var(--#{$variable-prefix}aspect-ratio); padding-top: var(--#{$prefix}aspect-ratio);
content: ""; content: "";
} }
@ -21,6 +21,6 @@
@each $key, $ratio in $aspect-ratios { @each $key, $ratio in $aspect-ratios {
.ratio-#{$key} { .ratio-#{$key} {
--#{$variable-prefix}aspect-ratio: #{$ratio}; --#{$prefix}aspect-ratio: #{$ratio};
} }
} }

View file

@ -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

View file

@ -0,0 +1,8 @@
.vr {
display: inline-block;
align-self: stretch;
width: 1px;
min-height: 1em;
background-color: currentcolor;
opacity: $hr-opacity;
}

View file

@ -1,8 +1,12 @@
// scss-docs-start alert-variant-mixin // scss-docs-start alert-variant-mixin
@mixin alert-variant($background, $border, $color) { @mixin alert-variant($background, $border, $color) {
color: $color; --#{$prefix}alert-color: #{$color};
@include gradient-bg($background); --#{$prefix}alert-bg: #{$background};
border-color: $border; --#{$prefix}alert-border-color: #{$border};
@if $enable-gradients {
background-image: var(--#{$prefix}gradient);
}
.alert-link { .alert-link {
color: shade-color($color, 20%); color: shade-color($color, 20%);

View file

@ -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; }
}

View file

@ -0,0 +1,9 @@
@mixin bsBanner($file) {
/*!
* Bootstrap #{$file} v5.2.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
}

View file

@ -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,9 +10,9 @@
// //
// >> 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);
@ -24,7 +24,7 @@
// 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);
@ -38,7 +38,7 @@
// 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(md, (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) {
$max: map-get($breakpoints, $name); $max: map-get($breakpoints, $name);
@ -48,9 +48,9 @@
// 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}");
@ -109,7 +109,7 @@
@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);
$next: breakpoint-next($name, $breakpoints); $next: breakpoint-next($name, $breakpoints);
$max: breakpoint-max($next); $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) {

View file

@ -18,59 +18,20 @@
$disabled-border: $border, $disabled-border: $border,
$disabled-color: color-contrast($disabled-background) $disabled-color: color-contrast($disabled-background)
) { ) {
color: $color; --#{$prefix}btn-color: #{$color};
@include gradient-bg($background); --#{$prefix}btn-bg: #{$background};
border-color: $border; --#{$prefix}btn-border-color: #{$border};
@include box-shadow($btn-box-shadow); --#{$prefix}btn-hover-color: #{$hover-color};
--#{$prefix}btn-hover-bg: #{$hover-background};
&:hover { --#{$prefix}btn-hover-border-color: #{$hover-border};
color: $hover-color; --#{$prefix}btn-focus-shadow-rgb: #{to-rgb(mix($color, $border, 15%))};
@include gradient-bg($hover-background); --#{$prefix}btn-active-color: #{$active-color};
border-color: $hover-border; --#{$prefix}btn-active-bg: #{$active-background};
} --#{$prefix}btn-active-border-color: #{$active-border};
--#{$prefix}btn-active-shadow: #{$btn-active-box-shadow};
.btn-check:focus + &, --#{$prefix}btn-disabled-color: #{$disabled-color};
&:focus { --#{$prefix}btn-disabled-bg: #{$disabled-background};
color: $hover-color; --#{$prefix}btn-disabled-border-color: #{$disabled-border};
@include gradient-bg($hover-background);
border-color: $hover-border;
@if $enable-shadows {
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $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, $border, 15%), .5);
}
}
.btn-check:checked + &,
.btn-check:active + &,
&:active,
&.active,
.show > &.dropdown-toggle {
color: $active-color;
background-color: $active-background;
// Remove CSS gradients if they're enabled
background-image: if($enable-gradients, none, null);
border-color: $active-border;
&:focus {
@if $enable-shadows {
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $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, $border, 15%), .5);
}
}
}
&:disabled,
&.disabled {
color: $disabled-color;
background-color: $disabled-background;
// Remove CSS gradients if they're enabled
background-image: if($enable-gradients, none, null);
border-color: $disabled-border;
}
} }
// scss-docs-end btn-variant-mixin // scss-docs-end btn-variant-mixin
@ -82,52 +43,28 @@
$active-border: $color, $active-border: $color,
$active-color: color-contrast($active-background) $active-color: color-contrast($active-background)
) { ) {
color: $color; --#{$prefix}btn-color: #{$color};
border-color: $color; --#{$prefix}btn-border-color: #{$color};
--#{$prefix}btn-hover-color: #{$color-hover};
&:hover { --#{$prefix}btn-hover-bg: #{$active-background};
color: $color-hover; --#{$prefix}btn-hover-border-color: #{$active-border};
background-color: $active-background; --#{$prefix}btn-focus-shadow-rgb: #{to-rgb($color)};
border-color: $active-border; --#{$prefix}btn-active-color: #{$active-color};
} --#{$prefix}btn-active-bg: #{$active-background};
--#{$prefix}btn-active-border-color: #{$active-border};
.btn-check:focus + &, --#{$prefix}btn-active-shadow: #{$btn-active-box-shadow};
&:focus { --#{$prefix}btn-disabled-color: #{$color};
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); --#{$prefix}btn-disabled-bg: transparent;
} --#{$prefix}btn-disabled-border-color: #{$color};
--#{$prefix}gradient: none;
.btn-check:checked + &,
.btn-check:active + &,
&:active,
&.active,
&.dropdown-toggle.show {
color: $active-color;
background-color: $active-background;
border-color: $active-border;
&:focus {
@if $enable-shadows {
@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);
}
}
}
&:disabled,
&.disabled {
color: $color;
background-color: transparent;
}
} }
// scss-docs-end btn-outline-variant-mixin // scss-docs-end btn-outline-variant-mixin
// scss-docs-start btn-size-mixin // scss-docs-start btn-size-mixin
@mixin button-size($padding-y, $padding-x, $font-size, $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};
// Manually declare to provide an override to the browser default @include rfs($font-size, --#{$prefix}btn-font-size);
@include border-radius($border-radius, 0); --#{$prefix}btn-border-radius: #{$border-radius};
} }
// scss-docs-end btn-size-mixin // scss-docs-end btn-size-mixin

View file

@ -1,9 +1,11 @@
// Container mixins // Container mixins
@mixin make-container($gutter: $container-padding-x) { @mixin make-container($gutter: $container-padding-x) {
--#{$prefix}gutter-x: #{$gutter};
--#{$prefix}gutter-y: 0;
width: 100%; width: 100%;
padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter}); padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter}); padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
} }

View file

@ -104,6 +104,14 @@
} }
} }
.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: $color; border-color: $color;
@ -127,16 +135,16 @@
} }
} }
.input-group .form-control, .input-group {
.input-group .form-select { > .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) {
@if $state == "valid" { @if $state == "valid" {
z-index: 1;
} @else if $state == "invalid" {
z-index: 2;
}
&:focus {
z-index: 3; z-index: 3;
} @else if $state == "invalid" {
z-index: 4;
}
} }
} }
} }

View file

@ -5,7 +5,7 @@
background-color: $color; background-color: $color;
@if $enable-gradients { @if $enable-gradients {
background-image: var(--#{$variable-prefix}gradient); background-image: var(--#{$prefix}gradient);
} }
} }
// scss-docs-end gradient-bg-mixin // scss-docs-end gradient-bg-mixin

View file

@ -3,16 +3,17 @@
// Generate semantic grid columns with these mixins. // Generate semantic grid columns with these mixins.
@mixin make-row($gutter: $grid-gutter-width) { @mixin make-row($gutter: $grid-gutter-width) {
--#{$variable-prefix}gutter-x: #{$gutter}; --#{$prefix}gutter-x: #{$gutter};
--#{$variable-prefix}gutter-y: 0; --#{$prefix}gutter-y: 0;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list // TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed
margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list margin-top: calc(-1 * var(--#{$prefix}gutter-y)); // stylelint-disable-line function-disallowed-list
margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // 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
} }
@mixin make-col-ready($gutter: $grid-gutter-width) { @mixin make-col-ready() {
// Add box sizing if only the grid is loaded // Add box sizing if only the grid is loaded
box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null); box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
// Prevent columns from becoming too narrow when at smaller grid tiers by // Prevent columns from becoming too narrow when at smaller grid tiers by
@ -21,9 +22,9 @@
flex-shrink: 0; flex-shrink: 0;
width: 100%; width: 100%;
max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
padding-left: calc(var(--#{$variable-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(--#{$variable-prefix}gutter-y); margin-top: var(--#{$prefix}gutter-y);
} }
@mixin make-col($size: false, $columns: $grid-columns) { @mixin make-col($size: false, $columns: $grid-columns) {
@ -50,7 +51,7 @@
// 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) {
> * { > * {
@ -66,8 +67,8 @@
@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) { @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
@each $breakpoint in map-keys($breakpoints) { @each $breakpoint in map-keys($breakpoints) {
// .row-cols defaults must all appear before .col overrides so they can be overridden.
$infix: breakpoint-infix($breakpoint, $breakpoints); $infix: breakpoint-infix($breakpoint, $breakpoints);
@include media-breakpoint-up($breakpoint, $breakpoints) { @include media-breakpoint-up($breakpoint, $breakpoints) {
// Provide basic `.col-{bp}` classes for equal-width flexbox columns // Provide basic `.col-{bp}` classes for equal-width flexbox columns
.col#{$infix} { .col#{$infix} {
@ -85,13 +86,7 @@
} }
} }
} }
}
}
@each $breakpoint in map-keys($breakpoints) {
$infix: breakpoint-infix($breakpoint, $breakpoints);
@include media-breakpoint-up($breakpoint, $breakpoints) {
.col#{$infix}-auto { .col#{$infix}-auto {
@include make-col-auto(); @include make-col-auto();
} }
@ -119,12 +114,36 @@
@each $key, $value in $gutters { @each $key, $value in $gutters {
.g#{$infix}-#{$key}, .g#{$infix}-#{$key},
.gx#{$infix}-#{$key} { .gx#{$infix}-#{$key} {
--#{$variable-prefix}gutter-x: #{$value}; --#{$prefix}gutter-x: #{$value};
} }
.g#{$infix}-#{$key}, .g#{$infix}-#{$key},
.gy#{$infix}-#{$key} { .gy#{$infix}-#{$key} {
--#{$variable-prefix}gutter-y: #{$value}; --#{$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;
}
} }
} }
} }

View file

@ -2,30 +2,9 @@
// scss-docs-start pagination-mixin // scss-docs-start pagination-mixin
@mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) { @mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
.page-link { --#{$prefix}pagination-padding-x: #{$padding-x};
padding: $padding-y $padding-x; --#{$prefix}pagination-padding-y: #{$padding-y};
@include font-size($font-size); @include rfs($font-size, --#{$prefix}pagination-font-size);
} --#{$prefix}pagination-border-radius: #{$border-radius};
.page-item {
@if $pagination-margin-start == (-$pagination-border-width) {
&:first-child {
.page-link {
@include border-start-radius($border-radius);
}
}
&:last-child {
.page-link {
@include border-end-radius($border-radius);
}
}
} @else {
//Add border-radius to all pageLinks in case they have left margin
.page-link {
@include border-radius($border-radius);
}
}
}
} }
// scss-docs-end pagination-mixin // scss-docs-end pagination-mixin

View file

@ -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;
} }

View file

@ -5,17 +5,20 @@
$hover-bg: mix($color, $background, percentage($table-hover-bg-factor)); $hover-bg: mix($color, $background, percentage($table-hover-bg-factor));
$striped-bg: mix($color, $background, percentage($table-striped-bg-factor)); $striped-bg: mix($color, $background, percentage($table-striped-bg-factor));
$active-bg: mix($color, $background, percentage($table-active-bg-factor)); $active-bg: mix($color, $background, percentage($table-active-bg-factor));
$table-border-color: mix($color, $background, percentage($table-border-factor));
--#{$variable-prefix}table-bg: #{$background}; --#{$prefix}table-color: #{$color};
--#{$variable-prefix}table-striped-bg: #{$striped-bg}; --#{$prefix}table-bg: #{$background};
--#{$variable-prefix}table-striped-color: #{color-contrast($striped-bg)}; --#{$prefix}table-border-color: #{$table-border-color};
--#{$variable-prefix}table-active-bg: #{$active-bg}; --#{$prefix}table-striped-bg: #{$striped-bg};
--#{$variable-prefix}table-active-color: #{color-contrast($active-bg)}; --#{$prefix}table-striped-color: #{color-contrast($striped-bg)};
--#{$variable-prefix}table-hover-bg: #{$hover-bg}; --#{$prefix}table-active-bg: #{$active-bg};
--#{$variable-prefix}table-hover-color: #{color-contrast($hover-bg)}; --#{$prefix}table-active-color: #{color-contrast($active-bg)};
--#{$prefix}table-hover-bg: #{$hover-bg};
--#{$prefix}table-hover-color: #{color-contrast($hover-bg)};
color: $color; color: var(--#{$prefix}table-color);
border-color: mix($color, $background, percentage($table-border-factor)); border-color: var(--#{$prefix}table-border-color);
} }
} }
// scss-docs-end table-variant // scss-docs-end table-variant

View file

@ -20,12 +20,15 @@
$property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1)); $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));
$property-class: if($property-class == null, "", $property-class); $property-class: if($property-class == null, "", $property-class);
// Use custom CSS variable name if present, otherwise default to `class`
$css-variable-name: if(map-has-key($utility, css-variable-name), map-get($utility, css-variable-name), map-get($utility, class));
// State params to generate pseudo-classes // State params to generate pseudo-classes
$state: if(map-has-key($utility, state), map-get($utility, state), ()); $state: if(map-has-key($utility, state), map-get($utility, state), ());
$infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix); $infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix);
// Don't prefix if value key is null (eg. with shadow class) // Don't prefix if value key is null (e.g. with shadow class)
$property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, ""); $property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
@if map-get($utility, rfs) { @if map-get($utility, rfs) {
@ -41,14 +44,33 @@
} }
} }
$is-css-var: map-get($utility, css-var);
$is-local-vars: map-get($utility, local-vars);
$is-rtl: map-get($utility, rtl); $is-rtl: map-get($utility, rtl);
@if $value != null { @if $value != null {
@if $is-rtl == false { @if $is-rtl == false {
/* rtl:begin:remove */ /* rtl:begin:remove */
} }
@if $is-css-var {
.#{$property-class + $infix + $property-class-modifier} {
--#{$prefix}#{$css-variable-name}: #{$value};
}
@each $pseudo in $state {
.#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
--#{$prefix}#{$css-variable-name}: #{$value};
}
}
} @else {
.#{$property-class + $infix + $property-class-modifier} { .#{$property-class + $infix + $property-class-modifier} {
@each $property in $properties { @each $property in $properties {
@if $is-local-vars {
@each $local-var, $variable in $is-local-vars {
--#{$prefix}#{$local-var}: #{$variable};
}
}
#{$property}: $value if($enable-important-utilities, !important, null); #{$property}: $value if($enable-important-utilities, !important, null);
} }
} }
@ -56,10 +78,17 @@
@each $pseudo in $state { @each $pseudo in $state {
.#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} { .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
@each $property in $properties { @each $property in $properties {
@if $is-local-vars {
@each $local-var, $variable in $is-local-vars {
--#{$prefix}#{$local-var}: #{$variable};
}
}
#{$property}: $value if($enable-important-utilities, !important, null); #{$property}: $value if($enable-important-utilities, !important, null);
} }
} }
} }
}
@if $is-rtl == false { @if $is-rtl == false {
/* rtl:end:remove */ /* rtl:end:remove */
} }

View file

@ -3,7 +3,7 @@
// Hide content visually while keeping it accessible to assistive technologies // Hide content visually while keeping it accessible to assistive technologies
// //
// See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/ // See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/ // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
@mixin visually-hidden() { @mixin visually-hidden() {
position: absolute !important; position: absolute !important;

View file

@ -1,4 +1,4 @@
// Cerulean 5.0.2 // Cerulean 5.2.2
// Bootswatch // Bootswatch
@ -6,6 +6,10 @@
$text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default; $text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default;
:root {
color-scheme: light;
}
// Mixins // Mixins
@mixin btn-shadow($color){ @mixin btn-shadow($color){
@ -33,7 +37,8 @@ $text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default;
text-shadow: $text-shadow; text-shadow: $text-shadow;
} }
.btn-secondary { .btn-secondary,
.btn-outline-secondary {
color: $gray-700; color: $gray-700;
} }
@ -81,9 +86,3 @@ $text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default;
color: $dark; color: $dark;
} }
} }
.breadcrumb {
a {
text-decoration: none;
}
}

View file

@ -1,4 +1,4 @@
// Cerulean 5.0.2 // Cerulean 5.2.2
// Bootswatch // Bootswatch
$theme: "cerulean" !default; $theme: "cerulean" !default;
@ -59,8 +59,3 @@ $dropdown-link-hover-bg: $primary !default;
$navbar-dark-color: rgba($white, .8) !default; $navbar-dark-color: rgba($white, .8) !default;
$navbar-dark-hover-color: $white !default; $navbar-dark-hover-color: $white !default;
// Breadcrumbs
$breadcrumb-padding-y: .375rem !default;
$breadcrumb-padding-x: .75rem !default;

View file

@ -1,4 +1,4 @@
// Cosmo 5.0.2 // Cosmo 5.2.2
// Bootswatch // Bootswatch
@ -9,6 +9,10 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@3
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: light;
}
// Typography // Typography
body { body {
@ -33,9 +37,3 @@ body {
line-height: 8px; line-height: 8px;
} }
} }
.breadcrumb {
a {
text-decoration: none;
}
}

View file

@ -1,4 +1,4 @@
// Cosmo 5.0.2 // Cosmo 5.2.2
// Bootswatch // Bootswatch
$theme: "cosmo" !default; $theme: "cosmo" !default;
@ -67,10 +67,3 @@ $alert-border-width: 0 !default;
// Progress bars // Progress bars
$progress-height: .5rem !default; $progress-height: .5rem !default;
// Breadcrumbs
$breadcrumb-padding-y: .375rem !default;
$breadcrumb-padding-x: .75rem !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Cyborg 5.0.2 // Cyborg 5.2.2
// Bootswatch // Bootswatch
@ -9,6 +9,10 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&di
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: dark;
}
// Navbar // Navbar
.navbar { .navbar {
@ -55,6 +59,7 @@ legend {
} }
.form-control { .form-control {
color-scheme: light;
background-clip: border-box; background-clip: border-box;
&:disabled, &:disabled,
@ -76,8 +81,8 @@ legend {
&.disabled, &.disabled,
&.disabled:hover { &.disabled:hover {
background-color: transparent;
color: $nav-link-disabled-color; color: $nav-link-disabled-color;
background-color: transparent;
} }
&.active { &.active {
@ -89,7 +94,6 @@ legend {
.breadcrumb { .breadcrumb {
a { a {
color: $white; color: $white;
text-decoration: none;
} }
} }
@ -102,8 +106,8 @@ legend {
// Indicators // Indicators
.alert { .alert {
border: none;
color: $white; color: $white;
border: none;
a, a,
.alert-link { .alert-link {
@ -130,7 +134,7 @@ legend {
// Containers // Containers
.list-group-item { .list-group-item-action {
&:hover { &:hover {
border-color: $primary; border-color: $primary;

View file

@ -1,4 +1,4 @@
// Cyborg 5.0.2 // Cyborg 5.2.2
// Bootswatch // Bootswatch
$theme: "cyborg" !default; $theme: "cyborg" !default;
@ -19,7 +19,7 @@ $gray-800: #222 !default;
$gray-900: #212529 !default; $gray-900: #212529 !default;
$black: #000 !default; $black: #000 !default;
$blue: #105677 !default; $blue: #2a9fd6 !default;
$indigo: #6610f2 !default; $indigo: #6610f2 !default;
$purple: #6f42c1 !default; $purple: #6f42c1 !default;
$pink: #e83e8c !default; $pink: #e83e8c !default;
@ -75,6 +75,7 @@ $input-btn-padding-x: 1rem !default;
// Forms // Forms
$input-bg: $white !default;
$input-disabled-bg: $gray-400 !default; $input-disabled-bg: $gray-400 !default;
$input-color: $gray-900 !default; $input-color: $gray-900 !default;
@ -178,5 +179,3 @@ $btn-close-hover-opacity: 1 !default;
// Code // Code
$pre-color: inherit !default; $pre-color: inherit !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Darkly 5.0.2 // Darkly 5.2.2
// Bootswatch // Bootswatch
@ -9,6 +9,10 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: dark;
}
// Typography // Typography
.blockquote { .blockquote {
@ -19,6 +23,10 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
// Forms // Forms
.form-control {
color-scheme: light;
}
.input-group-addon { .input-group-addon {
color: $white; color: $white;
} }
@ -44,7 +52,6 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
.breadcrumb a { .breadcrumb a {
color: $white; color: $white;
text-decoration: none;
} }
.pagination { .pagination {
@ -56,8 +63,8 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
// Indicators // Indicators
.alert { .alert {
border: none;
color: $white; color: $white;
border: none;
a, a,
.alert-link { .alert-link {

View file

@ -1,4 +1,4 @@
// Darkly 5.0.2 // Darkly 5.2.2
// Bootswatch // Bootswatch
$theme: "darkly" !default; $theme: "darkly" !default;
@ -39,7 +39,7 @@ $danger: $red !default;
$light: $gray-500 !default; $light: $gray-500 !default;
$dark: $gray-800 !default; $dark: $gray-800 !default;
$min-contrast-ratio: 2.15 !default; $min-contrast-ratio: 1.9 !default;
// Body // Body
@ -61,13 +61,13 @@ $text-muted: $gray-600 !default;
// Tables // Tables
$table-accent-bg: transparent;
$table-border-color: $gray-700 !default; $table-border-color: $gray-700 !default;
$table-bg-scale: 0 !default; $table-bg-scale: 0 !default;
// Forms // Forms
$input-bg: $white !default;
$input-color: $gray-800 !default; $input-color: $gray-800 !default;
$input-border-color: $body-bg !default; $input-border-color: $body-bg !default;
$input-group-addon-color: $gray-500 !default; $input-group-addon-color: $gray-500 !default;
@ -98,7 +98,7 @@ $nav-tabs-link-active-border-color: $nav-tabs-border-color $nav-tabs-border-colo
// Navbar // Navbar
$navbar-padding-y: .75rem !default; $navbar-padding-y: 1rem !default;
$navbar-dark-color: rgba($white, .6) !default; $navbar-dark-color: rgba($white, .6) !default;
$navbar-dark-hover-color: $white !default; $navbar-dark-hover-color: $white !default;
$navbar-light-color: rgba($gray-900, .7) !default; $navbar-light-color: rgba($gray-900, .7) !default;
@ -171,5 +171,3 @@ $btn-close-hover-opacity: 1 !default;
// Code // Code
$pre-color: inherit !default; $pre-color: inherit !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Flatly 5.0.2 // Flatly 5.2.2
// Bootswatch // Bootswatch
@ -9,6 +9,10 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: light;
}
// Navbar // Navbar
.bg-primary { .bg-primary {
@ -47,15 +51,9 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
} }
} }
.breadcrumb {
a {
text-decoration: none;
}
}
.alert { .alert {
border: none;
color: $white; color: $white;
border: none;
a, a,
.alert-link { .alert-link {
@ -85,8 +83,9 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
// Containers // Containers
.modal, .modal,
.toast { .toast,
.offcanvas {
.btn-close { .btn-close {
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'><path d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/></svg>"); background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$black}'><path d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/></svg>"));
} }
} }

View file

@ -1,4 +1,4 @@
// Flatly 5.0.2 // Flatly 5.2.2
// Bootswatch // Bootswatch
$theme: "flatly" !default; $theme: "flatly" !default;
@ -66,13 +66,13 @@ $dropdown-link-hover-bg: $primary !default;
// Navs // Navs
$nav-link-padding-y: .5rem !default !default; $nav-link-padding-y: .5rem !default !default;
$nav-link-padding-x: 1.5rem !default; $nav-link-padding-x: 2rem !default;
$nav-link-disabled-color: $gray-600 !default !default; $nav-link-disabled-color: $gray-600 !default !default;
$nav-tabs-border-color: $gray-200 !default; $nav-tabs-border-color: $gray-200 !default;
// Navbar // Navbar
$navbar-padding-y: .7rem !default; $navbar-padding-y: 1rem !default;
$navbar-dark-color: $white !default; $navbar-dark-color: $white !default;
$navbar-dark-hover-color: $primary !default; $navbar-dark-hover-color: $primary !default;
$navbar-dark-active-color: $primary !default; $navbar-dark-active-color: $primary !default;
@ -111,5 +111,3 @@ $breadcrumb-border-radius: .25rem !default;
$btn-close-color: $white !default; $btn-close-color: $white !default;
$btn-close-opacity: .4 !default; $btn-close-opacity: .4 !default;
$btn-close-hover-opacity: 1 !default; $btn-close-hover-opacity: 1 !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Journal 5.0.2 // Journal 5.2.2
// Bootswatch // Bootswatch
@ -9,6 +9,10 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=News+Cycle:wght@400;70
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: light;
}
// Navbar // Navbar
.bg-dark { .bg-dark {
@ -16,8 +20,8 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=News+Cycle:wght@400;70
} }
.bg-light { .bg-light {
background-color: $white !important;
color: $black; color: $black;
background-color: $white !important;
border: 1px solid $gray-200; border: 1px solid $gray-200;
&.navbar-fixed-top { &.navbar-fixed-top {
@ -30,8 +34,8 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=News+Cycle:wght@400;70
} }
.navbar { .navbar {
font-size: 18px;
font-family: $headings-font-family; font-family: $headings-font-family;
font-size: 18px;
font-weight: $headings-font-weight; font-weight: $headings-font-weight;
} }
@ -54,12 +58,6 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=News+Cycle:wght@400;70
} }
} }
.breadcrumb {
a {
text-decoration: none;
}
}
// Navs // Navs
.pagination { .pagination {

View file

@ -1,4 +1,4 @@
// Journal 5.0.2 // Journal 5.2.2
// Bootswatch // Bootswatch
$theme: "journal" !default; $theme: "journal" !default;
@ -62,10 +62,3 @@ $navbar-light-active-color: $black !default;
$pagination-hover-color: $white !default; $pagination-hover-color: $white !default;
$pagination-hover-bg: $primary !default; $pagination-hover-bg: $primary !default;
$pagination-hover-border-color: $primary !default; $pagination-hover-border-color: $primary !default;
// Breadcrumbs
$breadcrumb-padding-y: .375rem !default;
$breadcrumb-padding-x: .75rem !default;
$link-decoration: none !default;

View file

@ -1,6 +1,13 @@
// Litera 5.0.2 // Litera 5.2.2
// Bootswatch // Bootswatch
// Variables
:root {
color-scheme: light;
}
// Navbar // Navbar
.navbar { .navbar {
@ -39,8 +46,8 @@ footer {
} }
.lead { .lead {
color: $gray-600;
font-family: $font-family-sans-serif; font-family: $font-family-sans-serif;
color: $gray-600;
} }
// Tables // Tables
@ -65,8 +72,8 @@ table,
// Indicators // Indicators
.alert { .alert {
color: $white;
font-size: $font-size-sm; font-size: $font-size-sm;
color: $white;
&, &,
p { p {
@ -75,8 +82,8 @@ table,
a, a,
.alert-link { .alert-link {
color: $white;
font-weight: 400; font-weight: 400;
color: $white;
text-decoration: underline; text-decoration: underline;
} }
@ -110,9 +117,3 @@ table,
.list-group { .list-group {
font-size: $font-size-sm; font-size: $font-size-sm;
} }
.breadcrumb {
a {
text-decoration: none;
}
}

View file

@ -1,4 +1,4 @@
// Litera 5.0.2 // Litera 5.2.2
// Bootswatch // Bootswatch
$theme: "litera" !default; $theme: "litera" !default;
@ -98,10 +98,3 @@ $badge-padding-x: 1.2em !default;
// Alerts // Alerts
$alert-border-width: 0 !default; $alert-border-width: 0 !default;
// Breadcrumbs
$breadcrumb-padding-y: .375rem !default;
$breadcrumb-padding-x: .75rem !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Lumen 5.0.2 // Lumen 5.2.2
// Bootswatch // Bootswatch
@ -9,6 +9,10 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: light;
}
// Mixins // Mixins
@mixin shadow($width: 4px){ @mixin shadow($width: 4px){
@ -63,6 +67,10 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
} }
} }
.btn-outline-secondary {
color: $black;
}
[class*="btn-outline"] { [class*="btn-outline"] {
border-top-width: 1px; border-top-width: 1px;
} }
@ -97,15 +105,6 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
box-shadow: inset 0 2px 0 rgba(0, 0, 0, .075); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .075);
} }
.input-group-sm {
> .input-group-prepend,
> .input-group-append {
.btn {
font-size: $btn-font-size-sm;
}
}
}
// Navs // Navs
.nav { .nav {
@ -133,8 +132,8 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
&:not(.disabled):focus, &:not(.disabled):focus,
&.active { &.active {
padding-bottom: add(.5rem, 6px); padding-bottom: add(.5rem, 6px);
border-bottom-color: transparent;
margin-top: 0; margin-top: 0;
border-bottom-color: transparent;
} }
} }
@ -152,9 +151,6 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
.breadcrumb { .breadcrumb {
border-color: shade-color($breadcrumb-bg, 10%); border-color: shade-color($breadcrumb-bg, 10%);
a {
text-decoration: none;
}
@include shadow(); @include shadow();
} }
@ -163,16 +159,16 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
> li > span { > li > span {
position: relative; position: relative;
top: 0; top: 0;
@include shadow();
color: $pagination-color;
font-weight: 700; font-weight: 700;
color: $pagination-color;
text-transform: uppercase; text-transform: uppercase;
@include shadow();
&:hover, &:hover,
&:focus { &:focus {
top: 1px; top: 1px;
border-bottom-width: 3px;
text-decoration: none; text-decoration: none;
border-bottom-width: 3px;
} }
&:active { &:active {
@ -203,8 +199,8 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
&, &,
&:hover, &:hover,
&:active { &:active {
border-left-width: 2px;
border-right-width: 2px; border-right-width: 2px;
border-left-width: 2px;
} }
} }
} }
@ -326,8 +322,9 @@ a.list-group-item {
} }
.modal, .modal,
.toast { .toast,
.offcanvas {
.btn-close { .btn-close {
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'><path d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/></svg>"); background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$black}'><path d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/></svg>"));
} }
} }

View file

@ -1,4 +1,4 @@
// Lumen 5.0.2 // Lumen 5.2.2
// Bootswatch // Bootswatch
$theme: "lumen" !default; $theme: "lumen" !default;
@ -91,5 +91,3 @@ $modal-content-border-color: rgba($black, .1) !default;
$btn-close-color: $white !default; $btn-close-color: $white !default;
$btn-close-opacity: .4 !default; $btn-close-opacity: .4 !default;
$btn-close-hover-opacity: 1 !default; $btn-close-hover-opacity: 1 !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Lux 5.0.2 // Lux 5.2.2
// Bootswatch // Bootswatch
@ -9,12 +9,16 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;6
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: light;
}
// Navbar // Navbar
.navbar { .navbar {
font-size: $font-size-sm; font-size: $font-size-sm;
text-transform: uppercase;
font-weight: 600; font-weight: 600;
text-transform: uppercase;
&-nav { &-nav {
.nav-link { .nav-link {
@ -28,10 +32,6 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;6
} }
} }
.bg-primary {
background-color: theme-color("primary") !important;
}
.bg-light { .bg-light {
border: 1px solid rgba(0, 0, 0, .1); border: 1px solid rgba(0, 0, 0, .1);
@ -69,15 +69,15 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;6
} }
.btn-outline-secondary { .btn-outline-secondary {
border-color: $gray-600;
color: $gray-600; color: $gray-600;
border-color: $gray-600;
&:not([disabled]):not(.disabled):hover, &:not([disabled]):not(.disabled):hover,
&:not([disabled]):not(.disabled):focus, &:not([disabled]):not(.disabled):focus,
&:not([disabled]):not(.disabled):active { &:not([disabled]):not(.disabled):active {
color: $white;
background-color: $gray-400; background-color: $gray-400;
border-color: $gray-400; border-color: $gray-400;
color: $white;
} }
&:not([disabled]):not(.disabled):focus { &:not([disabled]):not(.disabled):focus {
@ -93,12 +93,6 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;6
border: 1px solid $gray-400 !important; border: 1px solid $gray-400 !important;
} }
.breadcrumb {
a {
text-decoration: none;
}
}
// Typography // Typography
body { body {
@ -165,7 +159,8 @@ th {
// Containers // Containers
.list-group-item { .list-group-item,
.card {
h1, h1,
h2, h2,
h3, h3,
@ -181,10 +176,3 @@ th {
color: inherit; color: inherit;
} }
} }
.card {
&-title,
&-header {
color: inherit;
}
}

View file

@ -1,4 +1,4 @@
// Lux 5.0.2 // Lux 5.2.2
// Bootswatch // Bootswatch
$theme: "lux" !default; $theme: "lux" !default;
@ -72,26 +72,25 @@ $input-btn-border-width: 0 !default;
// Buttons // Buttons
$btn-line-height: 1rem !default; $btn-line-height: 1.5rem !default;
$input-btn-padding-y: .5rem !default; $input-btn-padding-y: .75rem !default;
$input-btn-padding-x: 1rem !default; $input-btn-padding-x: 1.5rem !default;
$input-btn-padding-y-sm: .25rem !default; $input-btn-padding-y-sm: .5rem !default;
$input-btn-padding-x-sm: .75rem !default; $input-btn-padding-x-sm: 1rem !default;
$input-btn-padding-y-lg: 1rem !default; $input-btn-padding-y-lg: 2rem !default;
$input-btn-padding-x-lg: 1rem !default; $input-btn-padding-x-lg: 2rem !default;
$btn-font-weight: 600 !default; $btn-font-weight: 600 !default;
// Forms // Forms
$input-line-height: 1 !default; $input-line-height: 1.5 !default;
$input-bg: $gray-200 !default; $input-bg: $gray-200 !default;
$input-disabled-bg: $gray-300 !default; $input-disabled-bg: $gray-300 !default;
$input-group-addon-bg: $gray-300 !default; $input-group-addon-bg: $gray-300 !default;
// Navbar // Navbar
$nav-link-padding-x: .75rem !default; $navbar-padding-y: 1.5rem !default;
$navbar-padding-y: .75rem !default;
$navbar-dark-hover-color: $white !default; $navbar-dark-hover-color: $white !default;
$navbar-light-color: rgba($black, .3) !default; $navbar-light-color: rgba($black, .3) !default;
$navbar-light-hover-color: $gray-900 !default; $navbar-light-hover-color: $gray-900 !default;
@ -102,10 +101,3 @@ $navbar-light-active-color: $gray-900 !default;
$pagination-border-color: transparent !default; $pagination-border-color: transparent !default;
$pagination-hover-border-color: $pagination-border-color !default; $pagination-hover-border-color: $pagination-border-color !default;
$pagination-disabled-border-color: $pagination-border-color !default; $pagination-disabled-border-color: $pagination-border-color !default;
// Breadcrumbs
$breadcrumb-padding-y: .375rem !default;
$breadcrumb-padding-x: .75rem !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Materia 5.0.2 // Materia 5.2.2
// Bootswatch // Bootswatch
@ -9,27 +9,31 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: light;
}
// Mixins // Mixins
@mixin ripple($color) { @mixin ripple($color) {
position: relative; position: relative;
&::before { &::before {
content: "";
display: block;
position: absolute; position: absolute;
width: 100%;
height: 100%;
top: 0; top: 0;
left: 0; left: 0;
display: block;
width: 100%;
height: 100%;
margin-left: 0; margin-left: 0;
@include gradient-radial($color 10%, transparent 10.01%); pointer-events: none;
background-size: 1000% 1000%; content: "";
background-position: 50%; background-position: 50%;
background-size: 1000% 1000%;
border: none; border: none;
opacity: 0; opacity: 0;
pointer-events: none;
transition: background .5s, opacity 1s; transition: background .5s, opacity 1s;
@include gradient-radial($color 10%, transparent 10.01%);
} }
&:active::before { &:active::before {
@ -114,6 +118,16 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
} }
} }
.bg-primary,
.bg-success,
.bg-info,
.bg-warning,
.bg-danger,
.bg-dark,
.bg-black {
color-scheme: dark;
}
// Buttons // Buttons
@include btn(primary, $primary, $white); @include btn(primary, $primary, $white);
@ -132,14 +146,14 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
transition: color .4s, background-color .4s, border-color .4s, box-shadow .4s; transition: color .4s, background-color .4s, border-color .4s, box-shadow .4s;
&-link { &-link {
box-shadow: none;
color: $link-color; color: $link-color;
box-shadow: none;
&:hover, &:hover,
&:focus { &:focus {
box-shadow: none;
color: $link-hover-color; color: $link-hover-color;
text-decoration: $link-hover-decoration; text-decoration: $link-hover-decoration;
box-shadow: none;
} }
&.disabled, // Although btn-link is intended for buttons, which want to look like link, I include here a.disable for the sake of consistency &.disabled, // Although btn-link is intended for buttons, which want to look like link, I include here a.disable for the sake of consistency
@ -157,8 +171,8 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
&.disabled, &.disabled,
&[disabled], &[disabled],
fieldset[disabled] & { fieldset[disabled] & {
background-color: rgba(0, 0, 0, .1);
color: rgba(0, 0, 0, .4); color: rgba(0, 0, 0, .4);
background-color: rgba(0, 0, 0, .1);
opacity: 1; opacity: 1;
&:hover, &:hover,
@ -169,8 +183,8 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
} }
&-outline-secondary { &-outline-secondary {
border-color: $gray-200;
color: $gray-300; color: $gray-300;
border-color: $gray-200;
} }
&-warning { &-warning {
@ -232,8 +246,8 @@ p {
} }
.thead-inverse th { .thead-inverse th {
background-color: $primary;
color: $white; color: $white;
background-color: $primary;
} }
// Forms // Forms
@ -250,6 +264,10 @@ p {
} }
} }
.form-control {
color-scheme: inherit;
}
textarea, textarea,
textarea.form-control, textarea.form-control,
input.form-control, input.form-control,
@ -271,33 +289,25 @@ input[type="number"],
&[disabled], &[disabled],
&[readonly] { &[readonly] {
box-shadow: none;
border-bottom: 1px dotted #ddd; border-bottom: 1px dotted #ddd;
box-shadow: none;
} }
&[disabled], &[disabled],
&[disabled]::placeholder { &[disabled]::placeholder {
color: #ddd; color: #ddd;
} }
&::-ms-clear {
display: none;
}
} }
select, select,
select.form-control { select.form-control {
appearance: none;
padding: .5rem 0; padding: .5rem 0;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4' viewBox='0 0 8 4'%3e%3cpolygon fill='%23666' points='8 0 4 4 0 0'/%3e%3c/svg%3e%0a"); background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 4'><path fill='#{$gray-600}' d='M8 0 4 4 0 0z'/></svg>"));
background-size: 8px 4px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: right center; background-position: right center;
background-size: 8px 4px;
box-shadow: inset 0 -1px 0 #ddd; box-shadow: inset 0 -1px 0 #ddd;
appearance: none;
&::-ms-expand {
display: none;
}
&.input { &.input {
&-sm { &-sm {
@ -310,8 +320,8 @@ select.form-control {
} }
&:focus { &:focus {
background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 4'><path fill='#{$gray-900}' d='M8 0 4 4 0 0z'/></svg>"));
box-shadow: inset 0 -2px 0 $primary; box-shadow: inset 0 -2px 0 $primary;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4' viewBox='0 0 8 4'%3e%3cpolygon fill='%23212121' points='8 0 4 4 0 0'/%3e%3c/svg%3e%0a");
} }
&[multiple] { &[multiple] {
@ -326,30 +336,31 @@ select.form-control {
border: 2px solid $gray-400; border: 2px solid $gray-400;
&:checked[type="radio"] { &:checked[type="radio"] {
background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='2' fill='#{$blue}' stroke='#{$white}'/></svg>")), var(--bs-gradient);
background-size: 1.8em; background-size: 1.8em;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%232196f3' stroke='%23fff' stroke-width='1' /%3e%3c/svg%3e"), var(--bs-gradient);
} }
} }
.form-check.form-switch { .form-switch {
.form-check-input { .form-check-input {
position: relative; position: relative;
height: .8em; height: .8em;
border: none; margin-top: .29em;
background-image: none;
background-color: $gray-400; background-color: $gray-400;
background-image: none;
border: none;
&:focus { &:focus {
box-shadow: none; box-shadow: none;
} }
&::before { &::before {
content: "";
position: absolute; position: absolute;
top: -.2em; top: -.2em;
left: -.2em; left: -.2em;
width: 1.2em; width: 1.2em;
height: 1.2em; height: 1.2em;
content: "";
background-color: $white; background-color: $white;
border-radius: 50%; border-radius: 50%;
box-shadow: 0 1px 4px rgba(0, 0, 0, .3); box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
@ -357,17 +368,17 @@ select.form-control {
} }
&::after { &::after {
content: "";
position: absolute; position: absolute;
top: -.2em; top: -.2em;
left: -.2em; left: -.2em;
z-index: -1;
width: 1.2em; width: 1.2em;
height: 1.2em; height: 1.2em;
content: "";
border-radius: 50%; border-radius: 50%;
box-shadow: 0 0 0 9px rgba(0, 0, 0, .05); box-shadow: 0 0 0 9px rgba(0, 0, 0, .05);
transform: scale(0);
transition: left .15s ease-in-out, transform .15s ease-in-out, box-shadow .15s ease-in-out; transition: left .15s ease-in-out, transform .15s ease-in-out, box-shadow .15s ease-in-out;
z-index: -1; transform: scale(0);
} }
&:hover:not(.disabled), &:hover:not(.disabled),
@ -388,8 +399,8 @@ select.form-control {
background-color: rgba(33, 150, 243, .3); background-color: rgba(33, 150, 243, .3);
&::before { &::before {
background-color: rgba(33, 150, 243, 1);
left: calc(100% - .8em); left: calc(100% - .8em);
background-color: rgba(33, 150, 243, 1);
} }
&::after { &::after {
@ -416,7 +427,7 @@ select.form-control {
.form-check:not(.form-switch) { .form-check:not(.form-switch) {
.form-check-input { .form-check-input {
&:checked[type="checkbox"] { &:checked[type="checkbox"] {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-width='2' d='M6 10l3 3l6-6'/%3e%3c/svg%3e"), var(--bs-gradient); background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#{$white}' stroke-width='2' d='m6 10 3 3 6-6'/></svg>")), var(--bs-gradient);
background-size: 1.6em; background-size: 1.6em;
} }
} }
@ -467,78 +478,12 @@ select.form-control {
.has-danger &, .has-danger &,
.has-success & { .has-success & {
color: $input-color; color: $input-color;
border-color: $input-group-addon-border-color;
background-color: $input-group-addon-bg; background-color: $input-group-addon-bg;
border-color: $input-group-addon-border-color;
} }
} }
.input-group { .form-group-lg {
> .input-group-prepend > .input-group-text {
padding-right: .25rem;
}
> .input-group-append > .input-group-text {
padding-left: .25rem;
}
.form-control {
padding-left: .25rem;
padding-right: .25rem;
}
}
.input-group-sm {
> .input-group-prepend > .btn,
> .input-group-append > .btn {
padding: $input-btn-padding-y-sm $input-btn-padding-x-sm;
}
> .input-group-prepend > .input-group-text {
padding: $input-btn-padding-y-sm $input-btn-padding-x-sm $input-btn-padding-y-sm 0;
}
> .input-group-append > .input-group-text {
padding: $input-btn-padding-y-sm 0 $input-btn-padding-y-sm $input-btn-padding-x-sm;
}
> .input-group-prepend > .btn {
border-top-left-radius: $btn-border-radius-sm;
border-bottom-left-radius: $btn-border-radius-sm;
}
> .input-group-append > .btn {
border-top-right-radius: $btn-border-radius-sm;
border-bottom-right-radius: $btn-border-radius-sm;
}
}
.input-group-lg {
> .input-group-prepend > .btn,
> .input-group-append > .btn {
padding: $input-btn-padding-y-lg $input-btn-padding-x-lg;
}
> .input-group-prepend > .input-group-text {
padding: $input-btn-padding-y-lg $input-btn-padding-x-lg $input-btn-padding-y-lg 0;
}
> .input-group-append > .input-group-text {
padding: $input-btn-padding-y-lg 0 $input-btn-padding-y-lg $input-btn-padding-x-lg;
}
> .input-group-prepend > .btn {
border-top-left-radius: $btn-border-radius-lg;
border-bottom-left-radius: $btn-border-radius-lg;
}
> .input-group-append > .btn {
border-top-right-radius: $btn-border-radius-lg;
border-bottom-right-radius: $btn-border-radius-lg;
}
}
.-lg {
select, select,
select.form-control { select.form-control {
line-height: 1.5; line-height: 1.5;
@ -555,28 +500,28 @@ select.form-control {
.nav-link, .nav-link,
.nav-link:focus { .nav-link:focus {
margin-right: 0; margin-right: 0;
color: $body-color;
background-color: transparent; background-color: transparent;
border: none; border: none;
color: $body-color;
box-shadow: inset 0 -1px 0 #ddd; box-shadow: inset 0 -1px 0 #ddd;
transition: color .2s, box-shadow .2s; transition: color .2s, box-shadow .2s;
&:hover { &:hover {
color: $primary;
background-color: transparent; background-color: transparent;
box-shadow: inset 0 -2px 0 $primary; box-shadow: inset 0 -2px 0 $primary;
color: $primary;
} }
} }
.nav-link.active, .nav-link.active,
.nav-link.active:focus { .nav-link.active:focus {
color: $primary;
border: none; border: none;
box-shadow: inset 0 -2px 0 $primary; box-shadow: inset 0 -2px 0 $primary;
color: $primary;
&:hover { &:hover {
border: none;
color: $primary; color: $primary;
border: none;
} }
} }
@ -634,8 +579,8 @@ select.form-control {
a:not(.btn), a:not(.btn),
.alert-link { .alert-link {
color: $white;
font-weight: 700; font-weight: 700;
color: $white;
} }
&-secondary, &-secondary,
@ -655,10 +600,6 @@ select.form-control {
} }
} }
.tag {
padding: 4px 6px;
}
// Containers // Containers
.card { .card {
@ -695,9 +636,10 @@ select.form-control {
} }
.modal, .modal,
.toast { .toast,
.offcanvas {
.btn-close { .btn-close {
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'><path d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/></svg>"); background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$black}'><path d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/></svg>"));
} }
} }

View file

@ -1,4 +1,4 @@
// Materia 5.0.2 // Materia 5.2.2
// Bootswatch // Bootswatch
$theme: "materia" !default; $theme: "materia" !default;
@ -56,12 +56,12 @@ $font-weight-base: 400 !default;
// Buttons // Buttons
$input-btn-padding-y: .5rem !default; $input-btn-padding-y: .8rem !default;
$input-btn-padding-x: 1rem !default; $input-btn-padding-x: 1rem !default;
// Forms // Forms
$input-padding-y: .5rem !default; $input-padding-y: 1rem !default;
$input-padding-x: 0 !default; $input-padding-x: 0 !default;
$input-padding-y-sm: 0 !default; $input-padding-y-sm: 0 !default;
$input-padding-x-sm: 0 !default; $input-padding-x-sm: 0 !default;
@ -85,7 +85,7 @@ $nav-tabs-border-color: transparent !default;
// Navbar // Navbar
$navbar-padding-y: .5rem !default; $navbar-padding-y: 1rem !default;
$navbar-dark-color: rgba($white, .75) !default; $navbar-dark-color: rgba($white, .75) !default;
$navbar-dark-hover-color: $white !default; $navbar-dark-hover-color: $white !default;
@ -112,10 +112,3 @@ $progress-border-radius: 0 !default;
$btn-close-color: $white !default; $btn-close-color: $white !default;
$btn-close-opacity: .6 !default; $btn-close-opacity: .6 !default;
$btn-close-hover-opacity: 1 !default; $btn-close-hover-opacity: 1 !default;
// Breadcrumbs
$breadcrumb-padding-y: .375rem !default;
$breadcrumb-padding-x: .75rem !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Minty 5.0.2 // Minty 5.2.2
// Bootswatch // Bootswatch
@ -9,6 +9,10 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Montserrat:wght@400;50
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: light;
}
// Navbar // Navbar
.navbar { .navbar {
@ -95,7 +99,6 @@ legend {
.breadcrumb { .breadcrumb {
a { a {
color: $navbar-dark-color; color: $navbar-dark-color;
text-decoration: none;
} }
a:hover { a:hover {

View file

@ -1,4 +1,4 @@
// Minty 5.0.2 // Minty 5.2.2
// Bootswatch // Bootswatch
$theme: "minty" !default; $theme: "minty" !default;
@ -36,7 +36,7 @@ $success: $green !default;
$info: $cyan !default; $info: $cyan !default;
$warning: $yellow !default; $warning: $yellow !default;
$danger: $red !default; $danger: $red !default;
$light: $primary !default; $light: $gray-100 !default;
$dark: $gray-800 !default; $dark: $gray-800 !default;
$min-contrast-ratio: 1.45 !default; $min-contrast-ratio: 1.45 !default;
@ -104,5 +104,3 @@ $breadcrumb-bg: $primary !default;
$breadcrumb-divider-color: $white !default; $breadcrumb-divider-color: $white !default;
$breadcrumb-active-color: $breadcrumb-divider-color !default; $breadcrumb-active-color: $breadcrumb-divider-color !default;
$breadcrumb-border-radius: .25rem !default; $breadcrumb-border-radius: .25rem !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Morph 5.0.2 // Morph 5.2.2
// Bootswatch // Bootswatch
@ -11,6 +11,12 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;70
$btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px rgba($white, .2) !default; $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px rgba($white, .2) !default;
:root {
color-scheme: light;
}
// Mixins
@mixin shadow($shadow: $box-shadow) { @mixin shadow($shadow: $box-shadow) {
background-color: $gray-200; background-color: $gray-200;
border: none; border: none;
@ -19,17 +25,17 @@ $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px r
} }
@mixin shadow-outline($shadow: $box-shadow) { @mixin shadow-outline($shadow: $box-shadow) {
content: "";
position: absolute; position: absolute;
left: -.5rem;
right: -.5rem;
top: -.5rem; top: -.5rem;
right: -.5rem;
bottom: -.5rem; bottom: -.5rem;
left: -.5rem;
z-index: -1;
content: "";
background-color: $body-bg; background-color: $body-bg;
border: 1px solid rgba($white, .1); border: 1px solid rgba($white, .1);
box-shadow: $shadow; box-shadow: $shadow;
transition: background-color .15s ease-in-out, border .15s ease-in-out, box-shadow .15s ease-in-out, color .15s ease-in-out; transition: background-color .15s ease-in-out, border .15s ease-in-out, box-shadow .15s ease-in-out, color .15s ease-in-out;
z-index: -1;
} }
// Buttons // Buttons
@ -64,11 +70,11 @@ $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px r
&:active, &:active,
&:active:focus { &:active:focus {
@if ($color == secondary or $color == light) { @if ($color == secondary or $color == light) {
background-color: $gray-200;
color: $gray-700; color: $gray-700;
background-color: $gray-200;
} @else { } @else {
background-color: $value;
color: $white; color: $white;
background-color: $value;
} }
} }
} }
@ -85,9 +91,9 @@ $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px r
} }
&.disabled { &.disabled {
color: $gray-700;
background-color: $gray-200; background-color: $gray-200;
box-shadow: 2px 2px 5px rgba($black, .1), -2px -2px 5px rgba($white, .5); box-shadow: 2px 2px 5px rgba($black, .1), -2px -2px 5px rgba($white, .5);
color: $gray-700;
} }
} }
@ -95,8 +101,8 @@ $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px r
@each $color, $value in $theme-colors { @each $color, $value in $theme-colors {
&-#{$color} { &-#{$color} {
background-color: $value; background-color: $value;
box-shadow: 5px 5px 10px rgba($black, .2), -5px -5px 10px rgba($white, .1);
border: none; border: none;
box-shadow: 5px 5px 10px rgba($black, .2), -5px -5px 10px rgba($white, .1);
@if ($color == secondary or $color == light) { @if ($color == secondary or $color == light) {
color: $gray-700; color: $gray-700;
@ -136,14 +142,14 @@ $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px r
.btn-group, .btn-group,
.btn-group-vertical { .btn-group-vertical {
@include shadow(); @include shadow();
border-radius: $btn-border-radius;
border: none; border: none;
border-radius: $btn-border-radius;
.btn, .btn,
.btn-group { .btn-group {
margin: 0; margin: 0;
box-shadow: none;
border: none; border: none;
box-shadow: none;
&:hover, &:hover,
&:active, &:active,
@ -194,29 +200,29 @@ $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px r
> .btn:nth-child(n + 3), > .btn:nth-child(n + 3),
> :not(.btn-check) + .btn, > :not(.btn-check) + .btn,
> .btn-group:not(:first-child) > .btn { > .btn-group:not(:first-child) > .btn {
border-top: 1px solid rgba($black, .05);
border-top-left-radius: 0; border-top-left-radius: 0;
border-top-right-radius: 0; border-top-right-radius: 0;
border-top: 1px solid rgba($black, .05);
&:hover, &:hover,
&:active, &:active,
&:active:focus { &:active:focus {
border-top: 1px solid rgba($black, .05);
border-top-left-radius: 0; border-top-left-radius: 0;
border-top-right-radius: 0; border-top-right-radius: 0;
border-top: 1px solid rgba($black, .05);
} }
} }
> .btn:not(:last-child):not(.dropdown-toggle), > .btn:not(:last-child):not(.dropdown-toggle),
> .btn-group:not(:last-child) > .btn { > .btn-group:not(:last-child) > .btn {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
&:hover, &:hover,
&:active, &:active,
&:active:focus { &:active:focus {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
} }
} }
} }
@ -243,8 +249,8 @@ $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px r
.btn-check:not(:checked) + .btn, .btn-check:not(:checked) + .btn,
.btn-check:not(:checked) + .btn:active { .btn-check:not(:checked) + .btn:active {
background-color: $gray-200;
color: $gray-700; color: $gray-700;
background-color: $gray-200;
} }
.btn-check:checked ~ .btn-check:active + .btn, .btn-check:checked ~ .btn-check:active + .btn,
@ -296,9 +302,6 @@ $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px r
.breadcrumb { .breadcrumb {
@include shadow(); @include shadow();
border-radius: $border-radius; border-radius: $border-radius;
a {
text-decoration: none;
}
} }
.pagination { .pagination {
@ -315,9 +318,9 @@ $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px r
box-shadow: $box-shadow-inset; box-shadow: $box-shadow-inset;
> .form-control { > .form-control {
background: none;
padding-left: 0;
padding-right: 0; padding-right: 0;
padding-left: 0;
background: none;
box-shadow: none; box-shadow: none;
} }
@ -358,7 +361,7 @@ $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px r
} }
.form-control { .form-control {
&::-webkit-file-upload-button { &::file-selector-button {
box-shadow: 2px 2px 5px rgba($black, .2), inset 3px 3px 10px rgba(shade-color($form-range-thumb-bg, 50%), .1); box-shadow: 2px 2px 5px rgba($black, .2), inset 3px 3px 10px rgba(shade-color($form-range-thumb-bg, 50%), .1);
} }
} }

View file

@ -1,4 +1,4 @@
// Morph 5.0.2 // Morph 5.2.2
// Bootswatch // Bootswatch
$theme: "morph" !default; $theme: "morph" !default;
@ -75,8 +75,8 @@ $text-muted: lighten($body-color, 15%) !default;
// Buttons + Forms // Buttons + Forms
$input-btn-padding-y: .5rem !default; $input-btn-padding-y: 1rem !default;
$input-btn-padding-x: 1rem !default; $input-btn-padding-x: 1.5rem !default;
// Buttons // Buttons
@ -225,6 +225,4 @@ $breadcrumb-active-color: $link-color !default;
// Close // Close
$btn-close-color: $body-color !default; $btn-close-color: $headings-color !default;
$link-decoration: none !default;

View file

@ -1,6 +1,13 @@
// Pulse 5.0.2 // Pulse 5.2.2
// Bootswatch // Bootswatch
// Variables
:root {
color-scheme: light;
}
// Buttons // Buttons
.btn { .btn {
@ -12,20 +19,20 @@
} }
&-secondary { &-secondary {
color: $gray-900;
background-color: $white; background-color: $white;
border-color: #ccc; border-color: #ccc;
color: $gray-900;
&:hover { &:hover {
color: $gray-900;
background-color: $gray-300; background-color: $gray-300;
border-color: $gray-500; border-color: $gray-500;
color: $gray-900;
} }
&.disabled { &.disabled {
color: tint-color($gray-900, 5%);
background-color: $white; background-color: $white;
border-color: tint-color(#ccc, 5%); border-color: tint-color(#ccc, 5%);
color: tint-color($gray-900, 5%);
} }
} }
@ -98,9 +105,6 @@
.breadcrumb { .breadcrumb {
&-item.active { &-item.active {
color: $gray-700; color: $gray-700;
a {
text-decoration: none;
}
} }
} }

View file

@ -1,4 +1,4 @@
// Pulse 5.0.2 // Pulse 5.2.2
// Bootswatch // Bootswatch
$theme: "pulse" !default; $theme: "pulse" !default;
@ -74,7 +74,7 @@ $nav-tabs-link-hover-border-color: $primary !default;
// Navbar // Navbar
$navbar-padding-y: 1rem !default; $navbar-padding-y: 1.2rem !default;
$navbar-dark-hover-color: rgba($white, .9) !default; $navbar-dark-hover-color: rgba($white, .9) !default;
$navbar-dark-active-color: rgba($white, .9) !default; $navbar-dark-active-color: rgba($white, .9) !default;
$navbar-light-color: rgba($black, .4) !default; $navbar-light-color: rgba($black, .4) !default;
@ -94,12 +94,3 @@ $list-group-hover-bg: lighten($list-group-bg, 10%) !default;
$list-group-active-color: $white !default; $list-group-active-color: $white !default;
$list-group-active-bg: $list-group-bg !default; $list-group-active-bg: $list-group-bg !default;
$list-group-disabled-color: lighten($list-group-bg, 30%) !default; $list-group-disabled-color: lighten($list-group-bg, 30%) !default;
// Breadcrumbs
$breadcrumb-padding-y: .375rem !default;
$breadcrumb-padding-x: .75rem !default;
$breadcrumb-active-color: $gray-500 !default;
$breadcrumb-border-radius: .25rem !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Quartz 5.0.2 // Quartz 5.2.2
// Bootswatch // Bootswatch
@ -7,6 +7,12 @@
$body-bg-image: linear-gradient(90deg, shade-color($cyan, 10%), shade-color($purple, 10%), shade-color($pink, 5%)) !default; $body-bg-image: linear-gradient(90deg, shade-color($cyan, 10%), shade-color($purple, 10%), shade-color($pink, 5%)) !default;
$frosted-opacity: .3 !default; $frosted-opacity: .3 !default;
:root {
color-scheme: dark;
}
// Mixins
@mixin glass($opacity: $frosted-opacity, $bg: $white) { @mixin glass($opacity: $frosted-opacity, $bg: $white) {
border: none; border: none;
box-shadow: inset 1px 1px $border-color, inset -1px -1px rgba($white, .1), $box-shadow; box-shadow: inset 1px 1px $border-color, inset -1px -1px rgba($white, .1), $box-shadow;
@ -43,8 +49,8 @@ body {
.btn { .btn {
&-secondary { &-secondary {
border: none;
color: $white; color: $white;
border: none;
&:hover, &:hover,
&:focus { &:focus {
@ -74,7 +80,7 @@ body {
// Forms // Forms
.input-group-text, .input-group-text,
.form-control::-webkit-file-upload-button { .form-control::file-selector-button {
background-color: transparent; background-color: transparent;
background-image: linear-gradient(125deg, rgba($white, .3), rgba($white, .2) 70%); background-image: linear-gradient(125deg, rgba($white, .3), rgba($white, .2) 70%);
border: none; border: none;
@ -97,14 +103,15 @@ body {
.form-select:not([multiple]) { .form-select:not([multiple]) {
transition: border-color .15s ease-in-out; transition: border-color .15s ease-in-out;
option { option {
background-color: $primary; color: $black;
} }
} }
.bg-light .form-control { .bg-light .form-control {
border-color: rgba($black, .2);
color: $gray-800; color: $gray-800;
border-color: rgba($black, .2);
&::placeholder { &::placeholder {
color: rgba($black, .2); color: rgba($black, .2);
@ -156,8 +163,9 @@ body {
.dropdown-menu { .dropdown-menu {
border-radius: $border-radius; border-radius: $border-radius;
} }
}
.nav-pills { .nav-pills {
.nav-link { .nav-link {
transition: none; transition: none;
@ -167,8 +175,6 @@ body {
isolation: auto; isolation: auto;
} }
} }
}
} }
// Indicators // Indicators
@ -182,12 +188,12 @@ body {
@each $color, $value in $theme-colors { @each $color, $value in $theme-colors {
$opacity: .7; $opacity: .7;
&-#{$color}::after { &-#{$color}::after {
content: "";
position: absolute; position: absolute;
left: 0;
top: 0; top: 0;
left: 0;
width: .5rem; width: .5rem;
height: 100%; height: 100%;
content: "";
background-color: $value; background-color: $value;
} }
} }
@ -198,6 +204,10 @@ body {
} }
.badge { .badge {
&.bg-secondary {
--bs-bg-opacity: .4;
}
&.bg-light { &.bg-light {
color: $gray-800; color: $gray-800;
} }
@ -213,10 +223,14 @@ body {
@include glass(); @include glass();
@each $color, $value in $theme-colors { @each $color, $value in $theme-colors {
@if ($color == secondary) {
--bs-secondary-rgb: transparent;
} @else {
&.bg-#{$color} { &.bg-#{$color} {
background-image: none; background-image: none;
} }
} }
}
&.bg-light { &.bg-light {
.card-header, .card-header,
@ -247,6 +261,11 @@ body {
} }
} }
.accordion-item {
@include glass();
box-shadow: none;
}
.toast { .toast {
@include glass(); @include glass();
} }
@ -267,3 +286,6 @@ body {
@include glass(); @include glass();
} }
.offcanvas {
@include glass();
}

View file

@ -1,4 +1,4 @@
// Quartz 5.0.2 // Quartz 5.2.2
// Bootswatch // Bootswatch
$theme: "quartz" !default; $theme: "quartz" !default;
@ -43,7 +43,7 @@ $min-contrast-ratio: 1.5 !default;
// Spacing // Spacing
$spacer: 1rem !default; $spacer: 2rem !default;
// Body // Body
@ -83,8 +83,8 @@ $table-bg-scale: 0 !default;
// Buttons + Forms // Buttons + Forms
$input-btn-padding-y: .5rem !default; $input-btn-padding-y: .75rem !default;
$input-btn-padding-x: 1rem !default; $input-btn-padding-x: 1.5rem !default;
// Buttons // Buttons
@ -115,7 +115,6 @@ $form-check-input-border: 1px solid $border-color !default;
$form-select-indicator-color: $white !default; $form-select-indicator-color: $white !default;
$form-select-focus-box-shadow: none !default; $form-select-focus-box-shadow: none !default;
$form-range-track-bg: rgba($black, .2) !default; $form-range-track-bg: rgba($black, .2) !default;
$form-range-thumb-disabled-bg: $gray-500 !default; $form-range-thumb-disabled-bg: $gray-500 !default;
@ -175,6 +174,12 @@ $card-cap-color: $white !default;
$card-color: $white !default; $card-color: $white !default;
$card-bg: transparent !default; $card-bg: transparent !default;
// Accordion
$accordion-button-bg: $secondary !default;
$accordion-button-active-bg: $primary !default;
$accordion-button-active-color: $white !default;
// Tooltips // Tooltips
$tooltip-opacity: .7 !default; $tooltip-opacity: .7 !default;
@ -184,7 +189,7 @@ $tooltip-opacity: .7 !default;
$popover-header-bg: $card-cap-bg !default; $popover-header-bg: $card-cap-bg !default;
$popover-body-color: $card-color !default; $popover-body-color: $card-color !default;
$popover-body-padding-y: $spacer / 2 !default; $popover-body-padding-y: $spacer * .5 !default;
$popover-arrow-color: $border-color !default; $popover-arrow-color: $border-color !default;
@ -202,6 +207,7 @@ $progress-bg: rgba($black, .2) !default;
// List group // List group
$list-group-color: $white !default;
$list-group-bg: transparent !default; $list-group-bg: transparent !default;
$list-group-border-color: $border-color !default; $list-group-border-color: $border-color !default;
$list-group-border-width: 0 !default; $list-group-border-width: 0 !default;
@ -215,14 +221,9 @@ $list-group-action-hover-color: $white !default;
// Breadcrumbs // Breadcrumbs
$breadcrumb-padding-y: .375rem !default;
$breadcrumb-padding-x: .75rem !default;
$breadcrumb-bg: transparent !default;
$breadcrumb-divider-color: $white !default; $breadcrumb-divider-color: $white !default;
$breadcrumb-active-color: $white !default; $breadcrumb-active-color: $white !default;
// Close // Close
$btn-close-color: $white !default; $btn-close-color: $white !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Sandstone 5.0.2 // Sandstone 5.2.2
// Bootswatch // Bootswatch
@ -9,24 +9,16 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;70
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: light;
}
// Navbar // Navbar
.bg-primary {
background-color: $dark !important;
}
.bg-dark {
background-color: $secondary !important;
}
.bg-light {
background-color: $gray-200 !important;
}
.sandstone { .sandstone {
font-size: 13px; font-size: 13px;
line-height: 22px;
font-weight: 500; font-weight: 500;
line-height: 22px;
text-transform: uppercase; text-transform: uppercase;
} }
@ -93,17 +85,17 @@ input,
.nav-link.disabled, .nav-link.disabled,
.nav-link.disabled:hover, .nav-link.disabled:hover,
.nav-link.disabled:focus { .nav-link.disabled:focus {
color: $nav-link-disabled-color;
background-color: $gray-200; background-color: $gray-200;
border-color: $gray-300; border-color: $gray-300;
color: $nav-link-disabled-color;
} }
} }
.nav-pills { .nav-pills {
.nav-link { .nav-link {
@extend .sandstone; @extend .sandstone;
border: 1px solid transparent;
color: $gray-600; color: $gray-600;
border: 1px solid transparent;
} }
.nav-link.active, .nav-link.active,
@ -115,16 +107,15 @@ input,
.nav-link.disabled, .nav-link.disabled,
.nav-link.disabled:hover { .nav-link.disabled:hover {
color: $gray-300;
background-color: transparent; background-color: transparent;
border-color: transparent; border-color: transparent;
color: $gray-300;
} }
} }
.breadcrumb { .breadcrumb {
@extend .sandstone; @extend .sandstone;
text-decoration: none;
border: 1px solid $gray-300; border: 1px solid $gray-300;
} }
@ -237,8 +228,9 @@ input,
// Containers // Containers
.modal, .modal,
.toast { .toast,
.offcanvas {
.btn-close { .btn-close {
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23dfd7ca'><path d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/></svg>"); background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$gray-300}'><path d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/></svg>"));
} }
} }

View file

@ -1,4 +1,4 @@
// Sandstone 5.0.2 // Sandstone 5.2.2
// Bootswatch // Bootswatch
$theme: "sandstone" !default; $theme: "sandstone" !default;
@ -137,5 +137,3 @@ $breadcrumb-border-radius: .25rem !default;
$btn-close-color: $white !default; $btn-close-color: $white !default;
$btn-close-opacity: .8 !default; $btn-close-opacity: .8 !default;
$btn-close-hover-opacity: 1 !default; $btn-close-hover-opacity: 1 !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Simplex 5.0.2 // Simplex 5.2.2
// Bootswatch // Bootswatch
@ -9,6 +9,10 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700
@import url($web-font-path); @import url($web-font-path);
} }
:root {
color-scheme: light;
}
// Mixins // Mixins
@mixin btn-shadow($color){ @mixin btn-shadow($color){
@ -20,16 +24,16 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700
// Navbar // Navbar
.navbar { .navbar {
border-width: 1px;
border-style: solid; border-style: solid;
border-width: 1px;
&-fixed-top { &-fixed-top {
border-width: 0 0 1px; border-width: 0 0 1px;
} }
&-fixed-bottom { &-fixed-bottom {
border-top-width: 1px 0 0 0;
border-style: solid; border-style: solid;
border-top-width: 1px 0 0 0;
} }
&.bg-primary { &.bg-primary {
@ -95,12 +99,12 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700
} }
.btn-outline-secondary { .btn-outline-secondary {
border-color: $gray-400;
color: $gray-400; color: $gray-400;
border-color: $gray-400;
&:hover { &:hover {
background-color: $gray-400;
color: $white; color: $white;
background-color: $gray-400;
} }
} }
@ -121,9 +125,6 @@ label {
.breadcrumb { .breadcrumb {
border: 1px solid shade-color($white, 13%); border: 1px solid shade-color($white, 13%);
a {
text-decoration: none;
}
} }
.pagination { .pagination {

View file

@ -1,4 +1,4 @@
// Simplex 5.0.2 // Simplex 5.2.2
// Bootswatch // Bootswatch
$theme: "simplex" !default; $theme: "simplex" !default;
@ -102,5 +102,3 @@ $list-group-disabled-bg: $nav-tabs-border-color !default;
$breadcrumb-padding-y: .375rem !default; $breadcrumb-padding-y: .375rem !default;
$breadcrumb-padding-x: .75rem !default; $breadcrumb-padding-x: .75rem !default;
$breadcrumb-border-radius: .25rem !default; $breadcrumb-border-radius: .25rem !default;
$link-decoration: none !default;

View file

@ -1,4 +1,4 @@
// Sketchy 5.0.2 // Sketchy 5.2.2
// Bootswatch // Bootswatch
@ -15,11 +15,15 @@ $border-radius-lg-sketchy: 55px 225px 15px 25px / 25px 25px 35px 355px;
$border-radius-sm-sketchy: 255px 25px 225px 25px / 25px 225px 25px 255px; $border-radius-sm-sketchy: 255px 25px 225px 25px / 25px 225px 25px 255px;
// style-enable scss/dollar-variable-default // style-enable scss/dollar-variable-default
:root {
color-scheme: light;
}
// Navbar // Navbar
.navbar { .navbar {
border-width: 2px;
border-style: solid; border-style: solid;
border-width: 2px;
border-radius: 25px 25px 55px 5px/5px 55px 25px 25px; border-radius: 25px 25px 55px 5px/5px 55px 25px 25px;
&.bg-light { &.bg-light {
@ -27,13 +31,13 @@ $border-radius-sm-sketchy: 255px 25px 225px 25px / 25px 225px 25px 255px;
} }
&.fixed-top { &.fixed-top {
border-radius: 0 25px 225px 0/25px 0 25px 255px;
border-width: 0 0 2px; border-width: 0 0 2px;
border-radius: 0 25px 225px 0/25px 0 25px 255px;
} }
&.fixed-bottom { &.fixed-bottom {
border-radius: 255px 25px 0 25px/25px 225px 25px 0;
border-width: 2px 0 0; border-width: 2px 0 0;
border-radius: 255px 25px 0 25px/25px 225px 25px 0;
} }
&-brand { &-brand {
@ -46,8 +50,8 @@ $border-radius-sm-sketchy: 255px 25px 225px 25px / 25px 225px 25px 255px;
// Buttons // Buttons
.btn { .btn {
border-radius: $border-radius-sketchy;
text-decoration: none; text-decoration: none;
border-radius: $border-radius-sketchy;
&-lg { &-lg {
border-radius: $border-radius-lg-sketchy; border-radius: $border-radius-lg-sketchy;
@ -59,7 +63,8 @@ $border-radius-sm-sketchy: 255px 25px 225px 25px / 25px 225px 25px 255px;
} }
.btn-check { .btn-check {
display: none; display: inline-block;
opacity: 0;
} }
// Typography // Typography
@ -72,6 +77,11 @@ textarea {
font-family: $font-family-sans-serif; font-family: $font-family-sans-serif;
} }
b,
strong {
font-family: $headings-font-family;
}
blockquote { blockquote {
border-radius: 15px 27px 25px 25px/25px 25px 305px 635px; border-radius: 15px 27px 25px 25px/25px 25px 305px 635px;
} }
@ -86,11 +96,11 @@ table {
} }
.table-bordered { .table-bordered {
background-color: $gray-800;
border-collapse: separate;
border-spacing: 0;
border-radius: 5px 25px 5px 25px/25px 5px 25px 5px;
overflow: hidden; overflow: hidden;
border-spacing: 0;
border-collapse: separate;
background-color: $gray-800;
border-radius: 5px 25px 5px 25px/25px 5px 25px 5px;
th, th,
td { td {
@ -101,8 +111,8 @@ table {
.table-success:hover { .table-success:hover {
td, td,
th { th {
background-color: $success;
color: $white; color: $white;
background-color: $success;
} }
} }
@ -110,8 +120,8 @@ table {
.table-info:hover { .table-info:hover {
td, td,
th { th {
background-color: $info;
color: $white; color: $white;
background-color: $info;
} }
} }
@ -119,8 +129,8 @@ table {
.table-warning:hover { .table-warning:hover {
td, td,
th { th {
background-color: $warning;
color: $white; color: $white;
background-color: $warning;
} }
} }
@ -128,8 +138,8 @@ table {
.table-danger:hover { .table-danger:hover {
td, td,
th { th {
background-color: $danger;
color: $white; color: $white;
background-color: $danger;
} }
} }
} }
@ -161,32 +171,36 @@ select.form-control {
[type="checkbox"] { [type="checkbox"] {
position: relative; position: relative;
appearance: none;
width: 0; width: 0;
height: 0; height: 0;
border: none;
cursor: pointer; cursor: pointer;
border: none;
appearance: none;
&::before { &::before {
content: "";
position: absolute; position: absolute;
left: 0;
top: -.1em; top: -.1em;
left: 0;
display: inline-block; display: inline-block;
width: 15px; width: 15px;
height: 16px; height: 16px;
content: "";
border: 2px solid $gray-800; border: 2px solid $gray-800;
border-radius: 2px 8px 2px 4px / 5px 3px 5px 3px; border-radius: 2px 8px 2px 4px / 5px 3px 5px 3px;
} }
&:focus::before {
box-shadow: 0 0 0 .25rem rgba(51, 51, 51, .25);
}
&:checked::after { &:checked::after {
content: "x";
position: absolute; position: absolute;
left: .1em;
top: 0; top: 0;
left: .1em;
font-size: 1.5rem; font-size: 1.5rem;
line-height: .5; line-height: .5;
color: $gray-800; color: $gray-800;
content: "x";
} }
&:disabled { &:disabled {
@ -198,24 +212,28 @@ select.form-control {
[type="radio"] { [type="radio"] {
position: relative; position: relative;
appearance: none;
width: 0; width: 0;
height: 0; height: 0;
border: none;
cursor: pointer; cursor: pointer;
border: none;
appearance: none;
&::before { &::before {
content: "";
position: absolute; position: absolute;
left: 0;
top: -.1em; top: -.1em;
left: 0;
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 16px; height: 16px;
content: "";
border: 2px solid $gray-800; border: 2px solid $gray-800;
border-radius: 50% 45% 40% 50% / 40% 50% 50% 45%; border-radius: 50% 45% 40% 50% / 40% 50% 50% 45%;
} }
&:focus::before {
box-shadow: 0 0 0 .25rem rgba(51, 51, 51, .25);
}
&:checked::before { &:checked::before {
background-color: $gray-800; background-color: $gray-800;
} }
@ -246,13 +264,13 @@ select.form-control {
} }
&::after { &::after {
content: "";
display: inline-block;
width: 12px;
height: 12px;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
display: inline-block;
width: 12px;
height: 12px;
content: "";
background-color: $white; background-color: $white;
border: 2px solid #333; border: 2px solid #333;
border-radius: 50% 45% 40% 50% / 40% 50% 50% 45%; border-radius: 50% 45% 40% 50% / 40% 50% 50% 45%;
@ -274,8 +292,8 @@ select.form-control {
// Navs // Navs
.dropdown-menu { .dropdown-menu {
border-radius: 555px 25px 25px 25px/25px 25px 25px 555px;
overflow: hidden; overflow: hidden;
border-radius: 555px 25px 25px 25px/25px 25px 25px 555px;
} }
.dropdown-divider { .dropdown-divider {
@ -283,15 +301,15 @@ select.form-control {
} }
.list-group { .list-group {
overflow: hidden;
background-color: $gray-800; background-color: $gray-800;
border: 2px solid $gray-800; border: 2px solid $gray-800;
border-radius: 45px 15px 35px 5px/15px 5px 15px 65px; border-radius: 45px 15px 35px 5px/15px 5px 15px 65px;
overflow: hidden;
&-item { &-item {
border-left: none;
border-right: none;
border-top: 2px solid $gray-800; border-top: 2px solid $gray-800;
border-right: none;
border-left: none;
border-radius: 255px 5px 225px 5px/25px 225px 25px 255px; border-radius: 255px 5px 225px 5px/25px 225px 25px 255px;
&:first-child { &:first-child {
@ -324,9 +342,6 @@ select.form-control {
.breadcrumb { .breadcrumb {
border: 2px solid $gray-800; border: 2px solid $gray-800;
border-radius: $border-radius-sketchy; border-radius: $border-radius-sketchy;
a {
text-decoration: none;
}
} }
.pagination { .pagination {
@ -382,8 +397,8 @@ select.form-control {
} }
&-header { &-header {
border-bottom-width: 2px;
border-color: inherit; border-color: inherit;
border-bottom-width: 2px;
&:first-child { &:first-child {
border-radius: 3px 3px 0 0/23px 23px 0 0; border-radius: 3px 3px 0 0/23px 23px 0 0;
@ -453,10 +468,10 @@ pre {
background-image: none; background-image: none;
&::before { &::before {
content: "X";
position: absolute; position: absolute;
right: 1rem;
top: .8rem; top: .8rem;
right: 1rem;
content: "X";
} }
} }

Some files were not shown because too many files have changed in this diff Show more