Skip to content

Commit 4de1357

Browse files
authored
chore: add missing bootstrap files (#19922)
1 parent 64f3efa commit 4de1357

18 files changed

+2187
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*!
2+
* Bootstrap v4.6.2 (https://getbootstrap.com/)
3+
* Copyright 2011-2022 The Bootstrap Authors
4+
* Copyright 2011-2022 Twitter, Inc.
5+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6+
*
7+
* DO NOT MODIFY THIS FILE. It preserves compatibility with Bootstrap 4.6 docs.
8+
*/
9+
10+
// Base class
11+
//
12+
// Requires one of the contextual, color modifier classes for `color` and
13+
// `background-color`.
14+
15+
.badge {
16+
display: inline-block;
17+
padding: $badge-padding-y $badge-padding-x;
18+
@include font-size($badge-font-size);
19+
font-weight: $badge-font-weight;
20+
line-height: 1;
21+
text-align: center;
22+
white-space: nowrap;
23+
vertical-align: baseline;
24+
@include border-radius($badge-border-radius);
25+
@include transition($badge-transition);
26+
27+
@at-root a#{&} {
28+
@include hover-focus() {
29+
text-decoration: none;
30+
}
31+
}
32+
33+
// Empty badges collapse automatically
34+
&:empty {
35+
display: none;
36+
}
37+
}
38+
39+
// Quick fix for badges in buttons
40+
.btn .badge {
41+
position: relative;
42+
top: -1px;
43+
}
44+
45+
// Pill badges
46+
//
47+
// Make them extra rounded with a modifier to replace v3's badges.
48+
49+
.badge-pill {
50+
padding-right: $badge-pill-padding-x;
51+
padding-left: $badge-pill-padding-x;
52+
@include border-radius($badge-pill-border-radius);
53+
}
54+
55+
// Colors
56+
//
57+
// Contextual variations (linked badges get darker on :hover).
58+
59+
@each $color, $value in $theme-colors {
60+
.badge-#{$color} {
61+
@include badge-variant($value);
62+
}
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*!
2+
* Bootstrap v4.6.2 (https://getbootstrap.com/)
3+
* Copyright 2011-2022 The Bootstrap Authors
4+
* Copyright 2011-2022 Twitter, Inc.
5+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6+
*
7+
* DO NOT MODIFY THIS FILE. It preserves compatibility with Bootstrap 4.6 docs.
8+
*/
9+
10+
.breadcrumb {
11+
display: flex;
12+
flex-wrap: wrap;
13+
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
14+
margin-bottom: $breadcrumb-margin-bottom;
15+
@include font-size($breadcrumb-font-size);
16+
list-style: none;
17+
background-color: $breadcrumb-bg;
18+
@include border-radius($breadcrumb-border-radius);
19+
}
20+
21+
.breadcrumb-item {
22+
// The separator between breadcrumbs (by default, a forward-slash: "/")
23+
+ .breadcrumb-item {
24+
padding-left: $breadcrumb-item-padding;
25+
26+
&::before {
27+
float: left; // Suppress inline spacings and underlining of the separator
28+
padding-right: $breadcrumb-item-padding;
29+
color: $breadcrumb-divider-color;
30+
content: escape-svg($breadcrumb-divider);
31+
}
32+
}
33+
34+
// IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
35+
// without `<ul>`s. The `::before` pseudo-element generates an element
36+
// *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
37+
//
38+
// To trick IE into suppressing the underline, we give the pseudo-element an
39+
// underline and then immediately remove it.
40+
+ .breadcrumb-item:hover::before {
41+
text-decoration: underline;
42+
}
43+
44+
// stylelint-disable-next-line no-duplicate-selectors
45+
+ .breadcrumb-item:hover::before {
46+
text-decoration: none;
47+
}
48+
49+
&.active {
50+
color: $breadcrumb-active-color;
51+
}
52+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
/*!
2+
* Bootstrap v4.6.2 (https://getbootstrap.com/)
3+
* Copyright 2011-2022 The Bootstrap Authors
4+
* Copyright 2011-2022 Twitter, Inc.
5+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6+
*
7+
* DO NOT MODIFY THIS FILE. It preserves compatibility with Bootstrap 4.6 docs.
8+
*/
9+
10+
// stylelint-disable selector-no-qualifying-type
11+
12+
// Make the div behave like a button
13+
.btn-group,
14+
.btn-group-vertical {
15+
position: relative;
16+
display: inline-flex;
17+
vertical-align: middle; // match .btn alignment given font-size hack above
18+
19+
> .btn {
20+
position: relative;
21+
flex: 1 1 auto;
22+
23+
// Bring the hover, focused, and "active" buttons to the front to overlay
24+
// the borders properly
25+
@include hover() {
26+
z-index: 1;
27+
}
28+
29+
&:focus,
30+
&:active,
31+
&.active {
32+
z-index: 1;
33+
}
34+
}
35+
}
36+
37+
// Optional: Group multiple button groups together for a toolbar
38+
.btn-toolbar {
39+
display: flex;
40+
flex-wrap: wrap;
41+
justify-content: flex-start;
42+
43+
.input-group {
44+
width: auto;
45+
}
46+
}
47+
48+
.btn-group {
49+
// Prevent double borders when buttons are next to each other
50+
> .btn:not(:first-child),
51+
> .btn-group:not(:first-child) {
52+
margin-left: -$btn-border-width;
53+
}
54+
55+
// Reset rounded corners
56+
> .btn:not(:last-child):not(.dropdown-toggle),
57+
> .btn-group:not(:last-child) > .btn {
58+
@include border-right-radius(0);
59+
}
60+
61+
> .btn:not(:first-child),
62+
> .btn-group:not(:first-child) > .btn {
63+
@include border-left-radius(0);
64+
}
65+
}
66+
67+
// Sizing
68+
//
69+
// Remix the default button sizing classes into new ones for easier manipulation.
70+
71+
.btn-group-sm > .btn {
72+
@extend .btn-sm;
73+
}
74+
75+
.btn-group-lg > .btn {
76+
@extend .btn-lg;
77+
}
78+
79+
80+
//
81+
// Split button dropdowns
82+
//
83+
84+
.dropdown-toggle-split {
85+
padding-right: $btn-padding-x * .75;
86+
padding-left: $btn-padding-x * .75;
87+
88+
&::after,
89+
.dropup &::after,
90+
.dropright &::after {
91+
margin-left: 0;
92+
}
93+
94+
.dropleft &::before {
95+
margin-right: 0;
96+
}
97+
}
98+
99+
.btn-sm + .dropdown-toggle-split {
100+
padding-right: $btn-padding-x-sm * .75;
101+
padding-left: $btn-padding-x-sm * .75;
102+
}
103+
104+
.btn-lg + .dropdown-toggle-split {
105+
padding-right: $btn-padding-x-lg * .75;
106+
padding-left: $btn-padding-x-lg * .75;
107+
}
108+
109+
110+
// The clickable button for toggling the menu
111+
// Set the same inset shadow as the :active state
112+
.btn-group.show .dropdown-toggle {
113+
@include box-shadow($btn-active-box-shadow);
114+
115+
// Show no shadow for `.btn-link` since it has no other button styles.
116+
&.btn-link {
117+
@include box-shadow(none);
118+
}
119+
}
120+
121+
122+
//
123+
// Vertical button groups
124+
//
125+
126+
.btn-group-vertical {
127+
flex-direction: column;
128+
align-items: flex-start;
129+
justify-content: center;
130+
131+
> .btn,
132+
> .btn-group {
133+
width: 100%;
134+
}
135+
136+
> .btn:not(:first-child),
137+
> .btn-group:not(:first-child) {
138+
margin-top: -$btn-border-width;
139+
}
140+
141+
// Reset rounded corners
142+
> .btn:not(:last-child):not(.dropdown-toggle),
143+
> .btn-group:not(:last-child) > .btn {
144+
@include border-bottom-radius(0);
145+
}
146+
147+
> .btn:not(:first-child),
148+
> .btn-group:not(:first-child) > .btn {
149+
@include border-top-radius(0);
150+
}
151+
}
152+
153+
154+
// Checkbox and radio options
155+
//
156+
// In order to support the browser's form validation feedback, powered by the
157+
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
158+
// `display: none;` or `visibility: hidden;` as that also hides the popover.
159+
// Simply visually hiding the inputs via `opacity` would leave them clickable in
160+
// certain cases which is prevented by using `clip` and `pointer-events`.
161+
// This way, we ensure a DOM element is visible to position the popover from.
162+
//
163+
// See https://github.com/twbs/bootstrap/pull/12794 and
164+
// https://github.com/twbs/bootstrap/pull/14559 for more information.
165+
166+
.btn-group-toggle {
167+
> .btn,
168+
> .btn-group > .btn {
169+
margin-bottom: 0; // Override default `<label>` value
170+
171+
input[type="radio"],
172+
input[type="checkbox"] {
173+
position: absolute;
174+
clip: rect(0, 0, 0, 0);
175+
pointer-events: none;
176+
}
177+
}
178+
}

0 commit comments

Comments
 (0)