Skip to content

Commit 8e5cf48

Browse files
committed
updated Bootstrap
1 parent 0616abd commit 8e5cf48

30 files changed

+248
-226
lines changed

_sass/bootstrap/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2011-2024 The Bootstrap Authors
3+
Copyright (c) 2011-2025 The Bootstrap Authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

_sass/bootstrap/scss/_accordion.scss

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,12 @@
134134
&:last-child { border-bottom: 0; }
135135

136136
// stylelint-disable selector-max-class
137-
> .accordion-header .accordion-button {
138-
&,
139-
&.collapsed {
140-
@include border-radius(0);
141-
}
142-
}
143-
// stylelint-enable selector-max-class
144-
145-
> .accordion-collapse {
137+
> .accordion-collapse,
138+
> .accordion-header .accordion-button,
139+
> .accordion-header .accordion-button.collapsed {
146140
@include border-radius(0);
147141
}
142+
// stylelint-enable selector-max-class
148143
}
149144
}
150145

_sass/bootstrap/scss/_button-group.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
// Prevent double borders when buttons are next to each other
4040
> :not(.btn-check:first-child) + .btn,
4141
> .btn-group:not(:first-child) {
42-
margin-left: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
42+
margin-left: calc(-1 * #{$btn-border-width}); // stylelint-disable-line function-disallowed-list
4343
}
4444

4545
// Reset rounded corners
@@ -126,7 +126,7 @@
126126

127127
> .btn:not(:first-child),
128128
> .btn-group:not(:first-child) {
129-
margin-top: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
129+
margin-top: calc(-1 * #{$btn-border-width}); // stylelint-disable-line function-disallowed-list
130130
}
131131

132132
// Reset rounded corners
@@ -135,7 +135,12 @@
135135
@include border-bottom-radius(0);
136136
}
137137

138-
> .btn ~ .btn,
138+
// The top radius should be 0 if the button is:
139+
// - the "third or more" child
140+
// - the second child and the previous element isn't `.btn-check` (making it the first child visually)
141+
// - part of a btn-group which isn't the first child
142+
> .btn:nth-child(n + 3),
143+
> :not(.btn-check) + .btn,
139144
> .btn-group:not(:first-child) > .btn {
140145
@include border-top-radius(0);
141146
}

_sass/bootstrap/scss/_card.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@
193193
// The child selector allows nested `.card` within `.card-group`
194194
// to display properly.
195195
> .card {
196-
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
197-
flex: 1 0 0%;
196+
flex: 1 0 0;
198197
margin-bottom: 0;
199198

200199
+ .card {

_sass/bootstrap/scss/_carousel.scss

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
color: $carousel-control-color;
100100
text-align: center;
101101
background: none;
102+
filter: var(--#{$prefix}carousel-control-icon-filter);
102103
border: 0;
103104
opacity: $carousel-control-opacity;
104105
@include transition($carousel-control-transition);
@@ -168,7 +169,7 @@
168169
margin-left: $carousel-indicator-spacer;
169170
text-indent: -999px;
170171
cursor: pointer;
171-
background-color: $carousel-indicator-active-bg;
172+
background-color: var(--#{$prefix}carousel-indicator-active-bg);
172173
background-clip: padding-box;
173174
border: 0;
174175
// Use transparent borders to increase the hit area by 10px on top and bottom.
@@ -195,42 +196,31 @@
195196
left: (100% - $carousel-caption-width) * .5;
196197
padding-top: $carousel-caption-padding-y;
197198
padding-bottom: $carousel-caption-padding-y;
198-
color: $carousel-caption-color;
199+
color: var(--#{$prefix}carousel-caption-color);
199200
text-align: center;
200201
}
201202

202203
// Dark mode carousel
203204

204205
@mixin carousel-dark() {
205-
.carousel-control-prev-icon,
206-
.carousel-control-next-icon {
207-
filter: $carousel-dark-control-icon-filter;
208-
}
209-
210-
.carousel-indicators [data-bs-target] {
211-
background-color: $carousel-dark-indicator-active-bg;
212-
}
213-
214-
.carousel-caption {
215-
color: $carousel-dark-caption-color;
216-
}
206+
--#{$prefix}carousel-indicator-active-bg: #{$carousel-indicator-active-bg-dark};
207+
--#{$prefix}carousel-caption-color: #{$carousel-caption-color-dark};
208+
--#{$prefix}carousel-control-icon-filter: #{$carousel-control-icon-filter-dark};
217209
}
218210

219211
.carousel-dark {
220212
@include carousel-dark();
221213
}
222214

215+
:root,
216+
[data-bs-theme="light"] {
217+
--#{$prefix}carousel-indicator-active-bg: #{$carousel-indicator-active-bg};
218+
--#{$prefix}carousel-caption-color: #{$carousel-caption-color};
219+
--#{$prefix}carousel-control-icon-filter: #{$carousel-control-icon-filter};
220+
}
221+
223222
@if $enable-dark-mode {
224-
@include color-mode(dark) {
225-
@if $color-mode-type == "media-query" {
226-
.carousel {
227-
@include carousel-dark();
228-
}
229-
} @else {
230-
.carousel,
231-
&.carousel {
232-
@include carousel-dark();
233-
}
234-
}
223+
@include color-mode(dark, true) {
224+
@include carousel-dark();
235225
}
236226
}

_sass/bootstrap/scss/_close.scss

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
--#{$prefix}btn-close-focus-shadow: #{$btn-close-focus-shadow};
1313
--#{$prefix}btn-close-focus-opacity: #{$btn-close-focus-opacity};
1414
--#{$prefix}btn-close-disabled-opacity: #{$btn-close-disabled-opacity};
15-
--#{$prefix}btn-close-white-filter: #{$btn-close-white-filter};
1615
// scss-docs-end close-css-vars
1716

1817
box-sizing: content-box;
@@ -21,6 +20,7 @@
2120
padding: $btn-close-padding-y $btn-close-padding-x;
2221
color: var(--#{$prefix}btn-close-color);
2322
background: transparent var(--#{$prefix}btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
23+
filter: var(--#{$prefix}btn-close-filter);
2424
border: 0; // for button elements
2525
@include border-radius();
2626
opacity: var(--#{$prefix}btn-close-opacity);
@@ -47,17 +47,20 @@
4747
}
4848

4949
@mixin btn-close-white() {
50-
filter: var(--#{$prefix}btn-close-white-filter);
50+
--#{$prefix}btn-close-filter: #{$btn-close-filter-dark};
5151
}
5252

5353
.btn-close-white {
5454
@include btn-close-white();
5555
}
5656

57+
:root,
58+
[data-bs-theme="light"] {
59+
--#{$prefix}btn-close-filter: #{$btn-close-filter};
60+
}
61+
5762
@if $enable-dark-mode {
58-
@include color-mode(dark) {
59-
.btn-close {
60-
@include btn-close-white();
61-
}
63+
@include color-mode(dark, true) {
64+
@include btn-close-white();
6265
}
6366
}

_sass/bootstrap/scss/_functions.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
177177
@return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
178178
}
179179

180-
// Return WCAG2.1 relative luminance
180+
// Return WCAG2.2 relative luminance
181181
// See https://www.w3.org/TR/WCAG/#dfn-relative-luminance
182182
// See https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
183183
@function luminance($color) {

_sass/bootstrap/scss/_list-group.scss

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,31 +43,6 @@
4343
}
4444
}
4545

46-
// Interactive list items
47-
//
48-
// Use anchor or button elements instead of `li`s or `div`s to create interactive
49-
// list items. Includes an extra `.active` modifier class for selected items.
50-
51-
.list-group-item-action {
52-
width: 100%; // For `<button>`s (anchors become 100% by default though)
53-
color: var(--#{$prefix}list-group-action-color);
54-
text-align: inherit; // For `<button>`s (anchors inherit)
55-
56-
// Hover state
57-
&:hover,
58-
&:focus {
59-
z-index: 1; // Place hover/focus items above their siblings for proper border styling
60-
color: var(--#{$prefix}list-group-action-hover-color);
61-
text-decoration: none;
62-
background-color: var(--#{$prefix}list-group-action-hover-bg);
63-
}
64-
65-
&:active {
66-
color: var(--#{$prefix}list-group-action-active-color);
67-
background-color: var(--#{$prefix}list-group-action-active-bg);
68-
}
69-
}
70-
7146
// Individual list items
7247
//
7348
// Use on `li`s or `div`s within the `.list-group` parent.
@@ -115,6 +90,33 @@
11590
}
11691
}
11792

93+
// Interactive list items
94+
//
95+
// Use anchor or button elements instead of `li`s or `div`s to create interactive
96+
// list items. Includes an extra `.active` modifier class for selected items.
97+
98+
.list-group-item-action {
99+
width: 100%; // For `<button>`s (anchors become 100% by default though)
100+
color: var(--#{$prefix}list-group-action-color);
101+
text-align: inherit; // For `<button>`s (anchors inherit)
102+
103+
&:not(.active) {
104+
// Hover state
105+
&:hover,
106+
&:focus {
107+
z-index: 1; // Place hover/focus items above their siblings for proper border styling
108+
color: var(--#{$prefix}list-group-action-hover-color);
109+
text-decoration: none;
110+
background-color: var(--#{$prefix}list-group-action-hover-bg);
111+
}
112+
113+
&:active {
114+
color: var(--#{$prefix}list-group-action-active-color);
115+
background-color: var(--#{$prefix}list-group-action-active-bg);
116+
}
117+
}
118+
}
119+
118120
// Horizontal
119121
//
120122
// Change the layout of list group items from vertical (default) to horizontal.

_sass/bootstrap/scss/_modal.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959

6060
// When fading in the modal, animate it to slide down
6161
.modal.fade & {
62-
@include transition($modal-transition);
6362
transform: $modal-fade-transform;
63+
@include transition($modal-transition);
6464
}
6565
.modal.show & {
6666
transform: $modal-show-transform;
@@ -132,7 +132,11 @@
132132

133133
.btn-close {
134134
padding: calc(var(--#{$prefix}modal-header-padding-y) * .5) calc(var(--#{$prefix}modal-header-padding-x) * .5);
135-
margin: calc(-.5 * var(--#{$prefix}modal-header-padding-y)) calc(-.5 * var(--#{$prefix}modal-header-padding-x)) calc(-.5 * var(--#{$prefix}modal-header-padding-y)) auto;
135+
// Split properties to avoid invalid calc() function if value is 0
136+
margin-top: calc(-.5 * var(--#{$prefix}modal-header-padding-y));
137+
margin-right: calc(-.5 * var(--#{$prefix}modal-header-padding-x));
138+
margin-bottom: calc(-.5 * var(--#{$prefix}modal-header-padding-y));
139+
margin-left: auto;
136140
}
137141
}
138142

_sass/bootstrap/scss/_nav.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@
169169
.nav-justified {
170170
> .nav-link,
171171
.nav-item {
172-
flex-basis: 0;
173172
flex-grow: 1;
173+
flex-basis: 0;
174174
text-align: center;
175175
}
176176
}

0 commit comments

Comments
 (0)