From e3fb820b500b3da4cc1e65d2c8071a40d183211d Mon Sep 17 00:00:00 2001 From: catborise Date: Fri, 4 Nov 2022 18:49:41 +0300 Subject: [PATCH] update bootstrap&bootswatch 5.0.2 -> 5.2.2. Seperate bootswatch overrides for future update easiness --- appsettings/views.py | 6 +- dev/scss/bootstrap-overrides.scss | 108 ++--- dev/scss/bootstrap/_accordion.scss | 81 ++-- dev/scss/bootstrap/_alert.scss | 22 +- dev/scss/bootstrap/_badge.scss | 19 +- dev/scss/bootstrap/_breadcrumb.scss | 32 +- dev/scss/bootstrap/_button-group.scss | 5 +- dev/scss/bootstrap/_buttons.scss | 160 ++++++-- dev/scss/bootstrap/_card.scss | 93 +++-- dev/scss/bootstrap/_close.scss | 2 +- dev/scss/bootstrap/_containers.scss | 2 +- dev/scss/bootstrap/_dropdown.scss | 161 ++++---- dev/scss/bootstrap/_functions.scss | 71 +++- dev/scss/bootstrap/_grid.scss | 11 + dev/scss/bootstrap/_helpers.scss | 3 + dev/scss/bootstrap/_list-group.scss | 78 ++-- dev/scss/bootstrap/_maps.scss | 54 +++ dev/scss/bootstrap/_mixins.scss | 1 + dev/scss/bootstrap/_modal.scss | 122 +++--- dev/scss/bootstrap/_nav.scss | 73 +++- dev/scss/bootstrap/_navbar.scss | 226 +++++------ dev/scss/bootstrap/_offcanvas.scss | 183 ++++++--- dev/scss/bootstrap/_pagination.scss | 87 +++- dev/scss/bootstrap/_placeholders.scss | 51 +++ dev/scss/bootstrap/_popover.scss | 142 ++++--- dev/scss/bootstrap/_progress.scss | 29 +- dev/scss/bootstrap/_reboot.scss | 69 ++-- dev/scss/bootstrap/_root.scss | 71 +++- dev/scss/bootstrap/_spinners.scss | 60 ++- dev/scss/bootstrap/_tables.scss | 63 +-- dev/scss/bootstrap/_toasts.scss | 64 ++- dev/scss/bootstrap/_tooltip.scss | 117 +++--- dev/scss/bootstrap/_transitions.scss | 6 + dev/scss/bootstrap/_type.scss | 2 + dev/scss/bootstrap/_utilities.scss | 121 ++++-- dev/scss/bootstrap/_variables.scss | 378 +++++++++++++----- dev/scss/bootstrap/bootstrap-grid.scss | 11 +- dev/scss/bootstrap/bootstrap-reboot.scss | 14 +- dev/scss/bootstrap/bootstrap-utilities.scss | 9 +- dev/scss/bootstrap/bootstrap.scss | 11 +- .../bootstrap/forms/_floating-labels.scss | 18 +- dev/scss/bootstrap/forms/_form-check.scss | 33 +- dev/scss/bootstrap/forms/_form-control.scss | 51 +-- dev/scss/bootstrap/forms/_form-select.scss | 3 +- dev/scss/bootstrap/forms/_input-group.scss | 27 +- dev/scss/bootstrap/helpers/_color-bg.scss | 10 + .../bootstrap/helpers/_colored-links.scss | 4 +- dev/scss/bootstrap/helpers/_position.scss | 8 +- dev/scss/bootstrap/helpers/_ratio.scss | 4 +- dev/scss/bootstrap/helpers/_stacks.scss | 15 + dev/scss/bootstrap/helpers/_vr.scss | 8 + dev/scss/bootstrap/mixins/_alert.scss | 10 +- dev/scss/bootstrap/mixins/_backdrop.scss | 14 + dev/scss/bootstrap/mixins/_banner.scss | 9 + dev/scss/bootstrap/mixins/_breakpoints.scss | 16 +- dev/scss/bootstrap/mixins/_buttons.scss | 127 ++---- dev/scss/bootstrap/mixins/_container.scss | 6 +- dev/scss/bootstrap/mixins/_forms.scss | 28 +- dev/scss/bootstrap/mixins/_gradients.scss | 2 +- dev/scss/bootstrap/mixins/_grid.scss | 57 ++- dev/scss/bootstrap/mixins/_pagination.scss | 29 +- dev/scss/bootstrap/mixins/_reset-text.scss | 2 +- .../bootstrap/mixins/_table-variants.scss | 21 +- dev/scss/bootstrap/mixins/_utilities.scss | 45 ++- .../bootstrap/mixins/_visually-hidden.scss | 2 +- .../bootstrap-orj/_bootswatch.scss | 0 .../bootstrap-orj/_variables.scss | 0 .../cerulean/_bootswatch.scss | 15 +- .../cerulean/_variables.scss | 7 +- .../cosmo/_bootswatch.scss | 12 +- .../cosmo/_variables.scss | 9 +- .../cyborg/_bootswatch.scss | 14 +- .../cyborg/_variables.scss | 7 +- .../darkly/_bootswatch.scss | 13 +- .../darkly/_variables.scss | 10 +- .../flatly/_bootswatch.scss | 19 +- .../flatly/_variables.scss | 8 +- .../journal/_bootswatch.scss | 16 +- .../journal/_variables.scss | 9 +- .../litera/_bootswatch.scss | 21 +- .../litera/_variables.scss | 9 +- .../lumen/_bootswatch.scss | 37 +- .../lumen/_variables.scss | 4 +- .../lux/_bootswatch.scss | 32 +- .../lux/_variables.scss | 28 +- .../materia/_bootswatch.scss | 172 +++----- .../materia/_variables.scss | 15 +- .../minty/_bootswatch.scss | 7 +- .../minty/_variables.scss | 6 +- .../morph/_bootswatch.scss | 47 ++- .../morph/_variables.scss | 12 +- .../pulse/_bootswatch.scss | 18 +- .../pulse/_variables.scss | 13 +- .../quartz/_bootswatch.scss | 60 ++- .../quartz/_variables.scss | 29 +- .../sandstone/_bootswatch.scss | 32 +- .../sandstone/_variables.scss | 4 +- .../simplex/_bootswatch.scss | 17 +- .../simplex/_variables.scss | 4 +- .../sketchy/_bootswatch.scss | 91 +++-- .../sketchy/_variables.scss | 7 +- .../slate/_bootswatch.scss | 32 +- .../slate/_variables.scss | 15 +- .../solar/_bootswatch.scss | 14 +- .../solar/_variables.scss | 6 +- .../spacelab/_bootswatch.scss | 14 +- .../spacelab/_variables.scss | 9 +- .../superhero/_bootswatch.scss | 18 +- .../superhero/_variables.scss | 5 +- .../united/_bootswatch.scss | 12 +- .../united/_variables.scss | 11 +- .../vapor/_bootswatch.scss | 30 +- .../vapor/_variables.scss | 17 +- .../yeti/_bootswatch.scss | 40 +- .../yeti/_variables.scss | 4 +- .../zephyr/_bootswatch.scss | 50 ++- .../zephyr/_variables.scss | 32 +- dev/scss/wvc-main.scss | 4 +- .../wvc-themes/bootstrap-orj/_bootswatch.scss | 22 + .../wvc-themes/bootstrap-orj/_variables.scss | 1 + dev/scss/wvc-themes/cerulean/_bootswatch.scss | 8 + dev/scss/wvc-themes/cerulean/_variables.scss | 8 + dev/scss/wvc-themes/cosmo/_bootswatch.scss | 1 + dev/scss/wvc-themes/cosmo/_variables.scss | 8 + dev/scss/wvc-themes/cyborg/_bootswatch.scss | 1 + dev/scss/wvc-themes/cyborg/_variables.scss | 3 + dev/scss/wvc-themes/darkly/_bootswatch.scss | 1 + dev/scss/wvc-themes/darkly/_variables.scss | 3 + dev/scss/wvc-themes/flatly/_bootswatch.scss | 1 + dev/scss/wvc-themes/flatly/_variables.scss | 7 + dev/scss/wvc-themes/journal/_bootswatch.scss | 1 + dev/scss/wvc-themes/journal/_variables.scss | 12 + dev/scss/wvc-themes/litera/_bootswatch.scss | 1 + dev/scss/wvc-themes/litera/_variables.scss | 12 + dev/scss/wvc-themes/lumen/_bootswatch.scss | 1 + dev/scss/wvc-themes/lumen/_variables.scss | 12 + dev/scss/wvc-themes/lux/_bootswatch.scss | 5 + dev/scss/wvc-themes/lux/_variables.scss | 32 ++ dev/scss/wvc-themes/materia/_bootswatch.scss | 1 + dev/scss/wvc-themes/materia/_variables.scss | 23 ++ dev/scss/wvc-themes/minty/_bootswatch.scss | 1 + dev/scss/wvc-themes/minty/_variables.scss | 13 + dev/scss/wvc-themes/morph/_bootswatch.scss | 1 + dev/scss/wvc-themes/morph/_variables.scss | 22 + dev/scss/wvc-themes/pulse/_bootswatch.scss | 1 + dev/scss/wvc-themes/pulse/_variables.scss | 13 + dev/scss/wvc-themes/quartz/_bootswatch.scss | 1 + dev/scss/wvc-themes/quartz/_variables.scss | 25 ++ .../wvc-themes/sandstone/_bootswatch.scss | 1 + dev/scss/wvc-themes/sandstone/_variables.scss | 13 + dev/scss/wvc-themes/simplex/_bootswatch.scss | 1 + dev/scss/wvc-themes/simplex/_variables.scss | 15 + dev/scss/wvc-themes/sketchy/_bootswatch.scss | 1 + dev/scss/wvc-themes/sketchy/_variables.scss | 13 + dev/scss/wvc-themes/slate/_bootswatch.scss | 1 + dev/scss/wvc-themes/slate/_variables.scss | 22 + dev/scss/wvc-themes/solar/_bootswatch.scss | 1 + dev/scss/wvc-themes/solar/_variables.scss | 14 + dev/scss/wvc-themes/spacelab/_bootswatch.scss | 1 + dev/scss/wvc-themes/spacelab/_variables.scss | 14 + .../wvc-themes/superhero/_bootswatch.scss | 1 + dev/scss/wvc-themes/superhero/_variables.scss | 14 + dev/scss/wvc-themes/united/_bootswatch.scss | 1 + dev/scss/wvc-themes/united/_variables.scss | 13 + dev/scss/wvc-themes/vapor/_bootswatch.scss | 1 + dev/scss/wvc-themes/vapor/_variables.scss | 13 + dev/scss/wvc-themes/yeti/_bootswatch.scss | 1 + dev/scss/wvc-themes/yeti/_variables.scss | 13 + dev/scss/wvc-themes/zephyr/_bootswatch.scss | 1 + dev/scss/wvc-themes/zephyr/_variables.scss | 32 ++ instances/templates/instance.html | 2 +- static/css/wvc-main.min.css | 19 +- static/css/wvc-main.min.css.map | 2 +- static/js/bootstrap.bundle.min.js | 6 +- static/js/bootstrap.bundle.min.js.map | 2 +- 175 files changed, 3120 insertions(+), 1823 deletions(-) create mode 100755 dev/scss/bootstrap/_maps.scss create mode 100755 dev/scss/bootstrap/_placeholders.scss create mode 100755 dev/scss/bootstrap/helpers/_color-bg.scss create mode 100755 dev/scss/bootstrap/helpers/_stacks.scss create mode 100755 dev/scss/bootstrap/helpers/_vr.scss create mode 100755 dev/scss/bootstrap/mixins/_backdrop.scss create mode 100755 dev/scss/bootstrap/mixins/_banner.scss rename dev/scss/{wvc-theme => bootswatch}/bootstrap-orj/_bootswatch.scss (100%) rename dev/scss/{wvc-theme => bootswatch}/bootstrap-orj/_variables.scss (100%) rename dev/scss/{wvc-theme => bootswatch}/cerulean/_bootswatch.scss (91%) rename dev/scss/{wvc-theme => bootswatch}/cerulean/_variables.scss (90%) rename dev/scss/{wvc-theme => bootswatch}/cosmo/_bootswatch.scss (87%) rename dev/scss/{wvc-theme => bootswatch}/cosmo/_variables.scss (89%) rename dev/scss/{wvc-theme => bootswatch}/cyborg/_bootswatch.scss (95%) rename dev/scss/{wvc-theme => bootswatch}/cyborg/_variables.scss (98%) rename dev/scss/{wvc-theme => bootswatch}/darkly/_bootswatch.scss (92%) rename dev/scss/{wvc-theme => bootswatch}/darkly/_variables.scss (96%) rename dev/scss/{wvc-theme => bootswatch}/flatly/_bootswatch.scss (74%) rename dev/scss/{wvc-theme => bootswatch}/flatly/_variables.scss (95%) rename dev/scss/{wvc-theme => bootswatch}/journal/_bootswatch.scss (93%) rename dev/scss/{wvc-theme => bootswatch}/journal/_variables.scss (88%) rename dev/scss/{wvc-theme => bootswatch}/litera/_bootswatch.scss (95%) rename dev/scss/{wvc-theme => bootswatch}/litera/_variables.scss (93%) rename dev/scss/{wvc-theme => bootswatch}/lumen/_bootswatch.scss (90%) rename dev/scss/{wvc-theme => bootswatch}/lumen/_variables.scss (97%) rename dev/scss/{wvc-theme => bootswatch}/lux/_bootswatch.scss (91%) rename dev/scss/{wvc-theme => bootswatch}/lux/_variables.scss (79%) rename dev/scss/{wvc-theme => bootswatch}/materia/_bootswatch.scss (78%) rename dev/scss/{wvc-theme => bootswatch}/materia/_variables.scss (89%) rename dev/scss/{wvc-theme => bootswatch}/minty/_bootswatch.scss (97%) rename dev/scss/{wvc-theme => bootswatch}/minty/_variables.scss (96%) rename dev/scss/{wvc-theme => bootswatch}/morph/_bootswatch.scss (99%) rename dev/scss/{wvc-theme => bootswatch}/morph/_variables.scss (95%) rename dev/scss/{wvc-theme => bootswatch}/pulse/_bootswatch.scss (96%) rename dev/scss/{wvc-theme => bootswatch}/pulse/_variables.scss (87%) rename dev/scss/{wvc-theme => bootswatch}/quartz/_bootswatch.scss (88%) rename dev/scss/{wvc-theme => bootswatch}/quartz/_variables.scss (91%) rename dev/scss/{wvc-theme => bootswatch}/sandstone/_bootswatch.scss (83%) rename dev/scss/{wvc-theme => bootswatch}/sandstone/_variables.scss (98%) rename dev/scss/{wvc-theme => bootswatch}/simplex/_bootswatch.scss (97%) rename dev/scss/{wvc-theme => bootswatch}/simplex/_variables.scss (97%) rename dev/scss/{wvc-theme => bootswatch}/sketchy/_bootswatch.scss (96%) rename dev/scss/{wvc-theme => bootswatch}/sketchy/_variables.scss (96%) rename dev/scss/{wvc-theme => bootswatch}/slate/_bootswatch.scss (98%) rename dev/scss/{wvc-theme => bootswatch}/slate/_variables.scss (94%) rename dev/scss/{wvc-theme => bootswatch}/solar/_bootswatch.scss (93%) rename dev/scss/{wvc-theme => bootswatch}/solar/_variables.scss (97%) rename dev/scss/{wvc-theme => bootswatch}/spacelab/_bootswatch.scss (92%) rename dev/scss/{wvc-theme => bootswatch}/spacelab/_variables.scss (89%) rename dev/scss/{wvc-theme => bootswatch}/superhero/_bootswatch.scss (95%) rename dev/scss/{wvc-theme => bootswatch}/superhero/_variables.scss (98%) rename dev/scss/{wvc-theme => bootswatch}/united/_bootswatch.scss (79%) rename dev/scss/{wvc-theme => bootswatch}/united/_variables.scss (85%) rename dev/scss/{wvc-theme => bootswatch}/vapor/_bootswatch.scss (97%) rename dev/scss/{wvc-theme => bootswatch}/vapor/_variables.scss (92%) rename dev/scss/{wvc-theme => bootswatch}/yeti/_bootswatch.scss (91%) rename dev/scss/{wvc-theme => bootswatch}/yeti/_variables.scss (97%) rename dev/scss/{wvc-theme => bootswatch}/zephyr/_bootswatch.scss (90%) rename dev/scss/{wvc-theme => bootswatch}/zephyr/_variables.scss (83%) create mode 100755 dev/scss/wvc-themes/bootstrap-orj/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/bootstrap-orj/_variables.scss create mode 100755 dev/scss/wvc-themes/cerulean/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/cerulean/_variables.scss create mode 100755 dev/scss/wvc-themes/cosmo/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/cosmo/_variables.scss create mode 100755 dev/scss/wvc-themes/cyborg/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/cyborg/_variables.scss create mode 100755 dev/scss/wvc-themes/darkly/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/darkly/_variables.scss create mode 100755 dev/scss/wvc-themes/flatly/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/flatly/_variables.scss create mode 100755 dev/scss/wvc-themes/journal/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/journal/_variables.scss create mode 100755 dev/scss/wvc-themes/litera/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/litera/_variables.scss create mode 100755 dev/scss/wvc-themes/lumen/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/lumen/_variables.scss create mode 100755 dev/scss/wvc-themes/lux/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/lux/_variables.scss create mode 100755 dev/scss/wvc-themes/materia/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/materia/_variables.scss create mode 100755 dev/scss/wvc-themes/minty/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/minty/_variables.scss create mode 100755 dev/scss/wvc-themes/morph/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/morph/_variables.scss create mode 100755 dev/scss/wvc-themes/pulse/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/pulse/_variables.scss create mode 100755 dev/scss/wvc-themes/quartz/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/quartz/_variables.scss create mode 100755 dev/scss/wvc-themes/sandstone/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/sandstone/_variables.scss create mode 100755 dev/scss/wvc-themes/simplex/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/simplex/_variables.scss create mode 100755 dev/scss/wvc-themes/sketchy/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/sketchy/_variables.scss create mode 100755 dev/scss/wvc-themes/slate/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/slate/_variables.scss create mode 100755 dev/scss/wvc-themes/solar/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/solar/_variables.scss create mode 100755 dev/scss/wvc-themes/spacelab/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/spacelab/_variables.scss create mode 100755 dev/scss/wvc-themes/superhero/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/superhero/_variables.scss create mode 100755 dev/scss/wvc-themes/united/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/united/_variables.scss create mode 100755 dev/scss/wvc-themes/vapor/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/vapor/_variables.scss create mode 100755 dev/scss/wvc-themes/yeti/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/yeti/_variables.scss create mode 100755 dev/scss/wvc-themes/zephyr/_bootswatch.scss create mode 100755 dev/scss/wvc-themes/zephyr/_variables.scss diff --git a/appsettings/views.py b/appsettings/views.py index 70b6490..3359cb8 100644 --- a/appsettings/views.py +++ b/appsettings/views.py @@ -21,7 +21,7 @@ def appsettings(request): sass_dir = AppSettings.objects.get(key="SASS_DIR") bootstrap_theme = AppSettings.objects.get(key="BOOTSTRAP_THEME") try: - themes_list = os.listdir(sass_dir.value + "/wvc-theme") + themes_list = os.listdir(sass_dir.value + "/wvc-themes") except FileNotFoundError as err: messages.error(request, err) addlogmsg(request.user.username, "-", "", err) @@ -50,11 +50,11 @@ def appsettings(request): if "BOOTSTRAP_THEME" in request.POST: 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-overrides.scss';" scss_bootswatch = ( - f"@import '{sass_dir.value}/wvc-theme/{theme}/bootswatch';" + f"@import '{sass_dir.value}/wvc-themes/{theme}/bootswatch';" ) try: diff --git a/dev/scss/bootstrap-overrides.scss b/dev/scss/bootstrap-overrides.scss index adba210..a5ad147 100644 --- a/dev/scss/bootstrap-overrides.scss +++ b/dev/scss/bootstrap-overrides.scss @@ -1,7 +1,7 @@ /*! - * Bootstrap v5.0.2 (https://getbootstrap.com/) - * Copyright 2011-2021 The Bootstrap Authors - * Copyright 2011-2021 Twitter, Inc. + * Bootstrap 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) */ @@ -9,54 +9,60 @@ /*! - * Bootstrap v5.0.2 (https://getbootstrap.com/) - * Copyright 2011-2021 The Bootstrap Authors - * Copyright 2011-2021 Twitter, Inc. + * Bootstrap 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) */ -// scss-docs-start import-stack -// Configuration -@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 -@import "bootstrap/helpers"; - -// Utilities -@import "bootstrap/utilities/api"; -// scss-docs-end import-stack + @import "bootstrap/mixins/banner"; + @include bsBanner(""); + + + // scss-docs-start import-stack + // Configuration + @import "bootstrap/functions"; + @import "bootstrap/variables"; + @import "bootstrap/maps"; + @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"; + @import "bootstrap/placeholders"; + + // Helpers + @import "bootstrap/helpers"; + + // Utilities + @import "bootstrap/utilities/api"; + // scss-docs-end import-stack \ No newline at end of file diff --git a/dev/scss/bootstrap/_accordion.scss b/dev/scss/bootstrap/_accordion.scss index fc62ceb..f09601b 100755 --- a/dev/scss/bootstrap/_accordion.scss +++ b/dev/scss/bootstrap/_accordion.scss @@ -2,43 +2,70 @@ // Base styles // +.accordion { + // scss-docs-start accordion-css-vars + --#{$prefix}accordion-color: #{$accordion-color}; + --#{$prefix}accordion-bg: #{$accordion-bg}; + --#{$prefix}accordion-transition: #{$accordion-transition}; + --#{$prefix}accordion-border-color: #{$accordion-border-color}; + --#{$prefix}accordion-border-width: #{$accordion-border-width}; + --#{$prefix}accordion-border-radius: #{$accordion-border-radius}; + --#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius}; + --#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x}; + --#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y}; + --#{$prefix}accordion-btn-color: #{$accordion-button-color}; + --#{$prefix}accordion-btn-bg: #{$accordion-button-bg}; + --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)}; + --#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width}; + --#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform}; + --#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition}; + --#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)}; + --#{$prefix}accordion-btn-focus-border-color: #{$accordion-button-focus-border-color}; + --#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow}; + --#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x}; + --#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y}; + --#{$prefix}accordion-active-color: #{$accordion-button-active-color}; + --#{$prefix}accordion-active-bg: #{$accordion-button-active-bg}; + // scss-docs-end accordion-css-vars +} + .accordion-button { position: relative; display: flex; align-items: center; width: 100%; - padding: $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); - color: $accordion-button-color; + color: var(--#{$prefix}accordion-btn-color); text-align: left; // Reset button style - background-color: $accordion-button-bg; + background-color: var(--#{$prefix}accordion-btn-bg); border: 0; @include border-radius(0); overflow-anchor: none; - @include transition($accordion-transition); + @include transition(var(--#{$prefix}accordion-transition)); &:not(.collapsed) { - color: $accordion-button-active-color; - background-color: $accordion-button-active-bg; - box-shadow: inset 0 ($accordion-border-width * -1) 0 $accordion-border-color; + color: var(--#{$prefix}accordion-active-color); + background-color: var(--#{$prefix}accordion-active-bg); + box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list &::after { - background-image: escape-svg($accordion-button-active-icon); - transform: $accordion-icon-transform; + background-image: var(--#{$prefix}accordion-btn-active-icon); + transform: var(--#{$prefix}accordion-btn-icon-transform); } } // Accordion icon &::after { flex-shrink: 0; - width: $accordion-icon-width; - height: $accordion-icon-width; + width: var(--#{$prefix}accordion-btn-icon-width); + height: var(--#{$prefix}accordion-btn-icon-width); margin-left: auto; content: ""; - background-image: escape-svg($accordion-button-icon); + background-image: var(--#{$prefix}accordion-btn-icon); background-repeat: no-repeat; - background-size: $accordion-icon-width; - @include transition($accordion-icon-transition); + background-size: var(--#{$prefix}accordion-btn-icon-width); + @include transition(var(--#{$prefix}accordion-btn-icon-transition)); } &:hover { @@ -47,9 +74,9 @@ &:focus { z-index: 3; - border-color: $accordion-button-focus-border-color; + border-color: var(--#{$prefix}accordion-btn-focus-border-color); outline: 0; - box-shadow: $accordion-button-focus-box-shadow; + box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow); } } @@ -58,14 +85,15 @@ } .accordion-item { - background-color: $accordion-bg; - border: $accordion-border-width solid $accordion-border-color; + color: var(--#{$prefix}accordion-color); + background-color: var(--#{$prefix}accordion-bg); + border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color); &:first-of-type { - @include border-top-radius($accordion-border-radius); + @include border-top-radius(var(--#{$prefix}accordion-border-radius)); .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 &:last-of-type { - @include border-bottom-radius($accordion-border-radius); + @include border-bottom-radius(var(--#{$prefix}accordion-border-radius)); .accordion-button { &.collapsed { - @include border-bottom-radius($accordion-inner-border-radius); + @include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius)); } } .accordion-collapse { - @include border-bottom-radius($accordion-border-radius); + @include border-bottom-radius(var(--#{$prefix}accordion-border-radius)); } } } .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; } .accordion-button { - @include border-radius(0); + &, + &.collapsed { + @include border-radius(0); + } } } } diff --git a/dev/scss/bootstrap/_alert.scss b/dev/scss/bootstrap/_alert.scss index 34f1e84..c8bc91b 100755 --- a/dev/scss/bootstrap/_alert.scss +++ b/dev/scss/bootstrap/_alert.scss @@ -3,11 +3,24 @@ // .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; - padding: $alert-padding-y $alert-padding-x; - margin-bottom: $alert-margin-bottom; - border: $alert-border-width solid transparent; - @include border-radius($alert-border-radius); + padding: var(--#{$prefix}alert-padding-y) var(--#{$prefix}alert-padding-x); + margin-bottom: var(--#{$prefix}alert-margin-bottom); + color: var(--#{$prefix}alert-color); + background-color: var(--#{$prefix}alert-bg); + border: var(--#{$prefix}alert-border); + @include border-radius(var(--#{$prefix}alert-border-radius)); } // Headings for larger alerts @@ -47,6 +60,7 @@ $alert-background: shift-color($value, $alert-bg-scale); $alert-border: shift-color($value, $alert-border-scale); $alert-color: shift-color($value, $alert-color-scale); + @if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) { $alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale)); } diff --git a/dev/scss/bootstrap/_badge.scss b/dev/scss/bootstrap/_badge.scss index 08df1b8..cc3d269 100755 --- a/dev/scss/bootstrap/_badge.scss +++ b/dev/scss/bootstrap/_badge.scss @@ -4,16 +4,25 @@ // `background-color`. .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; - padding: $badge-padding-y $badge-padding-x; - @include font-size($badge-font-size); - font-weight: $badge-font-weight; + padding: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x); + @include font-size(var(--#{$prefix}badge-font-size)); + font-weight: var(--#{$prefix}badge-font-weight); line-height: 1; - color: $badge-color; + color: var(--#{$prefix}badge-color); text-align: center; white-space: nowrap; vertical-align: baseline; - @include border-radius($badge-border-radius); + @include border-radius(var(--#{$prefix}badge-border-radius)); @include gradient-bg(); // Empty badges collapse automatically diff --git a/dev/scss/bootstrap/_breadcrumb.scss b/dev/scss/bootstrap/_breadcrumb.scss index f7fafe7..b8252ff 100755 --- a/dev/scss/bootstrap/_breadcrumb.scss +++ b/dev/scss/bootstrap/_breadcrumb.scss @@ -1,28 +1,40 @@ .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; flex-wrap: wrap; - padding: $breadcrumb-padding-y $breadcrumb-padding-x; - margin-bottom: $breadcrumb-margin-bottom; - @include font-size($breadcrumb-font-size); + padding: var(--#{$prefix}breadcrumb-padding-y) var(--#{$prefix}breadcrumb-padding-x); + margin-bottom: var(--#{$prefix}breadcrumb-margin-bottom); + @include font-size(var(--#{$prefix}breadcrumb-font-size)); list-style: none; - background-color: $breadcrumb-bg; - @include border-radius($breadcrumb-border-radius); + background-color: var(--#{$prefix}breadcrumb-bg); + @include border-radius(var(--#{$prefix}breadcrumb-border-radius)); } .breadcrumb-item { // The separator between breadcrumbs (by default, a forward-slash: "/") + .breadcrumb-item { - padding-left: $breadcrumb-item-padding-x; + padding-left: var(--#{$prefix}breadcrumb-item-padding-x); &::before { float: left; // Suppress inline spacings and underlining of the separator - padding-right: $breadcrumb-item-padding-x; - color: $breadcrumb-divider-color; - content: var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"}; + padding-right: var(--#{$prefix}breadcrumb-item-padding-x); + color: var(--#{$prefix}breadcrumb-divider-color); + content: var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"}; } } &.active { - color: $breadcrumb-active-color; + color: var(--#{$prefix}breadcrumb-item-active-color); } } diff --git a/dev/scss/bootstrap/_button-group.scss b/dev/scss/bootstrap/_button-group.scss index 13aa056..79b100c 100755 --- a/dev/scss/bootstrap/_button-group.scss +++ b/dev/scss/bootstrap/_button-group.scss @@ -34,14 +34,17 @@ } .btn-group { + @include border-radius($btn-border-radius); + // 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) { margin-left: -$btn-border-width; } // Reset rounded corners > .btn:not(:last-child):not(.dropdown-toggle), + > .btn.dropdown-toggle-split:first-child, > .btn-group:not(:last-child) > .btn { @include border-end-radius(0); } diff --git a/dev/scss/bootstrap/_buttons.scss b/dev/scss/bootstrap/_buttons.scss index ee4287c..f2c4c13 100755 --- a/dev/scss/bootstrap/_buttons.scss +++ b/dev/scss/bootstrap/_buttons.scss @@ -3,49 +3,112 @@ // .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; - font-family: $btn-font-family; - font-weight: $btn-font-weight; - line-height: $btn-line-height; - color: $body-color; + padding: var(--#{$prefix}btn-padding-y) var(--#{$prefix}btn-padding-x); + font-family: var(--#{$prefix}btn-font-family); + @include font-size(var(--#{$prefix}btn-font-size)); + font-weight: var(--#{$prefix}btn-font-weight); + line-height: var(--#{$prefix}btn-line-height); + color: var(--#{$prefix}btn-color); text-align: center; text-decoration: if($link-decoration == none, null, none); white-space: $btn-white-space; vertical-align: middle; cursor: if($enable-button-pointers, pointer, null); user-select: none; - background-color: transparent; - border: $btn-border-width solid transparent; - @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-border-radius); + border: var(--#{$prefix}btn-border-width) solid var(--#{$prefix}btn-border-color); + @include border-radius(var(--#{$prefix}btn-border-radius)); + @include gradient-bg(var(--#{$prefix}btn-bg)); + @include box-shadow(var(--#{$prefix}btn-box-shadow)); @include transition($btn-transition); &:hover { - color: $body-color; + color: var(--#{$prefix}btn-hover-color); 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 + &, - &:focus { + .btn-check + &:hover { + // 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; - 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:active + &, - &:active, - &.active { - @include box-shadow($btn-active-box-shadow); + :not(.btn-check) + &:active, + &:first-child:active, + &.active, + &.show { + color: var(--#{$prefix}btn-active-color); + background-color: var(--#{$prefix}btn-active-bg); + // Remove CSS gradients if they're enabled + background-image: if($enable-gradients, none, null); + border-color: var(--#{$prefix}btn-active-border-color); + @include box-shadow(var(--#{$prefix}btn-active-shadow)); - &:focus { - @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow); + &:focus-visible { + // Avoid using mixin so we can pass custom focus shadow properly + @if $enable-shadows { + box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow); + } @else { + box-shadow: var(--#{$prefix}btn-focus-box-shadow); + } } } &:disabled, &.disabled, fieldset:disabled & { + color: var(--#{$prefix}btn-disabled-color); 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); } } @@ -58,7 +121,27 @@ // scss-docs-start btn-variant-loops @each $color, $value in $theme-colors { .btn-#{$color} { - @include button-variant($value, $value); + @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); + } } } @@ -76,22 +159,35 @@ // Make a button look and behave like a link .btn-link { - font-weight: $font-weight-normal; - color: $btn-link-color; + --#{$prefix}btn-font-weight: #{$font-weight-normal}; + --#{$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; + @if $enable-gradients { + background-image: none; + } + + &:hover, + &:focus-visible { + text-decoration: $link-hover-decoration; + } + + &:focus-visible { + color: var(--#{$prefix}btn-color); + } &:hover { - color: $btn-link-hover-color; - text-decoration: $link-hover-decoration; - } - - &:focus { - text-decoration: $link-hover-decoration; - } - - &:disabled, - &.disabled { - color: $btn-link-disabled-color; + color: var(--#{$prefix}btn-hover-color); } // No need for an active state here diff --git a/dev/scss/bootstrap/_card.scss b/dev/scss/bootstrap/_card.scss index b077858..ce8c02f 100755 --- a/dev/scss/bootstrap/_card.scss +++ b/dev/scss/bootstrap/_card.scss @@ -3,16 +3,37 @@ // .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; display: flex; flex-direction: column; 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; - background-color: $card-bg; + background-color: var(--#{$prefix}card-bg); background-clip: border-box; - border: $card-border-width solid $card-border-color; - @include border-radius($card-border-radius); + border: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color); + @include border-radius(var(--#{$prefix}card-border-radius)); + @include box-shadow(var(--#{$prefix}card-box-shadow)); > hr { margin-right: 0; @@ -25,12 +46,12 @@ &:first-child { border-top-width: 0; - @include border-top-radius($card-inner-border-radius); + @include border-top-radius(var(--#{$prefix}card-inner-border-radius)); } &:last-child { 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 // as much space as possible, ensuring footers are aligned to the bottom. flex: 1 1 auto; - padding: $card-spacer-y $card-spacer-x; - color: $card-color; + padding: var(--#{$prefix}card-spacer-y) var(--#{$prefix}card-spacer-x); + color: var(--#{$prefix}card-color); } .card-title { - margin-bottom: $card-title-spacer-y; + margin-bottom: var(--#{$prefix}card-title-spacer-y); } .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; } @@ -65,11 +86,11 @@ .card-link { &:hover { - text-decoration: none; + text-decoration: if($link-hover-decoration == underline, none, null); } + .card-link { - margin-left: $card-spacer-x; + margin-left: var(--#{$prefix}card-spacer-x); } } @@ -78,25 +99,25 @@ // .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 - color: $card-cap-color; - background-color: $card-cap-bg; - border-bottom: $card-border-width solid $card-border-color; + color: var(--#{$prefix}card-cap-color); + background-color: var(--#{$prefix}card-cap-bg); + border-bottom: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color); &: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 { - padding: $card-cap-padding-y $card-cap-padding-x; - color: $card-cap-color; - background-color: $card-cap-bg; - border-top: $card-border-width solid $card-border-color; + padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x); + color: var(--#{$prefix}card-cap-color); + background-color: var(--#{$prefix}card-cap-bg); + border-top: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color); &: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 { - margin-right: -$card-cap-padding-x * .5; - margin-bottom: -$card-cap-padding-y; - margin-left: -$card-cap-padding-x * .5; + margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list + margin-bottom: calc(-1 * var(--#{$prefix}card-cap-padding-y)); // stylelint-disable-line function-disallowed-list + margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list border-bottom: 0; - @if $nav-tabs-link-active-bg != $card-bg { - .nav-link.active { - background-color: $card-bg; - border-bottom-color: $card-bg; - } + .nav-link.active { + background-color: var(--#{$prefix}card-bg); + border-bottom-color: var(--#{$prefix}card-bg); } } .card-header-pills { - margin-right: -$card-cap-padding-x * .5; - margin-left: -$card-cap-padding-x * .5; + margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list + margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list } // Card image @@ -131,8 +150,8 @@ right: 0; bottom: 0; left: 0; - padding: $card-img-overlay-padding; - @include border-radius($card-inner-border-radius); + padding: var(--#{$prefix}card-img-overlay-padding); + @include border-radius(var(--#{$prefix}card-inner-border-radius)); } .card-img, @@ -143,12 +162,12 @@ .card-img, .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-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` // to display properly. > .card { - margin-bottom: $card-group-margin; + margin-bottom: var(--#{$prefix}card-group-margin); } @include media-breakpoint-up(sm) { diff --git a/dev/scss/bootstrap/_close.scss b/dev/scss/bootstrap/_close.scss index 32a0f68..a0813de 100755 --- a/dev/scss/bootstrap/_close.scss +++ b/dev/scss/bootstrap/_close.scss @@ -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. // If you want the anchor version, it requires `href="#"`. // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile diff --git a/dev/scss/bootstrap/_containers.scss b/dev/scss/bootstrap/_containers.scss index f88f1e5..83b3138 100755 --- a/dev/scss/bootstrap/_containers.scss +++ b/dev/scss/bootstrap/_containers.scss @@ -2,7 +2,7 @@ // // 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 .container, // 100% wide container at all breakpoints diff --git a/dev/scss/bootstrap/_dropdown.scss b/dev/scss/bootstrap/_dropdown.scss index adc1143..8899d25 100755 --- a/dev/scss/bootstrap/_dropdown.scss +++ b/dev/scss/bootstrap/_dropdown.scss @@ -2,7 +2,9 @@ .dropup, .dropend, .dropdown, -.dropstart { +.dropstart, +.dropup-center, +.dropdown-center { position: relative; } @@ -15,26 +17,67 @@ // The 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; - z-index: $zindex-dropdown; + z-index: var(--#{$prefix}dropdown-zindex); display: none; // none by default, but block on "open" of the menu - min-width: $dropdown-min-width; - padding: $dropdown-padding-y $dropdown-padding-x; + min-width: var(--#{$prefix}dropdown-min-width); + padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x); margin: 0; // Override default margin of ul - @include font-size($dropdown-font-size); - color: $dropdown-color; + @include font-size(var(--#{$prefix}dropdown-font-size)); + color: var(--#{$prefix}dropdown-color); text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) list-style: none; - background-color: $dropdown-bg; + background-color: var(--#{$prefix}dropdown-bg); background-clip: padding-box; - border: $dropdown-border-width solid $dropdown-border-color; - @include border-radius($dropdown-border-radius); - @include box-shadow($dropdown-box-shadow); + border: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-border-color); + @include border-radius(var(--#{$prefix}dropdown-border-radius)); + @include box-shadow(var(--#{$prefix}dropdown-box-shadow)); &[data-bs-popper] { top: 100%; 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; bottom: 100%; margin-top: 0; - margin-bottom: $dropdown-spacer; + margin-bottom: var(--#{$prefix}dropdown-spacer); } .dropdown-toggle { @@ -88,7 +131,7 @@ right: auto; left: 100%; margin-top: 0; - margin-left: $dropdown-spacer; + margin-left: var(--#{$prefix}dropdown-spacer); } .dropdown-toggle { @@ -105,7 +148,7 @@ right: 100%; left: auto; margin-top: 0; - margin-right: $dropdown-spacer; + margin-right: var(--#{$prefix}dropdown-spacer); } .dropdown-toggle { @@ -120,9 +163,10 @@ // Dividers (basically an `
`) within the dropdown .dropdown-divider { height: 0; - margin: $dropdown-divider-margin-y 0; + margin: var(--#{$prefix}dropdown-divider-margin-y) 0; 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
element } // Links, buttons, and more within the dropdown menu @@ -131,45 +175,33 @@ .dropdown-item { display: block; width: 100%; // For `