bootstrap-scss 5.2.1 → 5.2.2

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -77,7 +77,7 @@ For simplicity, this project will use the same version numbers as Bootstrap.
77
77
 
78
78
  ## Changelog
79
79
 
80
- https://github.com/twbs/bootstrap/releases/tag/v5.2.1
80
+ https://github.com/twbs/bootstrap/releases/tag/v5.2.2
81
81
 
82
82
  ## Copyright and license
83
83
 
package/_accordion.scss CHANGED
@@ -1,149 +1,149 @@
1
- //
2
- // Base styles
3
- //
4
-
5
- .accordion {
6
- // scss-docs-start accordion-css-vars
7
- --#{$prefix}accordion-color: #{$accordion-color};
8
- --#{$prefix}accordion-bg: #{$accordion-bg};
9
- --#{$prefix}accordion-transition: #{$accordion-transition};
10
- --#{$prefix}accordion-border-color: #{$accordion-border-color};
11
- --#{$prefix}accordion-border-width: #{$accordion-border-width};
12
- --#{$prefix}accordion-border-radius: #{$accordion-border-radius};
13
- --#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
14
- --#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x};
15
- --#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
16
- --#{$prefix}accordion-btn-color: #{$accordion-button-color};
17
- --#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
18
- --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
19
- --#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width};
20
- --#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform};
21
- --#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition};
22
- --#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)};
23
- --#{$prefix}accordion-btn-focus-border-color: #{$accordion-button-focus-border-color};
24
- --#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow};
25
- --#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x};
26
- --#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y};
27
- --#{$prefix}accordion-active-color: #{$accordion-button-active-color};
28
- --#{$prefix}accordion-active-bg: #{$accordion-button-active-bg};
29
- // scss-docs-end accordion-css-vars
30
- }
31
-
32
- .accordion-button {
33
- position: relative;
34
- display: flex;
35
- align-items: center;
36
- width: 100%;
37
- padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x);
38
- @include font-size($font-size-base);
39
- color: var(--#{$prefix}accordion-btn-color);
40
- text-align: left; // Reset button style
41
- background-color: var(--#{$prefix}accordion-btn-bg);
42
- border: 0;
43
- @include border-radius(0);
44
- overflow-anchor: none;
45
- @include transition(var(--#{$prefix}accordion-transition));
46
-
47
- &:not(.collapsed) {
48
- color: var(--#{$prefix}accordion-active-color);
49
- background-color: var(--#{$prefix}accordion-active-bg);
50
- box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
51
-
52
- &::after {
53
- background-image: var(--#{$prefix}accordion-btn-active-icon);
54
- transform: var(--#{$prefix}accordion-btn-icon-transform);
55
- }
56
- }
57
-
58
- // Accordion icon
59
- &::after {
60
- flex-shrink: 0;
61
- width: var(--#{$prefix}accordion-btn-icon-width);
62
- height: var(--#{$prefix}accordion-btn-icon-width);
63
- margin-left: auto;
64
- content: "";
65
- background-image: var(--#{$prefix}accordion-btn-icon);
66
- background-repeat: no-repeat;
67
- background-size: var(--#{$prefix}accordion-btn-icon-width);
68
- @include transition(var(--#{$prefix}accordion-btn-icon-transition));
69
- }
70
-
71
- &:hover {
72
- z-index: 2;
73
- }
74
-
75
- &:focus {
76
- z-index: 3;
77
- border-color: var(--#{$prefix}accordion-btn-focus-border-color);
78
- outline: 0;
79
- box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow);
80
- }
81
- }
82
-
83
- .accordion-header {
84
- margin-bottom: 0;
85
- }
86
-
87
- .accordion-item {
88
- color: var(--#{$prefix}accordion-color);
89
- background-color: var(--#{$prefix}accordion-bg);
90
- border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color);
91
-
92
- &:first-of-type {
93
- @include border-top-radius(var(--#{$prefix}accordion-border-radius));
94
-
95
- .accordion-button {
96
- @include border-top-radius(var(--#{$prefix}accordion-inner-border-radius));
97
- }
98
- }
99
-
100
- &:not(:first-of-type) {
101
- border-top: 0;
102
- }
103
-
104
- // Only set a border-radius on the last item if the accordion is collapsed
105
- &:last-of-type {
106
- @include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
107
-
108
- .accordion-button {
109
- &.collapsed {
110
- @include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius));
111
- }
112
- }
113
-
114
- .accordion-collapse {
115
- @include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
116
- }
117
- }
118
- }
119
-
120
- .accordion-body {
121
- padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x);
122
- }
123
-
124
-
125
- // Flush accordion items
126
- //
127
- // Remove borders and border-radius to keep accordion items edge-to-edge.
128
-
129
- .accordion-flush {
130
- .accordion-collapse {
131
- border-width: 0;
132
- }
133
-
134
- .accordion-item {
135
- border-right: 0;
136
- border-left: 0;
137
- @include border-radius(0);
138
-
139
- &:first-child { border-top: 0; }
140
- &:last-child { border-bottom: 0; }
141
-
142
- .accordion-button {
143
- &,
144
- &.collapsed {
145
- @include border-radius(0);
146
- }
147
- }
148
- }
149
- }
1
+ //
2
+ // Base styles
3
+ //
4
+
5
+ .accordion {
6
+ // scss-docs-start accordion-css-vars
7
+ --#{$prefix}accordion-color: #{$accordion-color};
8
+ --#{$prefix}accordion-bg: #{$accordion-bg};
9
+ --#{$prefix}accordion-transition: #{$accordion-transition};
10
+ --#{$prefix}accordion-border-color: #{$accordion-border-color};
11
+ --#{$prefix}accordion-border-width: #{$accordion-border-width};
12
+ --#{$prefix}accordion-border-radius: #{$accordion-border-radius};
13
+ --#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
14
+ --#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x};
15
+ --#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
16
+ --#{$prefix}accordion-btn-color: #{$accordion-button-color};
17
+ --#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
18
+ --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
19
+ --#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width};
20
+ --#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform};
21
+ --#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition};
22
+ --#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)};
23
+ --#{$prefix}accordion-btn-focus-border-color: #{$accordion-button-focus-border-color};
24
+ --#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow};
25
+ --#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x};
26
+ --#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y};
27
+ --#{$prefix}accordion-active-color: #{$accordion-button-active-color};
28
+ --#{$prefix}accordion-active-bg: #{$accordion-button-active-bg};
29
+ // scss-docs-end accordion-css-vars
30
+ }
31
+
32
+ .accordion-button {
33
+ position: relative;
34
+ display: flex;
35
+ align-items: center;
36
+ width: 100%;
37
+ padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x);
38
+ @include font-size($font-size-base);
39
+ color: var(--#{$prefix}accordion-btn-color);
40
+ text-align: left; // Reset button style
41
+ background-color: var(--#{$prefix}accordion-btn-bg);
42
+ border: 0;
43
+ @include border-radius(0);
44
+ overflow-anchor: none;
45
+ @include transition(var(--#{$prefix}accordion-transition));
46
+
47
+ &:not(.collapsed) {
48
+ color: var(--#{$prefix}accordion-active-color);
49
+ background-color: var(--#{$prefix}accordion-active-bg);
50
+ box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
51
+
52
+ &::after {
53
+ background-image: var(--#{$prefix}accordion-btn-active-icon);
54
+ transform: var(--#{$prefix}accordion-btn-icon-transform);
55
+ }
56
+ }
57
+
58
+ // Accordion icon
59
+ &::after {
60
+ flex-shrink: 0;
61
+ width: var(--#{$prefix}accordion-btn-icon-width);
62
+ height: var(--#{$prefix}accordion-btn-icon-width);
63
+ margin-left: auto;
64
+ content: "";
65
+ background-image: var(--#{$prefix}accordion-btn-icon);
66
+ background-repeat: no-repeat;
67
+ background-size: var(--#{$prefix}accordion-btn-icon-width);
68
+ @include transition(var(--#{$prefix}accordion-btn-icon-transition));
69
+ }
70
+
71
+ &:hover {
72
+ z-index: 2;
73
+ }
74
+
75
+ &:focus {
76
+ z-index: 3;
77
+ border-color: var(--#{$prefix}accordion-btn-focus-border-color);
78
+ outline: 0;
79
+ box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow);
80
+ }
81
+ }
82
+
83
+ .accordion-header {
84
+ margin-bottom: 0;
85
+ }
86
+
87
+ .accordion-item {
88
+ color: var(--#{$prefix}accordion-color);
89
+ background-color: var(--#{$prefix}accordion-bg);
90
+ border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color);
91
+
92
+ &:first-of-type {
93
+ @include border-top-radius(var(--#{$prefix}accordion-border-radius));
94
+
95
+ .accordion-button {
96
+ @include border-top-radius(var(--#{$prefix}accordion-inner-border-radius));
97
+ }
98
+ }
99
+
100
+ &:not(:first-of-type) {
101
+ border-top: 0;
102
+ }
103
+
104
+ // Only set a border-radius on the last item if the accordion is collapsed
105
+ &:last-of-type {
106
+ @include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
107
+
108
+ .accordion-button {
109
+ &.collapsed {
110
+ @include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius));
111
+ }
112
+ }
113
+
114
+ .accordion-collapse {
115
+ @include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
116
+ }
117
+ }
118
+ }
119
+
120
+ .accordion-body {
121
+ padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x);
122
+ }
123
+
124
+
125
+ // Flush accordion items
126
+ //
127
+ // Remove borders and border-radius to keep accordion items edge-to-edge.
128
+
129
+ .accordion-flush {
130
+ .accordion-collapse {
131
+ border-width: 0;
132
+ }
133
+
134
+ .accordion-item {
135
+ border-right: 0;
136
+ border-left: 0;
137
+ @include border-radius(0);
138
+
139
+ &:first-child { border-top: 0; }
140
+ &:last-child { border-bottom: 0; }
141
+
142
+ .accordion-button {
143
+ &,
144
+ &.collapsed {
145
+ @include border-radius(0);
146
+ }
147
+ }
148
+ }
149
+ }
@@ -1,142 +1,142 @@
1
- // Make the div behave like a button
2
- .btn-group,
3
- .btn-group-vertical {
4
- position: relative;
5
- display: inline-flex;
6
- vertical-align: middle; // match .btn alignment given font-size hack above
7
-
8
- > .btn {
9
- position: relative;
10
- flex: 1 1 auto;
11
- }
12
-
13
- // Bring the hover, focused, and "active" buttons to the front to overlay
14
- // the borders properly
15
- > .btn-check:checked + .btn,
16
- > .btn-check:focus + .btn,
17
- > .btn:hover,
18
- > .btn:focus,
19
- > .btn:active,
20
- > .btn.active {
21
- z-index: 1;
22
- }
23
- }
24
-
25
- // Optional: Group multiple button groups together for a toolbar
26
- .btn-toolbar {
27
- display: flex;
28
- flex-wrap: wrap;
29
- justify-content: flex-start;
30
-
31
- .input-group {
32
- width: auto;
33
- }
34
- }
35
-
36
- .btn-group {
37
- @include border-radius($btn-border-radius);
38
-
39
- // Prevent double borders when buttons are next to each other
40
- > :not(.btn-check:first-child) + .btn,
41
- > .btn-group:not(:first-child) {
42
- margin-left: -$btn-border-width;
43
- }
44
-
45
- // Reset rounded corners
46
- > .btn:not(:last-child):not(.dropdown-toggle),
47
- > .btn.dropdown-toggle-split:first-child,
48
- > .btn-group:not(:last-child) > .btn {
49
- @include border-end-radius(0);
50
- }
51
-
52
- // The left radius should be 0 if the button is:
53
- // - the "third or more" child
54
- // - the second child and the previous element isn't `.btn-check` (making it the first child visually)
55
- // - part of a btn-group which isn't the first child
56
- > .btn:nth-child(n + 3),
57
- > :not(.btn-check) + .btn,
58
- > .btn-group:not(:first-child) > .btn {
59
- @include border-start-radius(0);
60
- }
61
- }
62
-
63
- // Sizing
64
- //
65
- // Remix the default button sizing classes into new ones for easier manipulation.
66
-
67
- .btn-group-sm > .btn { @extend .btn-sm; }
68
- .btn-group-lg > .btn { @extend .btn-lg; }
69
-
70
-
71
- //
72
- // Split button dropdowns
73
- //
74
-
75
- .dropdown-toggle-split {
76
- padding-right: $btn-padding-x * .75;
77
- padding-left: $btn-padding-x * .75;
78
-
79
- &::after,
80
- .dropup &::after,
81
- .dropend &::after {
82
- margin-left: 0;
83
- }
84
-
85
- .dropstart &::before {
86
- margin-right: 0;
87
- }
88
- }
89
-
90
- .btn-sm + .dropdown-toggle-split {
91
- padding-right: $btn-padding-x-sm * .75;
92
- padding-left: $btn-padding-x-sm * .75;
93
- }
94
-
95
- .btn-lg + .dropdown-toggle-split {
96
- padding-right: $btn-padding-x-lg * .75;
97
- padding-left: $btn-padding-x-lg * .75;
98
- }
99
-
100
-
101
- // The clickable button for toggling the menu
102
- // Set the same inset shadow as the :active state
103
- .btn-group.show .dropdown-toggle {
104
- @include box-shadow($btn-active-box-shadow);
105
-
106
- // Show no shadow for `.btn-link` since it has no other button styles.
107
- &.btn-link {
108
- @include box-shadow(none);
109
- }
110
- }
111
-
112
-
113
- //
114
- // Vertical button groups
115
- //
116
-
117
- .btn-group-vertical {
118
- flex-direction: column;
119
- align-items: flex-start;
120
- justify-content: center;
121
-
122
- > .btn,
123
- > .btn-group {
124
- width: 100%;
125
- }
126
-
127
- > .btn:not(:first-child),
128
- > .btn-group:not(:first-child) {
129
- margin-top: -$btn-border-width;
130
- }
131
-
132
- // Reset rounded corners
133
- > .btn:not(:last-child):not(.dropdown-toggle),
134
- > .btn-group:not(:last-child) > .btn {
135
- @include border-bottom-radius(0);
136
- }
137
-
138
- > .btn ~ .btn,
139
- > .btn-group:not(:first-child) > .btn {
140
- @include border-top-radius(0);
141
- }
142
- }
1
+ // Make the div behave like a button
2
+ .btn-group,
3
+ .btn-group-vertical {
4
+ position: relative;
5
+ display: inline-flex;
6
+ vertical-align: middle; // match .btn alignment given font-size hack above
7
+
8
+ > .btn {
9
+ position: relative;
10
+ flex: 1 1 auto;
11
+ }
12
+
13
+ // Bring the hover, focused, and "active" buttons to the front to overlay
14
+ // the borders properly
15
+ > .btn-check:checked + .btn,
16
+ > .btn-check:focus + .btn,
17
+ > .btn:hover,
18
+ > .btn:focus,
19
+ > .btn:active,
20
+ > .btn.active {
21
+ z-index: 1;
22
+ }
23
+ }
24
+
25
+ // Optional: Group multiple button groups together for a toolbar
26
+ .btn-toolbar {
27
+ display: flex;
28
+ flex-wrap: wrap;
29
+ justify-content: flex-start;
30
+
31
+ .input-group {
32
+ width: auto;
33
+ }
34
+ }
35
+
36
+ .btn-group {
37
+ @include border-radius($btn-border-radius);
38
+
39
+ // Prevent double borders when buttons are next to each other
40
+ > :not(.btn-check:first-child) + .btn,
41
+ > .btn-group:not(:first-child) {
42
+ margin-left: -$btn-border-width;
43
+ }
44
+
45
+ // Reset rounded corners
46
+ > .btn:not(:last-child):not(.dropdown-toggle),
47
+ > .btn.dropdown-toggle-split:first-child,
48
+ > .btn-group:not(:last-child) > .btn {
49
+ @include border-end-radius(0);
50
+ }
51
+
52
+ // The left radius should be 0 if the button is:
53
+ // - the "third or more" child
54
+ // - the second child and the previous element isn't `.btn-check` (making it the first child visually)
55
+ // - part of a btn-group which isn't the first child
56
+ > .btn:nth-child(n + 3),
57
+ > :not(.btn-check) + .btn,
58
+ > .btn-group:not(:first-child) > .btn {
59
+ @include border-start-radius(0);
60
+ }
61
+ }
62
+
63
+ // Sizing
64
+ //
65
+ // Remix the default button sizing classes into new ones for easier manipulation.
66
+
67
+ .btn-group-sm > .btn { @extend .btn-sm; }
68
+ .btn-group-lg > .btn { @extend .btn-lg; }
69
+
70
+
71
+ //
72
+ // Split button dropdowns
73
+ //
74
+
75
+ .dropdown-toggle-split {
76
+ padding-right: $btn-padding-x * .75;
77
+ padding-left: $btn-padding-x * .75;
78
+
79
+ &::after,
80
+ .dropup &::after,
81
+ .dropend &::after {
82
+ margin-left: 0;
83
+ }
84
+
85
+ .dropstart &::before {
86
+ margin-right: 0;
87
+ }
88
+ }
89
+
90
+ .btn-sm + .dropdown-toggle-split {
91
+ padding-right: $btn-padding-x-sm * .75;
92
+ padding-left: $btn-padding-x-sm * .75;
93
+ }
94
+
95
+ .btn-lg + .dropdown-toggle-split {
96
+ padding-right: $btn-padding-x-lg * .75;
97
+ padding-left: $btn-padding-x-lg * .75;
98
+ }
99
+
100
+
101
+ // The clickable button for toggling the menu
102
+ // Set the same inset shadow as the :active state
103
+ .btn-group.show .dropdown-toggle {
104
+ @include box-shadow($btn-active-box-shadow);
105
+
106
+ // Show no shadow for `.btn-link` since it has no other button styles.
107
+ &.btn-link {
108
+ @include box-shadow(none);
109
+ }
110
+ }
111
+
112
+
113
+ //
114
+ // Vertical button groups
115
+ //
116
+
117
+ .btn-group-vertical {
118
+ flex-direction: column;
119
+ align-items: flex-start;
120
+ justify-content: center;
121
+
122
+ > .btn,
123
+ > .btn-group {
124
+ width: 100%;
125
+ }
126
+
127
+ > .btn:not(:first-child),
128
+ > .btn-group:not(:first-child) {
129
+ margin-top: -$btn-border-width;
130
+ }
131
+
132
+ // Reset rounded corners
133
+ > .btn:not(:last-child):not(.dropdown-toggle),
134
+ > .btn-group:not(:last-child) > .btn {
135
+ @include border-bottom-radius(0);
136
+ }
137
+
138
+ > .btn ~ .btn,
139
+ > .btn-group:not(:first-child) > .btn {
140
+ @include border-top-radius(0);
141
+ }
142
+ }