1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-28 15:50:01 +02:00

Iterate on border utilities (#36239)

* Remove `--bs-border-opacity: 1` from `.border-*` utilities

We set `--bs-border-opacity: 1` globally at the `:root` level, so redeclaring it on every `.border-*` utility doesn't make much sense. I think we can drop this.

* Remove global border-opacity var, restore on .border-color classes, move .border-color utils down the list to fix some specificity issues

* Add some demos of border utils to the docs
This commit is contained in:
Mark Otto
2022-05-05 21:32:02 -07:00
committed by GitHub
parent 5d9500bdfd
commit bca99232b8
3 changed files with 33 additions and 19 deletions

View File

@@ -57,7 +57,6 @@
--#{$prefix}border-style: #{$border-style};
--#{$prefix}border-color: #{$border-color};
--#{$prefix}border-color-translucent: #{$border-color-translucent};
--#{$prefix}border-opacity: 1;
--#{$prefix}border-radius: #{$border-radius};
--#{$prefix}border-radius-sm: #{$border-radius-sm};

View File

@@ -98,25 +98,11 @@ $utilities: map-merge(
// scss-docs-start utils-borders
"border": (
property: border,
local-vars: (
"border-opacity": 1
),
values: (
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0,
)
),
"border-opacity": (
css-var: true,
class: border-opacity,
values: (
10: .1,
25: .25,
50: .5,
75: .75,
100: 1
)
),
"border-top": (
property: border-top,
values: (
@@ -150,6 +136,9 @@ $utilities: map-merge(
"border-color": (
property: border-color,
class: border,
local-vars: (
"border-opacity": 1
),
values: $utilities-border-colors
),
"border-width": (
@@ -158,6 +147,17 @@ $utilities: map-merge(
class: border,
values: $border-widths
),
"border-opacity": (
css-var: true,
class: border-opacity,
values: (
10: .1,
25: .25,
50: .5,
75: .75,
100: 1
)
),
// scss-docs-end utils-borders
// Sizing utilities
// scss-docs-start utils-sizing