update Bootstrap to `5.2.0-beta1` (#1131)

pull/1140/head
Paweł Kuna 2 years ago committed by GitHub
parent 85e63a545f
commit 8f3bcbd7a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -166,12 +166,12 @@ theme-colors:
info:
class: info
title: Info
light:
class: light
title: Light
dark:
class: dark
title: Dark
light:
class: light
title: Light
button-states:
- class:

30
package-lock.json generated

@ -11,7 +11,7 @@
"dependencies": {
"@popperjs/core": "^2.11.5",
"@tabler/icons": "^1.68.0",
"bootstrap": "5.1.3"
"bootstrap": "5.2.0-beta1"
},
"devDependencies": {
"@babel/core": "^7.17.10",
@ -3130,15 +3130,21 @@
"dev": true
},
"node_modules/bootstrap": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz",
"integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/bootstrap"
},
"version": "5.2.0-beta1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.0-beta1.tgz",
"integrity": "sha512-6qbgs177WZEFY4SLQUq3tEHayYG80nfDmyTpdKi0MJqRMdS+HAoq24+YKfx6wf+nHY0rx8zrh477J1lFu4WzOA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/twbs"
},
{
"type": "opencollective",
"url": "https://opencollective.com/bootstrap"
}
],
"peerDependencies": {
"@popperjs/core": "^2.10.2"
"@popperjs/core": "^2.11.5"
}
},
"node_modules/boxen": {
@ -18450,9 +18456,9 @@
"dev": true
},
"bootstrap": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz",
"integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==",
"version": "5.2.0-beta1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.0-beta1.tgz",
"integrity": "sha512-6qbgs177WZEFY4SLQUq3tEHayYG80nfDmyTpdKi0MJqRMdS+HAoq24+YKfx6wf+nHY0rx8zrh477J1lFu4WzOA==",
"requires": {}
},
"boxen": {

@ -104,7 +104,7 @@
"dependencies": {
"@popperjs/core": "^2.11.5",
"@tabler/icons": "^1.68.0",
"bootstrap": "5.1.3"
"bootstrap": "5.2.0-beta1"
},
"peerDependencies": {
"apexcharts": "^3.35.2",

@ -6,11 +6,11 @@
{% for state in site.button-states %}
{% if show-states or (state.class != 'active' and state.class != 'disabled') %}
<div class="row g-2 align-items-center mb-n3{% unless forloop.first %} mt-3{% endunless %}">
{% unless hide-labels %}<div class="col-12 col-xl-2 mb-3 font-weight-semibold">{{ state.title }}</div>{% endunless %}
<div class="row g-2 align-items-center">
{% unless hide-labels %}<div class="col-12 col-xl-2 font-weight-semibold">{{ state.title }}</div>{% endunless %}
{% for type in variants %}
{% if show-link or type[0] != 'link' %}
<div class="col-6 col-sm-4 col-md-2 col-xl{% if include.auto-columns %}-auto{% endif %} mb-3">
<div class="col-6 col-sm-4 col-md-2 col-xl{% if include.auto-columns %}-auto{% endif %}{% if type[0] == 'light' %} bg-dark{% endif %} py-3">
{% if include.icon or include.icon-only %}
{% assign icon = type[1].icon %}
{% endif %}

@ -1,4 +1,4 @@
// Components
// Layout & components
@import "~bootstrap/scss/root";
@import "~bootstrap/scss/reboot";
@import "~bootstrap/scss/type";

@ -1,5 +1,6 @@
// Config
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/maps";
@import "~bootstrap/scss/mixins";
@import "~bootstrap/scss/utilities";

@ -47,29 +47,29 @@
// Override bootstrap core
}
@mixin button-variant(
$background: null,
$border: null,
$color: null,
$hover-background: null,
$hover-border: null,
$hover-color: null,
$active-background: null,
$active-border: null,
$active-color: null,
$disabled-background: null,
$disabled-border: null,
$disabled-color: null
) {
// Override bootstrap core
}
@mixin button-outline-variant(
$color: null,
$color-hover: null,
$active-background: null,
$active-border: null,
$active-color: null
) {
// Override bootstrap core
}
//@mixin button-variant(
// $background: null,
// $border: null,
// $color: null,
// $hover-background: null,
// $hover-border: null,
// $hover-color: null,
// $active-background: null,
// $active-border: null,
// $active-color: null,
// $disabled-background: null,
// $disabled-border: null,
// $disabled-color: null
//) {
// // Override bootstrap core
//}
//
//@mixin button-outline-variant(
// $color: null,
// $color-hover: null,
// $active-background: null,
// $active-border: null,
// $active-color: null
//) {
// // Override bootstrap core
//}

@ -1,4 +1,4 @@
$variable-prefix: "tblr-" !default;
$prefix: "tblr-" !default;
// BASE CONFIG
$enable-social-colors: true !default;
@ -191,6 +191,8 @@ $social-colors: (
"tabler": #206bc4
) !default;
$theme-colors: map-merge($theme-colors, map-merge($extra-colors, $social-colors));
// Dark mode
$dark-mode-darken: darken($dark, 2%) !default;
$dark-mode-lighten: lighten($dark, 2%) !default;
@ -299,6 +301,7 @@ $overlay-gradient: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .6
//accordion
$accordion-bg: transparent !default;
$accordion-color: var(--#{$prefix}body-color) !default;
$accordion-border-color: $border-color-transparent !default;
$accordion-icon-width: 1rem !default;
@ -482,7 +485,7 @@ $nav-bordered-margin-x: 1.25rem !default;
$navbar-height: 3.5rem !default;
$navbar-padding-y: .25rem !default;
$navbar-light-color: rgba($body-color, $text-muted-opacity) !default;
$navbar-light-color: $body-color !default;
$navbar-light-brand-color: $body-color !default;
$navbar-light-border-color: $border-color-transparent !default;
$navbar-light-active-color: $body-color !default;
@ -547,7 +550,6 @@ $spinner-height: 1.5rem !default;
$spinner-width-sm: 1rem !default;
$spinner-height-sm: 1rem !default;
$spinner-border-width: 2px !default;
$spinner-border-width-sm: 1px !default;
//tables
$table-color: inherit !default;
@ -558,9 +560,9 @@ $table-th-border-color: $border-color-transparent !default;
$table-th-padding-x: $table-cell-padding-x !default;
$table-th-padding-y: .5rem !default;
$table-th-color: $text-muted !default;
$table-th-bg: var(--#{$variable-prefix}border-color-light) !default;
$table-th-bg: var(--#{$prefix}border-color-light) !default;
$table-striped-order: even !default;
$table-striped-bg: var(--#{$variable-prefix}border-color-light) !default;
$table-striped-bg: var(--#{$prefix}border-color-light) !default;
$table-group-separator-color: $border-color-transparent !default;
$table-sort-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1'><path d='M5 7l3 -3l3 3'/><path d='M5 10l3 3l3 -3'/></svg>") !default;
@ -627,7 +629,7 @@ $form-switch-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/200
$form-switch-bg-size: auto !default;
$form-range-track-height: .25rem !default;
$form-range-track-bg: var(--#{$variable-prefix}border-color-light) !default;
$form-range-track-bg: var(--#{$prefix}border-color-light) !default;
$form-range-thumb-border: 2px solid $form-range-track-bg !default;
$form-range-thumb-height: 1rem !default;
$form-range-thumb-focus-box-shadow-width: .125rem !default;

@ -85,8 +85,8 @@ $demo-icon-size: 4rem;
aspect-ratio: 1;
text-align: center;
padding: .5rem;
border-right: 1px solid var(--#{$variable-prefix}border-color);
border-bottom: 1px solid var(--#{$variable-prefix}border-color);
border-right: 1px solid var(--#{$prefix}border-color);
border-bottom: 1px solid var(--#{$prefix}border-color);
color: inherit;
cursor: pointer;
@ -121,12 +121,12 @@ $demo-icon-size: 4rem;
height: 3rem;
width: 3rem;
position: relative;
border: 1px solid var(--#{$variable-prefix}border-color);
border: 1px solid var(--#{$prefix}border-color);
box-shadow: $shadow;
&-light { background: linear-gradient(135deg, $white 50%, $light 50%); }
&-mixed { background-image: linear-gradient(135deg, $dark 50%, #fff 50%); }
&-transparent { background: $light; }
&-dark { background: $dark; }
&-colored { background-image: linear-gradient(135deg, var(--#{$variable-prefix}primary) 50%, $light 50%); }
&-colored { background-image: linear-gradient(135deg, var(--#{$prefix}primary) 50%, $light 50%); }
}

@ -3,14 +3,22 @@
font-size: 16px;
height: 100%;
--#{$variable-prefix}card-bg: #{$card-bg};
--#{$variable-prefix}card-bg-rgb: #{to-rgb($card-bg)};
@each $name, $color in $theme-colors {
--#{$prefix}#{$name}: #{$color};
}
@each $name, $color in $theme-colors {
--#{$prefix}#{$name}-rgb: #{to-rgb($color)};
}
--#{$prefix}card-bg: #{$card-bg};
--#{$prefix}card-bg-rgb: #{to-rgb($card-bg)};
--#{$variable-prefix}border-color: #{$border-color};
--#{$variable-prefix}border-color-rgb: #{to-rgb($border-color)};
--#{$prefix}border-color: #{$border-color};
--#{$prefix}border-color-rgb: #{to-rgb($border-color)};
--#{$variable-prefix}border-color-light: #{$border-color-light};
--#{$variable-prefix}border-color-light-rgb: #{to-rgb($border-color-light)};
--#{$prefix}border-color-light: #{$border-color-light};
--#{$prefix}border-color-light-rgb: #{to-rgb($border-color-light)};
}
body {
@ -47,19 +55,19 @@ body {
// Boxed container
//
.layout-boxed {
--#{$variable-prefix}theme-boxed-border-radius: 0;
--#{$variable-prefix}theme-boxed-width: #{map-get($container-max-widths, xxl)};
--#{$prefix}theme-boxed-border-radius: 0;
--#{$prefix}theme-boxed-width: #{map-get($container-max-widths, xxl)};
@include media-breakpoint-up(md) {
background: $dark linear-gradient(to right, rgba(#fff, .1), transparent) fixed;
padding: 1rem;
--#{$variable-prefix}theme-boxed-border-radius: #{$border-radius};
--#{$prefix}theme-boxed-border-radius: #{$border-radius};
}
.page {
margin: 0 auto;
max-width: var(--#{$variable-prefix}theme-boxed-width);
border-radius: var(--#{$variable-prefix}theme-boxed-border-radius);
max-width: var(--#{$prefix}theme-boxed-width);
border-radius: var(--#{$prefix}theme-boxed-border-radius);
color: $body-color;
@include media-breakpoint-up(md) {
@ -68,8 +76,8 @@ body {
}
> .navbar:first-child {
border-top-left-radius: var(--#{$variable-prefix}theme-boxed-border-radius);
border-top-right-radius: var(--#{$variable-prefix}theme-boxed-border-radius);
border-top-left-radius: var(--#{$prefix}theme-boxed-border-radius);
border-top-right-radius: var(--#{$prefix}theme-boxed-border-radius);
}
}
}

@ -12,19 +12,19 @@ body:not(.theme-dark) .hide-theme-light {
@include dark-mode {
& {
--#{$variable-prefix}body-color: #{$dark-mode-text};
--#{$variable-prefix}body-color-rgb: #{to-rgb($dark-mode-text)};
--#{$prefix}body-color: #{$dark-mode-text};
--#{$prefix}body-color-rgb: #{to-rgb($dark-mode-text)};
--#{$variable-prefix}body-bg: #{$dark-mode-darken};
--#{$variable-prefix}body-bg-rgb: #{to-rgb($dark-mode-darken)};
--#{$prefix}body-bg: #{$dark-mode-darken};
--#{$prefix}body-bg-rgb: #{to-rgb($dark-mode-darken)};
--#{$variable-prefix}card-bg: #{$dark};
--#{$variable-prefix}card-bg-rgb: #{to-rgb($dark)};
--#{$prefix}card-bg: #{$dark};
--#{$prefix}card-bg-rgb: #{to-rgb($dark)};
--#{$variable-prefix}border-color: #{$dark-mode-border-color};
--#{$variable-prefix}border-color-light: #{$dark-mode-border-color-light};
--#{$prefix}border-color: #{$dark-mode-border-color};
--#{$prefix}border-color-light: #{$dark-mode-border-color-light};
--#{$variable-prefix}btn-color: #{$dark};
--#{$prefix}btn-color: #{$dark};
color: $dark-mode-text;
background-color: $dark-mode-darken;
@ -114,7 +114,7 @@ body:not(.theme-dark) .hide-theme-light {
}
.avatar {
--#{$variable-prefix}avatar-bg: #{$dark-mode-lighten};
--#{$prefix}avatar-bg: #{$dark-mode-lighten};
}
.avatar-list-stacked .avatar {
@ -137,7 +137,7 @@ body:not(.theme-dark) .hide-theme-light {
}
.apexcharts-gridline {
stroke: var(--#{$variable-prefix}border-color);
stroke: var(--#{$prefix}border-color);
}
.apexcharts-legend-text {
@ -189,11 +189,11 @@ body:not(.theme-dark) .hide-theme-light {
.form-control.is-invalid,
.was-validated .form-control:invalid {
border-color: var(--#{$variable-prefix}danger);
border-color: var(--#{$prefix}danger);
}
.form-control.is-valid,
.was-validated .form-control:valid {
border-color: var(--#{$variable-prefix}success);
border-color: var(--#{$prefix}success);
}
}

@ -4,9 +4,9 @@
@include scrollbar;
.text-muted {
color: rgba($color, $text-muted-opacity) !important;
}
//.text-muted {
// color: rgba($color, $text-muted-opacity) !important;
//}
.navbar-brand {
color: $brand-color;
@ -84,8 +84,8 @@
}
.navbar-nav {
margin-left: calc( -1 * var(--#{$variable-prefix}gutter-x, #{$container-padding-x}));
margin-right: calc( -1 * var(--#{$variable-prefix}gutter-x, #{$container-padding-x}));
margin-left: calc( -1 * var(--#{$prefix}gutter-x, #{$container-padding-x}));
margin-right: calc( -1 * var(--#{$prefix}gutter-x, #{$container-padding-x}));
.nav-link {
padding: .5rem $container-padding-x;
@ -269,7 +269,6 @@ Navbar brand
}
.navbar-brand-image {
display: block;
height: $navbar-brand-image-height;
width: auto;
}

@ -10,20 +10,6 @@
@return shade-color($color, 10%);
}
@function theme-colors($social: true) {
$colors: $theme-colors;
@if $enable-extra-colors {
$colors: map-merge($colors, $extra-colors);
}
@if ($enable-social-colors and $social) {
$colors: map-merge($colors, $social-colors);
}
@return $colors;
}
@function str-replace($string, $search, $replace: "") {
$index: str-index($string, $search);

@ -22,15 +22,15 @@
#{if(&, "&", "*")}::-webkit-scrollbar-thumb {
border-radius: 5px;
background: rgba(var(--#{$variable-prefix}body-color-rgb), .16);
background: rgba(var(--#{$prefix}body-color-rgb), .16);
}
#{if(&, "&", "*")}::-webkit-scrollbar-track {
background: rgba(var(--#{$variable-prefix}body-color-rgb), .06);
background: rgba(var(--#{$prefix}body-color-rgb), .06);
}
#{if(&, "&", "*")}:hover::-webkit-scrollbar-thumb {
background: rgba(var(--#{$variable-prefix}body-color-rgb), .32);
background: rgba(var(--#{$prefix}body-color-rgb), .32);
}
#{if(&, "&", "*")}::-webkit-scrollbar-corner {
@ -74,3 +74,29 @@
}
}
}
//
// Button ghost
//
@mixin button-ghost-variant(
$color,
$color-hover: color-contrast($color),
$active-background: $color,
$active-border: $color,
$active-color: color-contrast($active-background)
) {
--#{$prefix}btn-color: #{$color};
--#{$prefix}btn-border-color: transparent;
--#{$prefix}btn-hover-color: #{$color-hover};
--#{$prefix}btn-hover-bg: #{$active-background};
--#{$prefix}btn-hover-border-color: #{$active-border};
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb($color)};
--#{$prefix}btn-active-color: #{$active-color};
--#{$prefix}btn-active-bg: #{$active-background};
--#{$prefix}btn-active-border-color: transparent;
--#{$prefix}btn-active-shadow: #{$btn-active-box-shadow};
--#{$prefix}btn-disabled-color: #{$color};
--#{$prefix}btn-disabled-bg: transparent;
--#{$prefix}btn-disabled-border-color: transparent;
--#{$prefix}gradient: none;
}

@ -1,3 +1,7 @@
.accordion {
--#{$prefix}accordion-color: #{$accordion-color};
}
.accordion-button {
&:focus:not(:focus-visible) {
outline: none;

@ -1,8 +1,8 @@
.alert {
--#{$variable-prefix}alert-color: #{$text-muted};
--#{$prefix}alert-color: #{$text-muted};
background: $white;
border: $alert-border-width solid $alert-border-color;
border-left: .25rem solid var(--#{$variable-prefix}alert-color);
border-left: .25rem solid var(--#{$prefix}alert-color);
box-shadow: $alert-shadow;
>:last-child {
@ -12,7 +12,7 @@
.alert-important {
border-color: transparent;
background: var(--#{$variable-prefix}alert-color);
background: var(--#{$prefix}alert-color);
color: #fff;
.alert-icon,
@ -28,18 +28,18 @@
.alert-link, {
&,
&:hover {
color: var(--#{$variable-prefix}alert-color);
color: var(--#{$prefix}alert-color);
}
}
@each $state, $value in $theme-colors {
.alert-#{$state} {
--#{$variable-prefix}alert-color: #{$value};
--#{$prefix}alert-color: #{$value};
}
}
.alert-icon {
color: var(--#{$variable-prefix}alert-color);
color: var(--#{$prefix}alert-color);
width: 1.5rem !important;
height: 1.5rem !important;
margin: -.125rem $alert-padding-x -.125rem 0;
@ -50,5 +50,5 @@
line-height: $h4-line-height;
font-weight: $font-weight-bold;
margin-bottom: .25rem;
color: var(--#{$variable-prefix}alert-color);
color: var(--#{$prefix}alert-color);
}

@ -1,10 +1,10 @@
.avatar {
--#{$variable-prefix}avatar-size: #{$avatar-size};
--#{$variable-prefix}avatar-bg: var(--#{$variable-prefix}border-color-light);
--#{$prefix}avatar-size: #{$avatar-size};
--#{$prefix}avatar-bg: var(--#{$prefix}border-color-light);
position: relative;
width: var(--#{$variable-prefix}avatar-size);
height: var(--#{$variable-prefix}avatar-size);
font-size: calc(var(--#{$variable-prefix}avatar-size) / #{$line-height-base * 2});
width: var(--#{$prefix}avatar-size);
height: var(--#{$prefix}avatar-size);
font-size: calc(var(--#{$prefix}avatar-size) / #{$line-height-base * 2});
font-weight: $font-weight-medium;
display: inline-flex;
align-items: center;
@ -14,12 +14,12 @@
text-transform: uppercase;
vertical-align: bottom;
user-select: none;
background: var(--#{$variable-prefix}avatar-bg) no-repeat center/cover;
background: var(--#{$prefix}avatar-bg) no-repeat center/cover;
border-radius: $avatar-border-radius;
svg {
width: calc(var(--#{$variable-prefix}avatar-size) / #{divide(40, 24)});
height: calc(var(--#{$variable-prefix}avatar-size) / #{divide(40, 24)});
width: calc(var(--#{$prefix}avatar-size) / #{divide(40, 24)});
height: calc(var(--#{$prefix}avatar-size) / #{divide(40, 24)});
}
.badge {
@ -41,7 +41,7 @@
@each $avatar-size, $size in $avatar-sizes {
.avatar-#{$avatar-size} {
--#{$variable-prefix}avatar-size: #{$size};
--#{$prefix}avatar-size: #{$size};
}
.avatar-#{$avatar-size} .badge:empty {
@ -75,7 +75,7 @@
.avatar-list-stacked {
.avatar {
margin-right: -.5rem !important;
box-shadow: 0 0 0 2px var(--#{$variable-prefix}card-bg);
box-shadow: 0 0 0 2px var(--#{$prefix}card-bg);
}
}
@ -108,7 +108,7 @@
.page-avatar {
.page-cover ~ * & {
margin-top: calc(calc(-1 * calc(var(--#{$variable-prefix}avatar-size) * .5)) - #{$content-padding-y});
margin-top: calc(calc(-1 * calc(var(--#{$prefix}avatar-size) * .5)) - #{$content-padding-y});
box-shadow: 0 0 0 .25rem $body-bg;
}
}

@ -23,6 +23,6 @@
@each $name, $symbol in $breadcrumb-variants {
.breadcrumb-#{$name} {
--#{$variable-prefix}breadcrumb-divider: "#{quote($symbol)}";
--#{$prefix}breadcrumb-divider: "#{quote($symbol)}";
}
}

@ -1,47 +1,44 @@
//
// Button
//
.btn {
--#{$variable-prefix}btn-color-text-rgb: var(--#{$variable-prefix}body-color-rgb);
--#{$prefix}btn-icon-size: #{$icon-size};
--#{$prefix}btn-color: var(--#{$prefix}color-text);
--#{$prefix}btn-border-color: var(--#{$prefix}border-color);
//background-color: var(--#{$prefix}btn-color, var(--#{$prefix}card-bg));
//color: var(--#{$prefix}btn-color-text);
display: inline-flex;
align-items: center;
justify-content: center;
border-color: var(--#{$variable-prefix}border-color);
white-space: nowrap;
background-color: var(--#{$variable-prefix}btn-color, var(--#{$variable-prefix}card-bg));
color: var(--#{$variable-prefix}btn-color-text);
&:hover {
color: var(--#{$variable-prefix}btn-color-text);
border-color: rgba(var(--#{$variable-prefix}btn-color-text-rgb), #{$border-active-opacity});
}
&:focus:not([disabled]):not(.disabled) {
border-color: var(--#{$variable-prefix}btn-color, #{$primary});
}
&:disabled,
&.disabled {
cursor: not-allowed;
}
//&:hover {
// color: var(--#{$prefix}btn-color-text);
// border-color: rgba(var(--#{$prefix}btn-color-text-rgb), #{$border-active-opacity});
//}
//
//&:focus:not([disabled]):not(.disabled) {
// border-color: var(--#{$prefix}btn-color, #{$primary});
//}
.icon {
width: $icon-size;
height: $icon-size;
min-width: $icon-size;
margin: 0 .5rem 0 -.25rem;
width: var(--#{$prefix}btn-icon-size);
height: var(--#{$prefix}btn-icon-size);
min-width: var(--#{$prefix}btn-icon-size);
margin: 0 calc(var(--tblr-btn-padding-x) / 2) 0 calc(var(--tblr-btn-padding-x) / -4);
vertical-align: bottom;
color: inherit;
}
.avatar {
width: 1.25rem;
height: 1.25rem;
vertical-align: text-top;
margin: 0 .5rem 0 -.25rem;
width: var(--#{$prefix}btn-icon-size);
height: var(--#{$prefix}btn-icon-size);
margin: 0 calc(var(--tblr-btn-padding-x) / 2) 0 calc(var(--tblr-btn-padding-x) / -4);
}
.icon-right {
margin: 0 -.25rem 0 .5rem;
margin: 0 calc(var(--tblr-btn-padding-x) / -4) 0 calc(var(--tblr-btn-padding-x) / 2);
}
.badge {
@ -49,40 +46,6 @@
}
}
%btn-color {
border-color: $border-color-dark-transparent;
&:hover {
color: var(--#{$variable-prefix}btn-color-text);
background: var(--#{$variable-prefix}btn-color-interactive);
border-color: var(--#{$variable-prefix}btn-color);
}
}
%btn-outline {
background-color: transparent;
color: var(--#{$variable-prefix}btn-color);
border-color: var(--#{$variable-prefix}btn-color);
&:hover {
background-color: var(--#{$variable-prefix}btn-color);
color: var(--#{$variable-prefix}btn-color-text);
border-color: var(--#{$variable-prefix}btn-color);
}
}
%btn-ghost {
background: transparent;
color: var(--#{$variable-prefix}btn-color);
border-color: transparent;
&:hover {
background-color: var(--#{$variable-prefix}btn-color);
color: var(--#{$variable-prefix}btn-color-text);
border-color: var(--#{$variable-prefix}btn-color);
}
}
.btn-link {
color: $link-color;
background-color: transparent;
@ -98,12 +61,43 @@
}
}
.btn-lg {
svg.icon {
stroke-width: 2;
//
// Button color variations
//
.btn-white {
--#{$prefix}btn-bg: var(--#{$prefix}card-bg);
--#{$prefix}btn-hover-bg: var(--#{$prefix}card-bg);
}
@each $color, $value in $theme-colors {
.btn-#{$color} {
--#{$prefix}btn-border-color: transparent;
--#{$prefix}btn-color: #{color-contrast($value)};
}
}
@each $color, $value in $theme-colors {
.btn-ghost-#{$color} {
@include button-ghost-variant($value);
}
}
//
// Button sizes
//
.btn-sm, .btn-group-sm > .btn {
--#{$prefix}btn-line-height: 1.5;
--#{$prefix}btn-icon-size: .75rem;
}
.btn-lg, .btn-group-lg > .btn {
--#{$prefix}btn-line-height: 1.5;
--#{$prefix}btn-icon-size: 2rem;
}
//
// Button shapes
//
.btn-pill {
padding-right: 1.5em;
padding-left: 1.5em;
@ -114,22 +108,27 @@
}
}
.btn-icon {
min-width: add($btn-line-height * $btn-font-size + $btn-padding-y * 2, $btn-border-width * 2);
.btn-square {
border-radius: 0;
}
&.btn-sm {
min-width: add($btn-line-height * $btn-font-size-sm + $btn-padding-y-sm * 2, $btn-border-width * 2);
}
//
// Icon button
//
.btn-icon {
min-width: calc((var(--#{$prefix}btn-line-height) * var(--#{$prefix}btn-font-size)) + (var(--#{$prefix}btn-padding-y) * 2) + (var(--#{$prefix}btn-border-width) * 2));
min-height: calc((var(--#{$prefix}btn-line-height) * var(--#{$prefix}btn-font-size)) + (var(--#{$prefix}btn-padding-y) * 2) + (var(--#{$prefix}btn-border-width) * 2));
padding-left: 0;
padding-right: 0;
.icon {
margin: 0 -1em;
margin: calc(-1 * var(--#{$prefix}btn-padding-x));
}
}
.btn-square {
border-radius: 0;
}
//
// Button list
//
.btn-list {
display: flex;
flex-wrap: wrap;
@ -141,6 +140,9 @@
}
}
//
// Button floating
//
.btn-floating {
position: fixed;
z-index: $zindex-fixed;
@ -149,54 +151,36 @@
border-radius: $border-radius-pill;
}
//
// Button loading
//
.btn-loading {
position: relative;
color: transparent !important;
text-shadow: none !important;
pointer-events: none;
> * {
opacity: 0;
}
&:after {
content: '';
display: inline-block;
vertical-align: text-bottom;
border: $spinner-border-width-sm solid currentColor;
border: $spinner-border-width solid currentColor;
border-right-color: transparent;
border-radius: $border-radius-pill;
color: $white;
color: var(--#{$prefix}btn-color);
position: absolute;
width: 1rem;
height: 1rem;
left: calc(50% - .5rem);
top: calc(50% - .5rem);
width: var(--tblr-btn-icon-size);
height: var(--tblr-btn-icon-size);
left: calc(50% - var(--tblr-btn-icon-size) / 2);
top: calc(50% - var(--tblr-btn-icon-size) / 2);
animation: spinner-border .75s linear infinite;
}
}
//
// Button color variations
//
@each $name, $color in theme-colors() {
.btn-#{$name},
.btn-outline-#{$name},
.btn-ghost-#{$name} {
--#{$variable-prefix}btn-color: #{$color};
--#{$variable-prefix}btn-color-interactive: #{theme-color-darker($color)};
--#{$variable-prefix}btn-color-text: #{color-contrast($color)};
}
.btn-#{$name} {
@extend %btn-color;
}
.btn-outline-#{$name} {
@extend %btn-outline;
}
.btn-ghost-#{$name} {
@extend %btn-ghost;
}
}
//
// Action button
//

@ -1,9 +1,9 @@
.card {
--#{$variable-prefix}card-border-radius: #{$card-border-radius};
--#{$prefix}card-border-radius: #{$card-border-radius};
box-shadow: $card-shadow;
border: $card-border-width solid $card-border-color;
background: var(--#{$variable-prefix}card-bg, #{$card-bg});
border-radius: var(--#{$variable-prefix}card-border-radius);
background: var(--#{$prefix}card-bg, #{$card-bg});
border-radius: var(--#{$prefix}card-border-radius);
@include transition(transform $transition-time ease-out, opacity $transition-time ease-out, box-shadow $transition-time ease-out);
@media print {
@ -54,8 +54,8 @@
}
.card-stamp-icon {
background: $text-muted;
color: $white;
background: var(--#{$prefix}muted);
color: var(--#{$prefix}card-bg);
display: flex;
align-items: center;
justify-content: center;
@ -129,7 +129,7 @@
padding: $card-spacer-y $card-spacer-x;
text-align: center;
@include transition(background $transition-time);
border-top: 1px solid var(--#{$variable-prefix}border-color);
border-top: 1px solid var(--#{$prefix}border-color);
flex: 1;
color: inherit;
font-weight: $font-weight-medium;
@ -140,7 +140,7 @@
}
& + & {
border-left: 1px solid var(--#{$variable-prefix}border-color);
border-left: 1px solid var(--#{$prefix}border-color);
}
}
@ -156,7 +156,7 @@
content: "";
background: $card-bg;
border: 1px solid $card-border-color;
border-radius: var(--#{$variable-prefix}card-border-radius) var(--#{$variable-prefix}card-border-radius) 0 0;
border-radius: var(--#{$prefix}card-border-radius) var(--#{$prefix}card-border-radius) 0 0;
}
}
@ -204,13 +204,13 @@
background: transparent;
&:first-child {
border-radius: var(--#{$variable-prefix}card-border-radius) var(--#{$variable-prefix}card-border-radius) 0 0;
border-radius: var(--#{$prefix}card-border-radius) var(--#{$prefix}card-border-radius) 0 0;
}
}
.card-header-light {
border-bottom-color: transparent;
background: var(--#{$variable-prefix}light);
background: var(--#{$prefix}light);
}
.card-header-tabs {
@ -259,7 +259,7 @@
margin-top: auto;
&:last-child {
border-radius: 0 0 var(--#{$variable-prefix}card-border-radius) var(--#{$variable-prefix}card-border-radius);
border-radius: 0 0 var(--#{$prefix}card-border-radius) var(--#{$prefix}card-border-radius);
}
}
@ -384,7 +384,7 @@ Card status
right: 0;
left: 0;
height: $card-status-size;
border-radius: var(--#{$variable-prefix}card-border-radius) var(--#{$variable-prefix}card-border-radius) 0 0;
border-radius: var(--#{$prefix}card-border-radius) var(--#{$prefix}card-border-radius) 0 0;
}
.card-status-start {
@ -393,7 +393,7 @@ Card status
bottom: 0;
width: $card-status-size;
height: 100%;
border-radius: var(--#{$variable-prefix}card-border-radius) 0 0 var(--#{$variable-prefix}card-border-radius);
border-radius: var(--#{$prefix}card-border-radius) 0 0 var(--#{$prefix}card-border-radius);
}
.card-status-bottom {
@ -402,7 +402,7 @@ Card status
bottom: 0;
width: 100%;
height: $card-status-size;
border-radius: 0 0 var(--#{$variable-prefix}card-border-radius) var(--#{$variable-prefix}card-border-radius);
border-radius: 0 0 var(--#{$prefix}card-border-radius) var(--#{$prefix}card-border-radius);
}
/**
@ -488,7 +488,7 @@ Card avatar
margin-left: auto;
margin-right: auto;
box-shadow: 0 0 0 .25rem $card-bg;
margin-top: calc(-1 * calc(var(--#{$variable-prefix}avatar-size) * .5));
margin-top: calc(-1 * calc(var(--#{$prefix}avatar-size) * .5));
}
/*
@ -596,7 +596,7 @@ Card list group
}
.nav-tabs + .tab-content .card {
border-bottom-left-radius: var(--#{$variable-prefix}card-border-radius);
border-bottom-left-radius: var(--#{$prefix}card-border-radius);
border-top-left-radius: 0;
}
}

@ -45,7 +45,7 @@
&:before {
content: '';
padding-top: var(--#{$variable-prefix}aspect-ratio, 100%);
padding-top: var(--#{$prefix}aspect-ratio, 100%);
display: block;
}
}

@ -3,12 +3,12 @@
//
.datagrid {
--#{$variable-prefix}datagrid-padding: #{$datagrid-padding};
--#{$variable-prefix}datagrid-item-width: #{$datagrid-item-width};
--#{$prefix}datagrid-padding: #{$datagrid-padding};
--#{$prefix}datagrid-item-width: #{$datagrid-item-width};
display: grid;
grid-gap: var(--#{$variable-prefix}datagrid-padding);
grid-template-columns: repeat(auto-fit, minmax(var(--#{$variable-prefix}datagrid-item-width), 1fr));
grid-gap: var(--#{$prefix}datagrid-padding);
grid-template-columns: repeat(auto-fit, minmax(var(--#{$prefix}datagrid-item-width), 1fr));
}
.datagrid-title {

@ -24,7 +24,7 @@ $countries: (
background-repeat: no-repeat;
background-position: center;
background-size: cover;
border: 1px solid var(--#{$variable-prefix}border-color);
border: 1px solid var(--#{$prefix}border-color);
border-radius: 3px;
}

@ -57,7 +57,7 @@ Form select
*/
.form-select {
&:-moz-focusring {
color: var(--#{$variable-prefix}body-color);
color: var(--#{$prefix}body-color);
}
}
@ -66,8 +66,8 @@ Form control
*/
.form-control {
&:-webkit-autofill {
box-shadow: 0 0 0 1000px var(--#{$variable-prefix}body-bg) inset;
color: var(--#{$variable-prefix}body-color);
box-shadow: 0 0 0 1000px var(--#{$prefix}body-bg) inset;
color: var(--#{$prefix}body-color);
}
&:disabled,
@ -138,8 +138,8 @@ Form control
.form-fieldset {
padding: 1rem;
margin-bottom: 1rem;
background: var(--#{$variable-prefix}body-bg);
border: 1px solid var(--#{$variable-prefix}border-color);
background: var(--#{$prefix}body-bg);
border: 1px solid var(--#{$prefix}border-color);
border-radius: $border-radius;
}

@ -8,7 +8,7 @@
%container-common {
@include media-breakpoint-down($cards-grid-breakpoint) {
--#{$variable-prefix}gutter-x: #{$grid-gutter-width};
--#{$prefix}gutter-x: #{$grid-gutter-width};
}
}
@ -56,8 +56,8 @@
}
.row-cards {
--#{$variable-prefix}gutter-x: #{$cards-grid-gap};
--#{$variable-prefix}gutter-y: #{$cards-grid-gap};
--#{$prefix}gutter-x: #{$cards-grid-gap};
--#{$prefix}gutter-y: #{$cards-grid-gap};
min-width: 0;
.row-cards {
@ -65,8 +65,8 @@
}
@include media-breakpoint-down($cards-grid-breakpoint) {
--#{$variable-prefix}gutter-x: #{$cards-grid-gap * .5};
--#{$variable-prefix}gutter-y: #{$cards-grid-gap * .5};
--#{$prefix}gutter-x: #{$cards-grid-gap * .5};
--#{$prefix}gutter-y: #{$cards-grid-gap * .5};
}
}

@ -1,6 +1,6 @@
.legend {
display: inline-block;
background: var(--#{$variable-prefix}border-color-light);
background: var(--#{$prefix}border-color-light);
width: .75em;
height: .75em;
border-radius: $border-radius;

@ -11,7 +11,7 @@
line-height: 1;
text-transform: uppercase;
color: $text-muted;
border-bottom: 1px solid var(--#{$variable-prefix}border-color);
border-bottom: 1px solid var(--#{$prefix}border-color);
.list-group-flush > & {
&:last-child {

@ -19,7 +19,7 @@
}
& + & {
border-top: 1px solid var(--#{$variable-prefix}border-color);
border-top: 1px solid var(--#{$prefix}border-color);
}
}

@ -7,7 +7,7 @@
.nav {
margin-left: 1.25rem;
border-left: 1px solid var(--#{$variable-prefix}border-color);
border-left: 1px solid var(--#{$prefix}border-color);
padding-left: .5rem;
}

@ -1,5 +1,5 @@
.offcanvas {
background: var(--#{$variable-prefix}card-bg);
background: var(--#{$prefix}card-bg);
}
.offcanvas-header {

@ -16,7 +16,7 @@
width: 100%;
line-height: $progress-height;
appearance: none;
background: var(--#{$variable-prefix}border-color-light);
background: var(--#{$prefix}border-color-light);
&::-webkit-progress-bar {
background: $gray-100;
@ -63,6 +63,6 @@
.progress-separated {
.progress-bar {
border-right: 2px solid var(--#{$variable-prefix}card-bg, #{$card-bg});
border-right: 2px solid var(--#{$prefix}card-bg, #{$card-bg});
}
}

@ -40,17 +40,17 @@
// Status
//
.status {
--#{$variable-prefix}status-height: #{$status-height};
--#{$variable-prefix}status-color: #{$text-muted};
--#{$variable-prefix}status-color-rgb: #{to-rgb($text-muted)};
--#{$prefix}status-height: #{$status-height};
--#{$prefix}status-color: #{$text-muted};
--#{$prefix}status-color-rgb: #{to-rgb($text-muted)};
display: inline-flex;
align-items: center;
height: var(--#{$variable-prefix}status-height);
height: var(--#{$prefix}status-height);
padding: .25rem .75rem;
gap: .5rem;
color: var(--#{$variable-prefix}status-color);
background: rgba(var(--#{$variable-prefix}status-color-rgb), .1);
color: var(--#{$prefix}status-color);
background: rgba(var(--#{$prefix}status-color-rgb), .1);
font-size: $font-size-base;
text-transform: none;
letter-spacing: normal;
@ -60,7 +60,7 @@
margin: 0;
.status-dot {
background: var(--#{$variable-prefix}status-color);
background: var(--#{$prefix}status-color);
}
.icon {
@ -69,15 +69,15 @@
}
.status-lite {
border: 1px solid var(--#{$variable-prefix}border-color) !important;
border: 1px solid var(--#{$prefix}border-color) !important;
background: transparent !important;
color: var(--#{$variable-prefix}body-text) !important;
color: var(--#{$prefix}body-text) !important;
}
@each $name, $color in theme-colors() {
@each $name, $color in $theme-colors {
.status-#{$name} {
--#{$variable-prefix}status-color: #{$color};
--#{$variable-prefix}status-color-rgb: #{to-rgb($color)};
--#{$prefix}status-color: #{$color};
--#{$prefix}status-color-rgb: #{to-rgb($color)};
}
}
@ -85,13 +85,13 @@
// Status dot
//
.status-dot {
--#{$variable-prefix}status-dot-color: var(--#{$variable-prefix}status-color, #{$text-muted});
--#{$variable-prefix}status-size: #{$status-dot-size};
--#{$prefix}status-dot-color: var(--#{$prefix}status-color, #{$text-muted});
--#{$prefix}status-size: #{$status-dot-size};
position: relative;
display: inline-block;
width: var(--#{$variable-prefix}status-size);
height: var(--#{$variable-prefix}status-size);
background: var(--#{$variable-prefix}status-dot-color);
width: var(--#{$prefix}status-size);
height: var(--#{$prefix}status-size);
background: var(--#{$prefix}status-dot-color);
border-radius: $border-radius-pill;
}
@ -122,24 +122,24 @@ $btn-colors: $theme-colors;
// Status indicator
//
.status-indicator {
--#{$variable-prefix}status-indicator-size: 2.5rem;
--#{$variable-prefix}status-indicator-color: var(--#{$variable-prefix}status-color, #{$text-muted});
--#{$prefix}status-indicator-size: 2.5rem;
--#{$prefix}status-indicator-color: var(--#{$prefix}status-color, #{$text-muted});
display: block;
position: relative;
width: var(--#{$variable-prefix}status-indicator-size);
height: var(--#{$variable-prefix}status-indicator-size);
width: var(--#{$prefix}status-indicator-size);
height: var(--#{$prefix}status-indicator-size);
}
.status-indicator-circle {
--#{$variable-prefix}status-circle-size: .75rem;
--#{$prefix}status-circle-size: .75rem;
position: absolute;
left: 50%;
top: 50%;
margin: calc(var(--#{$variable-prefix}status-circle-size) / -2) 0 0 calc(var(--#{$variable-prefix}status-circle-size) / -2);
width: var(--#{$variable-prefix}status-circle-size);
height: var(--#{$variable-prefix}status-circle-size);
margin: calc(var(--#{$prefix}status-circle-size) / -2) 0 0 calc(var(--#{$prefix}status-circle-size) / -2);
width: var(--#{$prefix}status-circle-size);
height: var(--#{$prefix}status-circle-size);
border-radius: $border-radius-pill;
background: var(--#{$variable-prefix}status-color);
background: var(--#{$prefix}status-color);
&:nth-child(1) {
z-index: 3;

@ -1,7 +1,7 @@
.toast {
background: $white;
border: $alert-border-width solid $alert-border-color;
border-left: .25rem solid var(--#{$variable-prefix}toast-color);
border-left: .25rem solid var(--#{$prefix}toast-color);
box-shadow: $alert-shadow;
.toast-header {
@ -15,6 +15,6 @@
@each $state, $value in $theme-colors {
.toast-#{$state} {
--#{$variable-prefix}toast-color: #{$value};
--#{$prefix}toast-color: #{$value};
}
}

@ -19,10 +19,10 @@ Form control dark theme fix
*/
.form-control {
&::file-selector-button {
background-color: var(--#{$variable-prefix}btn-color, #{$form-file-button-bg});
background-color: var(--#{$prefix}btn-color, #{$form-file-button-bg});
}
&:hover:not(:disabled):not([readonly])::file-selector-button {
background-color: var(--#{$variable-prefix}btn-color, #{$form-file-button-hover-bg});
background-color: var(--#{$prefix}btn-color, #{$form-file-button-hover-bg});
}
}

@ -18,7 +18,7 @@ Image check
display: block;
margin: 0;
user-select: none;
border: 1px solid var(--#{$variable-prefix}border-color);
border: 1px solid var(--#{$prefix}border-color);
border-radius: 3px;
.form-imagecheck-input:focus ~ & {

@ -1,5 +1,5 @@
%validation-lite {
border-color: var(--#{$variable-prefix}border-color) !important;
border-color: var(--#{$prefix}border-color) !important;
}
@each $state, $data in $form-validation-states {

@ -1,9 +1,10 @@
// stylelint-disable declaration-no-important
// All colors
@each $color, $value in theme-colors() {
@each $color, $value in $theme-colors {
.bg-#{"" + $color} {
background: $value !important;
--tblr-bg-opacity: 1;
background-color: rgba(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity)) !important;
}
.bg-#{"" + $color}-lt {
@ -12,8 +13,8 @@
}
}
@each $color, $value in theme-colors() {
@each $color, $value in $theme-colors {
.text-#{"" + $color} {
color: $value !important;
color: var(--#{$prefix}#{$color}) !important;
}
}

@ -13,8 +13,8 @@
}
.jvm-series-container .jvm-legend {
background-color: var(--#{$variable-prefix}card-bg);
border: 1px solid var(--#{$variable-prefix}border-color);
background-color: var(--#{$prefix}card-bg);
border: 1px solid var(--#{$prefix}border-color);
min-width: 8rem;
.jvm-legend-inner .jvm-legend-tick {
@ -29,9 +29,9 @@
}
.jvm-zoom-btn {
border: 1px solid var(--#{$variable-prefix}border-color);
background: var(--#{$variable-prefix}card-bg);
color: var(--#{$variable-prefix}body-color);
border: 1px solid var(--#{$prefix}border-color);
background: var(--#{$prefix}card-bg);
color: var(--#{$prefix}body-color);
padding: 0;
display: flex;
align-items: center;

@ -4,12 +4,12 @@
--litepicker-button-next-month-color: #{$text-muted};
--litepicker-button-prev-month-color-hover: #{$primary};
--litepicker-button-next-month-color-hover: #{$primary};
--litepicker-day-color: var(--#{$variable-prefix}body-color);
--litepicker-day-color: var(--#{$prefix}body-color);
--litepicker-day-color-hover: #{$primary};
--litepicker-is-end-color-bg: #{$primary};
--litepicker-is-today-color: #{$primary};
--litepicker-month-header-color: var(--#{$variable-prefix}body-color);
--litepicker-container-months-color-bg: var(--#{$variable-prefix}card-bg);
--litepicker-month-header-color: var(--#{$prefix}body-color);
--litepicker-container-months-color-bg: var(--#{$prefix}card-bg);
font: inherit;
user-select: none;
@ -18,7 +18,7 @@
}
.container__main {
border: 1px solid var(--#{$variable-prefix}border-color);
border: 1px solid var(--#{$prefix}border-color);
border-radius: $border-radius;
box-shadow: $dropdown-box-shadow;
}

Loading…
Cancel
Save