Skip to content

Commit d896635

Browse files
committed
Clean up deprecated Sass (#41693)
* Remove all deprecated Sass variables and deprecation notices from docs components * Fix linter error * fix
1 parent 54fc913 commit d896635

File tree

14 files changed

+18
-127
lines changed

14 files changed

+18
-127
lines changed

scss/_reboot.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ kbd {
316316
kbd {
317317
padding: 0;
318318
@include font-size(1em);
319-
font-weight: $nested-kbd-font-weight;
319+
font-weight: inherit; // mdo-do: check if this is needed
320320
}
321321
}
322322

scss/_root.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
--#{$prefix}border-radius-lg: #{$border-radius-lg};
106106
--#{$prefix}border-radius-xl: #{$border-radius-xl};
107107
--#{$prefix}border-radius-xxl: #{$border-radius-xxl};
108-
--#{$prefix}border-radius-2xl: var(--#{$prefix}border-radius-xxl); // Deprecated in v5.3.0 for consistency
109108
--#{$prefix}border-radius-pill: #{$border-radius-pill};
110109
// scss-docs-end root-border-var
111110

scss/_utilities.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,6 @@ $utilities: map-merge(
611611
values: map-merge(
612612
$utilities-text-colors,
613613
(
614-
"muted": var(--#{$prefix}secondary-color), // deprecated
615-
"black-50": rgba($black, .5), // deprecated
616-
"white-50": rgba($white, .5), // deprecated
617614
"body-secondary": var(--#{$prefix}secondary-color),
618615
"body-tertiary": var(--#{$prefix}tertiary-color),
619616
"body-emphasis": var(--#{$prefix}emphasis-color),

scss/_variables-dark.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,14 @@ $accordion-button-active-icon-dark: url("data:image/svg+xml,<svg xmlns='http://
9191
// Carousel
9292
//
9393

94-
$carousel-indicator-active-bg-dark: $carousel-dark-indicator-active-bg !default;
95-
$carousel-caption-color-dark: $carousel-dark-caption-color !default;
96-
$carousel-control-icon-filter-dark: $carousel-dark-control-icon-filter !default;
94+
// scss-docs-start carousel-dark-variables
95+
$carousel-indicator-active-bg-dark: $black !default;
96+
$carousel-caption-color-dark: $black !default;
97+
$carousel-control-icon-filter-dark: invert(1) grayscale(100) !default;
98+
// scss-docs-end carousel-dark-variables
9799

98100
//
99101
// Close button
100102
//
101103

102-
$btn-close-filter-dark: $btn-close-white-filter !default;
104+
$btn-close-filter-dark: invert(1) grayscale(100%) brightness(200%) !default;

scss/_variables.scss

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,6 @@ $border-radius-xl: 1rem !default;
550550
$border-radius-xxl: 2rem !default;
551551
$border-radius-pill: 50rem !default;
552552
// scss-docs-end border-radius-variables
553-
// fusv-disable
554-
$border-radius-2xl: $border-radius-xxl !default; // Deprecated in v5.3.0
555-
// fusv-enable
556553

557554
// scss-docs-start box-shadow-variables
558555
$box-shadow: 0 .5rem 1rem rgba($black, .15) !default;
@@ -680,10 +677,6 @@ $small-font-size: .875em !default;
680677

681678
$sub-sup-font-size: .75em !default;
682679

683-
// fusv-disable
684-
$text-muted: var(--#{$prefix}secondary-color) !default; // Deprecated in 5.3.0
685-
// fusv-enable
686-
687680
$initialism-font-size: $small-font-size !default;
688681

689682
$blockquote-margin-y: $spacer !default;
@@ -694,11 +687,6 @@ $blockquote-footer-font-size: $small-font-size !default;
694687
$hr-margin-y: $spacer !default;
695688
$hr-color: inherit !default;
696689

697-
// fusv-disable
698-
$hr-bg-color: null !default; // Deprecated in v5.2.0
699-
$hr-height: null !default; // Deprecated in v5.2.0
700-
// fusv-enable
701-
702690
$hr-border-color: null !default; // Allows for inherited colors
703691
$hr-border-width: var(--#{$prefix}border-width) !default;
704692
$hr-opacity: .25 !default;
@@ -1263,9 +1251,6 @@ $dropdown-item-padding-x: $spacer !default;
12631251
$dropdown-header-color: $gray-600 !default;
12641252
$dropdown-header-padding-x: $dropdown-item-padding-x !default;
12651253
$dropdown-header-padding-y: $dropdown-padding-y !default;
1266-
// fusv-disable
1267-
$dropdown-header-padding: $dropdown-header-padding-y $dropdown-header-padding-x !default; // Deprecated in v5.2.0
1268-
// fusv-enable
12691254
// scss-docs-end dropdown-variables
12701255

12711256
// scss-docs-start dropdown-dark-variables
@@ -1381,9 +1366,6 @@ $accordion-transition: $btn-transition, border-radius .15s ea
13811366
$accordion-button-active-bg: var(--#{$prefix}primary-bg-subtle) !default;
13821367
$accordion-button-active-color: var(--#{$prefix}primary-text-emphasis) !default;
13831368

1384-
// fusv-disable
1385-
$accordion-button-focus-border-color: $input-focus-border-color !default; // Deprecated in v5.3.3
1386-
// fusv-enable
13871369
$accordion-button-focus-box-shadow: $btn-focus-box-shadow !default;
13881370

13891371
$accordion-icon-width: 1.25rem !default;
@@ -1411,9 +1393,6 @@ $tooltip-margin: null !default; // TODO: remove this in v6
14111393

14121394
$tooltip-arrow-width: .8rem !default;
14131395
$tooltip-arrow-height: .4rem !default;
1414-
// fusv-disable
1415-
$tooltip-arrow-color: null !default; // Deprecated in Bootstrap 5.2.0 for CSS variables
1416-
// fusv-enable
14171396
// scss-docs-end tooltip-variables
14181397

14191398
// Form tooltips must come after regular tooltips
@@ -1453,12 +1432,6 @@ $popover-arrow-width: 1rem !default;
14531432
$popover-arrow-height: .5rem !default;
14541433
// scss-docs-end popover-variables
14551434

1456-
// fusv-disable
1457-
// Deprecated in Bootstrap 5.2.0 for CSS variables
1458-
$popover-arrow-color: $popover-bg !default;
1459-
$popover-arrow-outer-color: var(--#{$prefix}border-color-translucent) !default;
1460-
// fusv-enable
1461-
14621435

14631436
// Toasts
14641437

@@ -1553,11 +1526,6 @@ $alert-border-width: var(--#{$prefix}border-width) !default;
15531526
$alert-dismissible-padding-r: $alert-padding-x * 3 !default; // 3x covers width of x plus default padding on either side
15541527
// scss-docs-end alert-variables
15551528

1556-
// fusv-disable
1557-
$alert-bg-scale: -80% !default; // Deprecated in v5.2.0, to be removed in v6
1558-
$alert-border-scale: -70% !default; // Deprecated in v5.2.0, to be removed in v6
1559-
$alert-color-scale: 40% !default; // Deprecated in v5.2.0, to be removed in v6
1560-
// fusv-enable
15611529

15621530
// Progress bars
15631531

@@ -1585,10 +1553,6 @@ $list-group-border-radius: var(--#{$prefix}border-radius) !default;
15851553

15861554
$list-group-item-padding-y: $spacer * .5 !default;
15871555
$list-group-item-padding-x: $spacer !default;
1588-
// fusv-disable
1589-
$list-group-item-bg-scale: -80% !default; // Deprecated in v5.3.0
1590-
$list-group-item-color-scale: 40% !default; // Deprecated in v5.3.0
1591-
// fusv-enable
15921556

15931557
$list-group-hover-bg: var(--#{$prefix}tertiary-bg) !default;
15941558
$list-group-active-color: $component-active-color !default;
@@ -1675,12 +1639,6 @@ $carousel-transition-duration: .6s !default;
16751639
$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)
16761640
// scss-docs-end carousel-variables
16771641

1678-
// scss-docs-start carousel-dark-variables
1679-
$carousel-dark-indicator-active-bg: $black !default; // Deprecated in v5.3.4
1680-
$carousel-dark-caption-color: $black !default; // Deprecated in v5.3.4
1681-
$carousel-dark-control-icon-filter: invert(1) grayscale(100) !default; // Deprecated in v5.3.4
1682-
// scss-docs-end carousel-dark-variables
1683-
16841642

16851643
// Spinners
16861644

@@ -1712,7 +1670,6 @@ $btn-close-hover-opacity: .75 !default;
17121670
$btn-close-focus-opacity: 1 !default;
17131671
$btn-close-disabled-opacity: .25 !default;
17141672
$btn-close-filter: null !default;
1715-
$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default; // Deprecated in v5.3.4
17161673
// scss-docs-end close-variables
17171674

17181675

@@ -1744,7 +1701,6 @@ $kbd-padding-x: .375rem !default;
17441701
$kbd-font-size: $code-font-size !default;
17451702
$kbd-color: var(--#{$prefix}body-bg) !default;
17461703
$kbd-bg: var(--#{$prefix}body-color) !default;
1747-
$nested-kbd-font-weight: null !default; // Deprecated in v5.2.0, removing in v6
17481704

17491705
$pre-color: null !default;
17501706

site/src/content/docs/components/alerts.mdx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ import { getData } from '@libs/data'
1010

1111
Alerts are available for any length of text, as well as an optional close button. For proper styling, use one of the eight **required** contextual classes (e.g., `.alert-success`). For inline dismissal, use the [alerts JavaScript plugin](#dismissing).
1212

13-
<Callout>
14-
**Heads up!** As of v5.3.0, the `alert-variant()` Sass mixin is deprecated. Alert variants now have their CSS variables overridden in [a Sass loop](#sass-loops).
15-
</Callout>
16-
1713
<Example code={getData('theme-colors').map((themeColor) => `<div class="alert alert-${themeColor.name}" role="alert">
1814
A simple ${themeColor.name} alert—check it out!
1915
</div>`)} />
@@ -136,12 +132,6 @@ As part of Bootstrap’s evolving CSS variables approach, alerts now use local C
136132

137133
<ScssDocs name="alert-variables" file="scss/_variables.scss" />
138134

139-
### Sass mixins
140-
141-
<DeprecatedIn version="5.3.0" />
142-
143-
<ScssDocs name="alert-variant-mixin" file="scss/mixins/_alert.scss" removeIndentation={false} />
144-
145135
### Sass loops
146136

147137
Loop that generates the modifier classes with an overriding of CSS variables.

site/src/content/docs/components/carousel.mdx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,11 @@ Carousels support swiping left/right on touchscreen devices to move between slid
272272
</button>
273273
</div>`} />
274274

275-
## Dark variant
275+
## Dark carousel
276276

277-
<DeprecatedIn version="5.3.0" />
277+
Add `data-bs-theme="dark"` to the `.carousel` for darker controls, indicators, and captions. Controls are inverted compared to their default white fill with the `filter` CSS property. Captions and controls have additional Sass variables that customize the `color` and `background-color`.
278278

279-
Add `.carousel-dark` to the `.carousel` for darker controls, indicators, and captions. Controls are inverted compared to their default white fill with the `filter` CSS property. Captions and controls have additional Sass variables that customize the `color` and `background-color`.
280-
281-
<CalloutDeprecatedDarkVariants component="carousel" />
282-
283-
<Example code={`<div id="carouselExampleDark" class="carousel carousel-dark slide">
279+
<Example code={`<div id="carouselExampleDark" class="carousel slide" data-bs-theme="dark">
284280
<div class="carousel-indicators">
285281
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
286282
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="1" aria-label="Slide 2"></button>
@@ -331,9 +327,9 @@ Variables for all carousels:
331327

332328
<ScssDocs name="carousel-variables" file="scss/_variables.scss" />
333329

334-
Variables for the [dark carousel](#dark-variant):
330+
Variables for the [dark carousel](#dark-carousel):
335331

336-
<ScssDocs name="carousel-dark-variables" file="scss/_variables.scss" />
332+
<ScssDocs name="carousel-dark-variables" file="scss/_variables-dark.scss" />
337333

338334
## Usage
339335

site/src/content/docs/components/close-button.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ Disabled close buttons change their `opacity`. We’ve also applied `pointer-eve
1818

1919
## Dark variant
2020

21-
<DeprecatedIn version="5.3.0" />
22-
23-
<Callout type="warning">
24-
**Heads up!** As of v5.3.0, the `.btn-close-white` class is deprecated. Instead, use `data-bs-theme="dark"` to change the color mode of the close button.
25-
</Callout>
26-
2721
Add `data-bs-theme="dark"` to the `.btn-close`, or to its parent element, to invert the close button. This uses the `filter` property to invert the `background-image` without overriding its value.
2822

2923
<Example class="bg-dark" code={`<div data-bs-theme="dark">

site/src/content/docs/components/dropdowns.mdx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,9 @@ Button dropdowns work with buttons of all sizes, including default and split dro
335335

336336
## Dark dropdowns
337337

338-
<DeprecatedIn version="5.3.0" />
338+
Opt into darker dropdowns to match a dark navbar or custom style by adding `data-bs-theme="dark"` onto an existing `.dropdown-menu`. No changes are required to the dropdown items.
339339

340-
Opt into darker dropdowns to match a dark navbar or custom style by adding `.dropdown-menu-dark` onto an existing `.dropdown-menu`. No changes are required to the dropdown items.
341-
342-
<CalloutDeprecatedDarkVariants component="dropdown-menu" />
343-
344-
<Example code={`<div class="dropdown">
340+
<Example code={`<div class="dropdown" data-bs-theme="dark">
345341
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
346342
Dropdown button
347343
</button>
@@ -364,7 +360,7 @@ And putting it to use in a navbar:
364360
</button>
365361
<div class="collapse navbar-collapse" id="navbarNavDarkDropdown">
366362
<ul class="navbar-nav">
367-
<li class="nav-item dropdown">
363+
<li class="nav-item dropdown" data-bs-theme="dark">
368364
<button class="btn btn-dark dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
369365
Dropdown
370366
</button>

site/src/content/docs/components/list-group.mdx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ Add `.list-group-horizontal` to change the layout of list group items from verti
124124

125125
## Variants
126126

127-
<Callout>
128-
**Heads up!** As of v5.3.0, the `list-group-item-variant()` Sass mixin is deprecated. List group item variants now have their CSS variables overridden in [a Sass loop](#sass-loops).
129-
</Callout>
130-
131127
Use contextual classes to style list items with a stateful background and color.
132128

133129
<Example code={[
@@ -267,12 +263,6 @@ As part of Bootstrap’s evolving CSS variables approach, list groups now use lo
267263

268264
<ScssDocs name="list-group-variables" file="scss/_variables.scss" />
269265

270-
### Sass mixins
271-
272-
<DeprecatedIn version="5.3.0" />
273-
274-
<ScssDocs name="list-group-mixin" file="scss/mixins/_list-group.scss" />
275-
276266
### Sass loops
277267

278268
Loop that generates the modifier classes with an overriding of CSS variables.

0 commit comments

Comments
 (0)