From c53312d5e718d888fba767d94386fb1c59b1f38b Mon Sep 17 00:00:00 2001 From: "louismaxime.piton" Date: Fri, 20 May 2022 12:28:32 +0200 Subject: [PATCH 1/3] Something to try about `!important` in color-bg helper --- scss/helpers/_color-bg.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scss/helpers/_color-bg.scss b/scss/helpers/_color-bg.scss index 80ba863034a8..b5ce7709c178 100644 --- a/scss/helpers/_color-bg.scss +++ b/scss/helpers/_color-bg.scss @@ -1,10 +1,10 @@ -// stylelint-disable declaration-no-important, function-name-case +// 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) !important; - background-color: RGBA($color-rgb, var(--#{$prefix}bg-opacity, 1)) !important; + 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); } } From 075c357a8898788f9cc43ac3e1423503fecfe927 Mon Sep 17 00:00:00 2001 From: "louismaxime.piton" Date: Fri, 20 May 2022 14:10:22 +0200 Subject: [PATCH 2/3] Better understanding border utility `.border-*-0` --- site/assets/scss/_component-examples.scss | 6 ------ site/content/docs/5.2/utilities/borders.md | 12 ++++++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/site/assets/scss/_component-examples.scss b/site/assets/scss/_component-examples.scss index 52b67543a8ba..b1a2f9b32255 100644 --- a/site/assets/scss/_component-examples.scss +++ b/site/assets/scss/_component-examples.scss @@ -257,12 +257,6 @@ } } -.bd-example-border-utils-0 { - [class^="border"] { - border: var(--#{$prefix}border-width) solid var(--#{$prefix}border-color); - } -} - .bd-example-rounded-utils { [class*="rounded"] { margin: .25rem; diff --git a/site/content/docs/5.2/utilities/borders.md b/site/content/docs/5.2/utilities/borders.md index 0cf9a7454660..64913bbc915e 100644 --- a/site/content/docs/5.2/utilities/borders.md +++ b/site/content/docs/5.2/utilities/borders.md @@ -26,12 +26,12 @@ Add borders to custom elements: Or remove borders: -{{< example class="bd-example-border-utils bd-example-border-utils-0" >}} - - - - - +{{< example class="bd-example-border-utils" >}} + + + + + {{< /example >}} ## Color From 9692da6ae9ce34cf236cfefff070b1b77ea1e3af Mon Sep 17 00:00:00 2001 From: "louismaxime.piton" Date: Fri, 20 May 2022 15:03:20 +0200 Subject: [PATCH 3/3] Having rounded numbers of px --- site/assets/scss/_component-examples.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/assets/scss/_component-examples.scss b/site/assets/scss/_component-examples.scss index b1a2f9b32255..6f325689462e 100644 --- a/site/assets/scss/_component-examples.scss +++ b/site/assets/scss/_component-examples.scss @@ -319,8 +319,8 @@ pre { padding: 0; - margin-top: .65rem; - margin-bottom: .65rem; + margin-top: .625rem; + margin-bottom: .625rem; white-space: pre; background-color: transparent; border: 0;