@carbon/styles 1.37.0 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/styles.css +2588 -2403
- package/css/styles.min.css +1 -1
- package/package.json +5 -5
- package/scss/components/accordion/_accordion.scss +47 -35
- package/scss/components/aspect-ratio/_aspect-ratio.scss +7 -4
- package/scss/components/breadcrumb/_breadcrumb.scss +26 -20
- package/scss/components/button/_button.scss +16 -11
- package/scss/components/button/_mixins.scss +12 -12
- package/scss/components/checkbox/_checkbox.scss +55 -40
- package/scss/components/code-snippet/_code-snippet.scss +74 -59
- package/scss/components/code-snippet/_mixins.scss +2 -2
- package/scss/components/combo-box/_combo-box.scss +2 -2
- package/scss/components/combo-button/_combo-button.scss +2 -2
- package/scss/components/contained-list/_contained-list.scss +41 -22
- package/scss/components/content-switcher/_content-switcher.scss +32 -32
- package/scss/components/data-table/_data-table.scss +150 -144
- package/scss/components/data-table/_mixins.scss +3 -3
- package/scss/components/data-table/action/_data-table-action.scss +83 -81
- package/scss/components/data-table/expandable/_data-table-expandable.scss +60 -60
- package/scss/components/data-table/skeleton/_data-table-skeleton.scss +10 -8
- package/scss/components/data-table/sort/_data-table-sort.scss +38 -38
- package/scss/components/date-picker/_date-picker.scss +21 -20
- package/scss/components/date-picker/_flatpickr.scss +51 -51
- package/scss/components/dropdown/_dropdown.scss +49 -49
- package/scss/components/file-uploader/_file-uploader.scss +37 -37
- package/scss/components/fluid-combo-box/_fluid-combo-box.scss +4 -4
- package/scss/components/fluid-date-picker/_fluid-date-picker.scss +54 -54
- package/scss/components/fluid-list-box/_fluid-list-box.scss +33 -33
- package/scss/components/fluid-multiselect/_fluid-multiselect.scss +2 -2
- package/scss/components/fluid-number-input/_fluid-number-input.scss +30 -30
- package/scss/components/fluid-search/_fluid-search.scss +17 -17
- package/scss/components/fluid-select/_fluid-select.scss +17 -17
- package/scss/components/fluid-text-area/_fluid-text-area.scss +21 -21
- package/scss/components/fluid-text-input/_fluid-text-input.scss +26 -26
- package/scss/components/fluid-time-picker/_fluid-time-picker.scss +23 -23
- package/scss/components/form/_form.scss +16 -15
- package/scss/components/inline-loading/_inline-loading.scss +9 -9
- package/scss/components/link/_link.scss +1 -1
- package/scss/components/list/_list.scss +7 -7
- package/scss/components/list-box/_list-box.scss +109 -107
- package/scss/components/loading/_loading.scss +10 -9
- package/scss/components/menu/_menu.scss +7 -7
- package/scss/components/menu-button/_menu-button.scss +1 -1
- package/scss/components/modal/_modal.scss +72 -72
- package/scss/components/multiselect/_multiselect.scss +11 -11
- package/scss/components/notification/_actionable-notification.scss +37 -39
- package/scss/components/notification/_inline-notification.scss +26 -26
- package/scss/components/notification/_mixins.scss +3 -3
- package/scss/components/notification/_toast-notification.scss +16 -18
- package/scss/components/number-input/_number-input.scss +70 -70
- package/scss/components/overflow-menu/_overflow-menu.scss +50 -50
- package/scss/components/pagination/_pagination.scss +46 -34
- package/scss/components/pagination/_unstable_pagination.scss +26 -24
- package/scss/components/pagination-nav/_mixins.scss +6 -6
- package/scss/components/pagination-nav/_pagination-nav.scss +16 -11
- package/scss/components/popover/_popover.scss +201 -63
- package/scss/components/progress-bar/_progress-bar.scss +33 -11
- package/scss/components/progress-indicator/_progress-indicator.scss +46 -42
- package/scss/components/radio-button/_radio-button.scss +24 -23
- package/scss/components/search/_search.scss +35 -34
- package/scss/components/select/_select.scss +31 -29
- package/scss/components/skeleton-styles/_skeleton-styles.scss +10 -8
- package/scss/components/slider/_slider.scss +28 -28
- package/scss/components/structured-list/_mixins.scss +4 -4
- package/scss/components/structured-list/_structured-list.scss +16 -16
- package/scss/components/tabs/_tabs.scss +50 -50
- package/scss/components/tag/_tag.scss +22 -20
- package/scss/components/text-area/_text-area.scss +17 -15
- package/scss/components/text-input/_text-input.scss +43 -41
- package/scss/components/tile/_tile.scss +11 -11
- package/scss/components/time-picker/_time-picker.scss +17 -17
- package/scss/components/toggle/_toggle.scss +37 -24
- package/scss/components/toggletip/_toggletip.scss +3 -2
- package/scss/components/tooltip/_tooltip.scss +7 -5
- package/scss/components/treeview/_treeview.scss +27 -27
- package/scss/components/ui-shell/content/_content.scss +3 -3
- package/scss/components/ui-shell/header/_header.scss +47 -47
- package/scss/components/ui-shell/header-panel/_header-panel.scss +7 -7
- package/scss/components/ui-shell/side-nav/_side-nav.scss +65 -65
- package/scss/components/ui-shell/switcher/_switcher.scss +6 -6
- package/scss/utilities/_button-reset.scss +1 -1
- package/scss/utilities/_skeleton.scss +4 -4
- package/scss/utilities/_text-overflow.scss +1 -1
- package/scss/utilities/_text-truncate.scss +2 -2
- package/scss/utilities/_tooltip.scss +44 -46
- package/scss/utilities/_visually-hidden.scss +4 -4
|
@@ -23,23 +23,23 @@
|
|
|
23
23
|
// Spacing between checkboxes
|
|
24
24
|
.#{$prefix}--form-item.#{$prefix}--checkbox-wrapper {
|
|
25
25
|
position: relative;
|
|
26
|
-
margin-
|
|
26
|
+
margin-block-end: $spacing-02;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// Spacing above collection of checkboxes
|
|
30
30
|
.#{$prefix}--form-item.#{$prefix}--checkbox-wrapper:first-of-type {
|
|
31
|
-
margin-
|
|
31
|
+
margin-block-start: convert.to-rem(3px);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// Shift collection of checkboxes up if label is present
|
|
35
35
|
// to account for the 2px top margin for the first checkbox
|
|
36
36
|
.#{$prefix}--label + .#{$prefix}--form-item.#{$prefix}--checkbox-wrapper {
|
|
37
|
-
margin-
|
|
37
|
+
margin-block-start: -#{$spacing-01};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
// Spacing below collection of checkboxes
|
|
41
41
|
.#{$prefix}--form-item.#{$prefix}--checkbox-wrapper:last-of-type {
|
|
42
|
-
margin-
|
|
42
|
+
margin-block-end: convert.to-rem(3px);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// Visually, we'll hide the checkbox input and create our own styled version
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
.#{$prefix}--checkbox {
|
|
48
48
|
@include visually-hidden;
|
|
49
49
|
//even though its hidden, positioning is for native validation to be aligned to checkbox
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
inset-block-start: 1.25rem;
|
|
51
|
+
inset-inline-start: 0.7rem;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// The label corresponds to the content inside of the `label` tag. Since we're
|
|
@@ -60,16 +60,16 @@
|
|
|
60
60
|
|
|
61
61
|
position: relative;
|
|
62
62
|
display: flex;
|
|
63
|
-
min-height: convert.to-rem(24px);
|
|
64
|
-
padding-top: convert.to-rem(3px);
|
|
65
|
-
padding-left: convert.to-rem(20px);
|
|
66
63
|
cursor: pointer;
|
|
64
|
+
min-block-size: convert.to-rem(24px);
|
|
65
|
+
padding-block-start: convert.to-rem(3px);
|
|
66
|
+
padding-inline-start: convert.to-rem(20px);
|
|
67
67
|
user-select: none;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.#{$prefix}--checkbox-label-text {
|
|
71
71
|
// Add extra spacing when label is present
|
|
72
|
-
padding-
|
|
72
|
+
padding-inline-start: convert.to-rem(6px);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
// Required because `$css--reset: true` cannot currently apply to this `::before` and `::after`
|
|
@@ -85,14 +85,6 @@
|
|
|
85
85
|
// `top` since we don't want the checkbox to be centered vertically with the
|
|
86
86
|
// text overflows.
|
|
87
87
|
position: absolute;
|
|
88
|
-
top: convert.to-rem(2px);
|
|
89
|
-
left: 0;
|
|
90
|
-
|
|
91
|
-
// According to the spec, we'll want the bounding box for our checkbox to
|
|
92
|
-
// be 16px. The border size will be what will be updated during the
|
|
93
|
-
// different checkbox states.
|
|
94
|
-
width: convert.to-rem(16px);
|
|
95
|
-
height: convert.to-rem(16px);
|
|
96
88
|
border: 1px solid $icon-primary;
|
|
97
89
|
// increase left margin for #6480
|
|
98
90
|
margin: convert.to-rem(2px) convert.to-rem(2px) convert.to-rem(2px)
|
|
@@ -100,24 +92,32 @@
|
|
|
100
92
|
|
|
101
93
|
// Checkboxes with a background color look visually off against a parent container.
|
|
102
94
|
background-color: transparent;
|
|
95
|
+
block-size: convert.to-rem(16px);
|
|
103
96
|
border-radius: 2px;
|
|
104
97
|
content: '';
|
|
98
|
+
|
|
99
|
+
// According to the spec, we'll want the bounding box for our checkbox to
|
|
100
|
+
// be 16px. The border size will be what will be updated during the
|
|
101
|
+
// different checkbox states.
|
|
102
|
+
inline-size: convert.to-rem(16px);
|
|
103
|
+
inset-block-start: convert.to-rem(2px);
|
|
104
|
+
inset-inline-start: 0;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
// Create the appearance of the check in the `after` pseudo-element
|
|
108
108
|
.#{$prefix}--checkbox-label::after {
|
|
109
109
|
position: absolute;
|
|
110
|
-
top: convert.to-rem(7.5px);
|
|
111
|
-
left: convert.to-rem(7px);
|
|
112
|
-
width: convert.to-rem(9px);
|
|
113
|
-
height: convert.to-rem(5px);
|
|
114
|
-
border-bottom: 1.5px solid $icon-inverse;
|
|
115
|
-
border-left: 1.5px solid $icon-inverse;
|
|
116
|
-
margin-top: convert.to-rem(-3px) #{'/*rtl:0rem*/'};
|
|
117
110
|
background: none;
|
|
111
|
+
block-size: convert.to-rem(5px);
|
|
112
|
+
border-block-end: 1.5px solid $icon-inverse;
|
|
113
|
+
border-inline-start: 1.5px solid $icon-inverse;
|
|
118
114
|
content: '';
|
|
115
|
+
inline-size: convert.to-rem(9px);
|
|
116
|
+
inset-block-start: convert.to-rem(7.5px);
|
|
117
|
+
inset-inline-start: convert.to-rem(7px);
|
|
118
|
+
margin-block-start: convert.to-rem(-3px);
|
|
119
119
|
transform: scale(0) rotate(-45deg);
|
|
120
|
-
transform-origin: bottom right
|
|
120
|
+
transform-origin: bottom right;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
//----------------------------------------------
|
|
@@ -136,15 +136,15 @@
|
|
|
136
136
|
// Display the check
|
|
137
137
|
.#{$prefix}--checkbox:checked + .#{$prefix}--checkbox-label::after,
|
|
138
138
|
.#{$prefix}--checkbox-label[data-contained-checkbox-state='true']::after {
|
|
139
|
-
transform: scale(1) rotate(-45deg)
|
|
139
|
+
transform: scale(1) rotate(-45deg);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
// Indeterminate symbol
|
|
143
143
|
.#{$prefix}--checkbox:indeterminate + .#{$prefix}--checkbox-label::after {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
border-block-end: 2px solid $icon-inverse;
|
|
145
|
+
border-inline-start: 0 solid $icon-inverse;
|
|
146
|
+
inline-size: convert.to-rem(8px);
|
|
147
|
+
inset-block-start: convert.to-rem(11px);
|
|
148
148
|
transform: scale(1) rotate(0deg);
|
|
149
149
|
}
|
|
150
150
|
|
|
@@ -224,13 +224,13 @@
|
|
|
224
224
|
.#{$prefix}--checkbox__validation-msg {
|
|
225
225
|
display: none;
|
|
226
226
|
align-items: flex-start;
|
|
227
|
-
margin-
|
|
227
|
+
margin-block-start: $spacing-02;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
.#{$prefix}--checkbox__invalid-icon {
|
|
231
|
-
min-width: convert.to-rem(16px);
|
|
232
231
|
margin: convert.to-rem(1px) convert.to-rem(1px) 0 convert.to-rem(3px);
|
|
233
232
|
fill: $support-error;
|
|
233
|
+
min-inline-size: convert.to-rem(16px);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
.#{$prefix}--checkbox__invalid-icon--warning {
|
|
@@ -266,9 +266,9 @@
|
|
|
266
266
|
.#{$prefix}--form-requirement {
|
|
267
267
|
display: block;
|
|
268
268
|
overflow: visible;
|
|
269
|
-
|
|
270
|
-
margin-
|
|
271
|
-
|
|
269
|
+
margin-block-start: 0;
|
|
270
|
+
margin-inline-start: $spacing-03;
|
|
271
|
+
max-block-size: 100%;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
.#{$prefix}--checkbox-group--invalid
|
|
@@ -332,11 +332,11 @@
|
|
|
332
332
|
.#{$prefix}--checkbox-label-text.#{$prefix}--skeleton {
|
|
333
333
|
@include skeleton;
|
|
334
334
|
|
|
335
|
-
width: convert.to-rem(100px);
|
|
336
|
-
height: $spacing-05;
|
|
337
|
-
|
|
338
335
|
// Add extra spacing when label is present
|
|
339
|
-
|
|
336
|
+
block-size: $spacing-05;
|
|
337
|
+
inline-size: convert.to-rem(100px);
|
|
338
|
+
margin-block: convert.to-rem(1px) 0;
|
|
339
|
+
margin-inline: convert.to-rem(6px) 0;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
//-----------------------------------------------
|
|
@@ -345,4 +345,19 @@
|
|
|
345
345
|
.#{$prefix}--checkbox--inline {
|
|
346
346
|
position: relative;
|
|
347
347
|
}
|
|
348
|
+
|
|
349
|
+
// RTL overrides
|
|
350
|
+
[dir='rtl'] .#{$prefix}--checkbox-label::after {
|
|
351
|
+
margin-block-start: 0;
|
|
352
|
+
margin-inline-start: convert.to-rem(-1px);
|
|
353
|
+
transform-origin: center;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
[dir='rtl']
|
|
357
|
+
.#{$prefix}--checkbox:checked
|
|
358
|
+
+ .#{$prefix}--checkbox-label::after,
|
|
359
|
+
[dir='rtl']
|
|
360
|
+
.#{$prefix}--checkbox-label[data-contained-checkbox-state='true']::after {
|
|
361
|
+
transform: scale(1.2) rotate3d(0.5, 1, 0, 158deg);
|
|
362
|
+
}
|
|
348
363
|
}
|
|
@@ -149,26 +149,26 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
149
149
|
@include bx--snippet;
|
|
150
150
|
|
|
151
151
|
display: flex;
|
|
152
|
-
height: $spacing-08;
|
|
153
152
|
align-items: center;
|
|
154
|
-
|
|
153
|
+
block-size: $spacing-08;
|
|
154
|
+
padding-inline-end: $spacing-08;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
.#{$prefix}--snippet--single.#{$prefix}--snippet--no-copy {
|
|
158
158
|
padding: 0;
|
|
159
159
|
|
|
160
160
|
&::after {
|
|
161
|
-
|
|
161
|
+
inset-inline-end: $spacing-05;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
.#{$prefix}--snippet--single .#{$prefix}--snippet-container {
|
|
166
166
|
position: relative;
|
|
167
167
|
display: flex;
|
|
168
|
-
height: 100%;
|
|
169
168
|
align-items: center;
|
|
170
|
-
|
|
169
|
+
block-size: 100%;
|
|
171
170
|
overflow-x: auto;
|
|
171
|
+
padding-inline-start: $spacing-05;
|
|
172
172
|
|
|
173
173
|
&:focus {
|
|
174
174
|
@include focus-outline('outline');
|
|
@@ -178,7 +178,7 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
178
178
|
.#{$prefix}--snippet--single pre {
|
|
179
179
|
@include type-style('code-01');
|
|
180
180
|
|
|
181
|
-
padding-
|
|
181
|
+
padding-inline-end: $spacing-03;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
// Preserve whitespace, but don't allow wrapping for inline and single
|
|
@@ -198,9 +198,9 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
198
198
|
//collapsed snippet container
|
|
199
199
|
.#{$prefix}--snippet--multi .#{$prefix}--snippet-container {
|
|
200
200
|
position: relative;
|
|
201
|
-
min-height: 100%;
|
|
202
|
-
max-height: 100%;
|
|
203
201
|
order: 1;
|
|
202
|
+
max-block-size: 100%;
|
|
203
|
+
min-block-size: 100%;
|
|
204
204
|
overflow-y: auto;
|
|
205
205
|
transition: max-height $duration-moderate-01 motion(standard, productive);
|
|
206
206
|
|
|
@@ -214,7 +214,7 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
214
214
|
// expanded snippet container
|
|
215
215
|
.#{$prefix}--snippet--multi.#{$prefix}--snippet--expand
|
|
216
216
|
.#{$prefix}--snippet-container {
|
|
217
|
-
padding-
|
|
217
|
+
padding-block-end: $spacing-05;
|
|
218
218
|
transition: max-height $duration-moderate-01 motion(standard, productive);
|
|
219
219
|
}
|
|
220
220
|
|
|
@@ -225,15 +225,15 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
225
225
|
|
|
226
226
|
// collapsed pre
|
|
227
227
|
.#{$prefix}--snippet--multi .#{$prefix}--snippet-container pre {
|
|
228
|
-
padding-right: $spacing-08;
|
|
229
|
-
padding-bottom: convert.to-rem(24px);
|
|
230
228
|
overflow-x: auto;
|
|
229
|
+
padding-block-end: convert.to-rem(24px);
|
|
230
|
+
padding-inline-end: $spacing-08;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
.#{$prefix}--snippet--multi.#{$prefix}--snippet--no-copy
|
|
234
234
|
.#{$prefix}--snippet-container
|
|
235
235
|
pre {
|
|
236
|
-
padding-
|
|
236
|
+
padding-inline-end: 0;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
// expanded pre
|
|
@@ -247,12 +247,19 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
247
247
|
.#{$prefix}--snippet-container
|
|
248
248
|
pre::after {
|
|
249
249
|
position: absolute;
|
|
250
|
-
top: 0;
|
|
251
|
-
right: 0;
|
|
252
|
-
width: convert.to-rem(16px);
|
|
253
|
-
height: 100%;
|
|
254
250
|
background-image: linear-gradient(to right, transparent, $layer);
|
|
251
|
+
block-size: 100%;
|
|
255
252
|
content: '';
|
|
253
|
+
inline-size: convert.to-rem(16px);
|
|
254
|
+
inset-block-start: 0;
|
|
255
|
+
inset-inline-end: 0;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
[dir='rtl']
|
|
259
|
+
.#{$prefix}--snippet--multi.#{$prefix}--snippet--has-right-overflow
|
|
260
|
+
.#{$prefix}--snippet-container
|
|
261
|
+
pre::after {
|
|
262
|
+
background-image: linear-gradient(to left, transparent, $layer);
|
|
256
263
|
}
|
|
257
264
|
|
|
258
265
|
.#{$prefix}--snippet--multi .#{$prefix}--snippet-container pre code {
|
|
@@ -261,9 +268,9 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
261
268
|
|
|
262
269
|
//Copy Button
|
|
263
270
|
.#{$prefix}--snippet__icon {
|
|
264
|
-
|
|
265
|
-
height: convert.to-rem(16px);
|
|
271
|
+
block-size: convert.to-rem(16px);
|
|
266
272
|
fill: $icon-primary;
|
|
273
|
+
inline-size: convert.to-rem(16px);
|
|
267
274
|
transition: all $duration-fast-01 motion(standard, productive);
|
|
268
275
|
}
|
|
269
276
|
|
|
@@ -296,17 +303,17 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
296
303
|
@include font-family('sans');
|
|
297
304
|
|
|
298
305
|
position: absolute;
|
|
299
|
-
|
|
300
|
-
|
|
306
|
+
inset-block-start: 0;
|
|
307
|
+
inset-inline-end: 0;
|
|
301
308
|
}
|
|
302
309
|
|
|
303
310
|
// Overrides for codesnippet copy btn
|
|
304
311
|
// TLDR: Copy/CopyButton now uses IconButton, which uses Carbon buttons under the hood
|
|
305
312
|
// v10 Copy just used native html button so it didn't have extra carbon styles that needed overriding
|
|
306
313
|
.#{$prefix}--snippet--inline.#{$prefix}--btn {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
min-
|
|
314
|
+
block-size: 1.25rem;
|
|
315
|
+
inline-size: initial;
|
|
316
|
+
min-block-size: 1.25rem;
|
|
310
317
|
padding-inline: 0;
|
|
311
318
|
}
|
|
312
319
|
|
|
@@ -317,8 +324,8 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
317
324
|
// override multi copy btn styles
|
|
318
325
|
.#{$prefix}--snippet.#{$prefix}--snippet--multi
|
|
319
326
|
.#{$prefix}--popover-container {
|
|
320
|
-
|
|
321
|
-
|
|
327
|
+
inset-block-start: 0.5rem;
|
|
328
|
+
inset-inline-end: 0.5rem;
|
|
322
329
|
}
|
|
323
330
|
|
|
324
331
|
.#{$prefix}--snippet--multi .#{$prefix}--copy-btn {
|
|
@@ -332,21 +339,21 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
332
339
|
|
|
333
340
|
position: absolute;
|
|
334
341
|
z-index: 10;
|
|
335
|
-
right: 0;
|
|
336
|
-
bottom: 0;
|
|
337
342
|
display: inline-flex;
|
|
338
|
-
height: convert.to-rem(32px);
|
|
339
343
|
align-items: center;
|
|
340
344
|
|
|
341
345
|
padding: $spacing-03 $spacing-05;
|
|
342
346
|
border: 0;
|
|
343
347
|
background-color: $layer;
|
|
348
|
+
block-size: convert.to-rem(32px);
|
|
344
349
|
color: $text-primary;
|
|
350
|
+
inset-block-end: 0;
|
|
351
|
+
inset-inline-end: 0;
|
|
345
352
|
}
|
|
346
353
|
|
|
347
354
|
.#{$prefix}--snippet-btn--expand .#{$prefix}--snippet-btn--text {
|
|
348
355
|
position: relative;
|
|
349
|
-
|
|
356
|
+
inset-block-start: convert.to-rem(-1px);
|
|
350
357
|
}
|
|
351
358
|
|
|
352
359
|
.#{$prefix}--snippet-btn--expand--hide.#{$prefix}--snippet-btn--expand {
|
|
@@ -354,8 +361,8 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
354
361
|
}
|
|
355
362
|
|
|
356
363
|
.#{$prefix}--snippet-btn--expand .#{$prefix}--icon-chevron--down {
|
|
357
|
-
margin-left: $spacing-03;
|
|
358
364
|
fill: $icon-primary;
|
|
365
|
+
margin-inline-start: $spacing-03;
|
|
359
366
|
transform: rotate(0deg);
|
|
360
367
|
transition: $duration-moderate-01 motion(standard, productive);
|
|
361
368
|
}
|
|
@@ -416,22 +423,22 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
416
423
|
|
|
417
424
|
// Skeleton State
|
|
418
425
|
.#{$prefix}--snippet.#{$prefix}--skeleton .#{$prefix}--snippet-container {
|
|
419
|
-
|
|
420
|
-
|
|
426
|
+
block-size: 100%;
|
|
427
|
+
inline-size: 100%;
|
|
421
428
|
}
|
|
422
429
|
|
|
423
430
|
.#{$prefix}--snippet-button .#{$prefix}--btn--copy__feedback {
|
|
424
431
|
// (The height of button) + (The height of the tooltip's triangle) + 4px
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
432
|
+
inset-block-start: convert.to-rem(50.8px);
|
|
433
|
+
inset-inline-end: auto;
|
|
434
|
+
inset-inline-start: 50%;
|
|
428
435
|
|
|
429
436
|
&::before {
|
|
430
|
-
|
|
437
|
+
inset-block-start: 0;
|
|
431
438
|
}
|
|
432
439
|
|
|
433
440
|
&::after {
|
|
434
|
-
|
|
441
|
+
inset-block-start: convert.to-rem(-4px);
|
|
435
442
|
}
|
|
436
443
|
}
|
|
437
444
|
|
|
@@ -439,63 +446,71 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
439
446
|
.#{$prefix}--snippet-button
|
|
440
447
|
.#{$prefix}--btn--copy__feedback {
|
|
441
448
|
// (The height of button) + (The height of the tooltip's triangle) + 4px
|
|
442
|
-
|
|
449
|
+
inset-block-start: convert.to-rem(42.8px);
|
|
443
450
|
}
|
|
444
451
|
|
|
445
452
|
.#{$prefix}--snippet--inline .#{$prefix}--btn--copy__feedback {
|
|
446
453
|
// TODO: use updated global tooltip mixins under the hood
|
|
447
454
|
// since all of the positioning values for the copy button tooltip are arbitrary hard coded rem values, we need this arbitrary 4px offset to keep the proper tooltip spacing according to the spec
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
455
|
+
inset-block-start: calc(100% - #{convert.to-rem(4px)});
|
|
456
|
+
inset-inline-end: auto;
|
|
457
|
+
inset-inline-start: 50%;
|
|
451
458
|
}
|
|
452
459
|
|
|
453
460
|
// Overflow Indicator
|
|
454
461
|
.#{$prefix}--snippet__overflow-indicator--left,
|
|
455
462
|
.#{$prefix}--snippet__overflow-indicator--right {
|
|
456
463
|
z-index: 1;
|
|
457
|
-
width: $spacing-05;
|
|
458
464
|
flex: 1 0 auto;
|
|
465
|
+
inline-size: $spacing-05;
|
|
459
466
|
}
|
|
460
467
|
|
|
461
468
|
.#{$prefix}--snippet__overflow-indicator--left {
|
|
462
469
|
order: 0;
|
|
463
|
-
margin-right: -$spacing-05;
|
|
464
470
|
background-image: linear-gradient(to left, transparent, $layer);
|
|
471
|
+
margin-inline-end: -$spacing-05;
|
|
465
472
|
}
|
|
466
473
|
|
|
467
474
|
.#{$prefix}--snippet__overflow-indicator--right {
|
|
468
475
|
order: 2;
|
|
469
|
-
margin-left: -$spacing-05;
|
|
470
476
|
background-image: linear-gradient(to right, transparent, $layer);
|
|
477
|
+
margin-inline-start: -$spacing-05;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
[dir='rtl'] .#{$prefix}--snippet__overflow-indicator--left {
|
|
481
|
+
background-image: linear-gradient(to right, transparent, $layer);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
[dir='rtl'] .#{$prefix}--snippet__overflow-indicator--right {
|
|
485
|
+
background-image: linear-gradient(to left, transparent, $layer);
|
|
471
486
|
}
|
|
472
487
|
|
|
473
488
|
.#{$prefix}--snippet--single .#{$prefix}--snippet__overflow-indicator--right,
|
|
474
489
|
.#{$prefix}--snippet--single .#{$prefix}--snippet__overflow-indicator--left {
|
|
475
490
|
position: absolute;
|
|
476
|
-
|
|
477
|
-
|
|
491
|
+
block-size: calc(100% - #{$spacing-02});
|
|
492
|
+
inline-size: $spacing-07;
|
|
478
493
|
}
|
|
479
494
|
|
|
480
495
|
.#{$prefix}--snippet--single .#{$prefix}--snippet__overflow-indicator--right {
|
|
481
|
-
|
|
496
|
+
inset-inline-end: $spacing-08;
|
|
482
497
|
}
|
|
483
498
|
|
|
484
499
|
.#{$prefix}--snippet--single.#{$prefix}--snippet--no-copy
|
|
485
500
|
.#{$prefix}--snippet__overflow-indicator--right {
|
|
486
|
-
|
|
501
|
+
inset-inline-end: 0;
|
|
487
502
|
}
|
|
488
503
|
|
|
489
504
|
.#{$prefix}--snippet--single
|
|
490
505
|
.#{$prefix}--snippet-container:focus
|
|
491
506
|
~ .#{$prefix}--snippet__overflow-indicator--right {
|
|
492
|
-
|
|
507
|
+
inset-inline-end: calc(#{$spacing-08} + #{convert.to-rem(2px)});
|
|
493
508
|
}
|
|
494
509
|
|
|
495
510
|
.#{$prefix}--snippet--single
|
|
496
511
|
.#{$prefix}--snippet-container:focus
|
|
497
512
|
+ .#{$prefix}--snippet__overflow-indicator--left {
|
|
498
|
-
|
|
513
|
+
inset-inline-start: convert.to-rem(2px);
|
|
499
514
|
}
|
|
500
515
|
|
|
501
516
|
.#{$prefix}--snippet--light .#{$prefix}--snippet__overflow-indicator--left {
|
|
@@ -509,7 +524,7 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
509
524
|
// Safari-only media query
|
|
510
525
|
// since fades won't appear correctly with CSS custom properties
|
|
511
526
|
// see: tabs, code snippet, and modal overflow indicators
|
|
512
|
-
@media not all and (min-resolution
|
|
527
|
+
@media not all and (min-resolution >= 0.001dpcm) {
|
|
513
528
|
@supports (-webkit-appearance: none) and (stroke-color: transparent) {
|
|
514
529
|
.#{$prefix}--snippet__overflow-indicator--left {
|
|
515
530
|
background-image: linear-gradient(to left, rgba($layer, 0), $layer);
|
|
@@ -522,37 +537,37 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
522
537
|
}
|
|
523
538
|
|
|
524
539
|
.#{$prefix}--snippet--multi.#{$prefix}--skeleton {
|
|
525
|
-
|
|
540
|
+
block-size: convert.to-rem(98px);
|
|
526
541
|
}
|
|
527
542
|
|
|
528
543
|
.#{$prefix}--snippet--single.#{$prefix}--skeleton {
|
|
529
|
-
|
|
544
|
+
block-size: convert.to-rem(56px);
|
|
530
545
|
}
|
|
531
546
|
|
|
532
547
|
.#{$prefix}--snippet.#{$prefix}--skeleton span {
|
|
533
548
|
@include skeleton;
|
|
534
549
|
|
|
535
550
|
display: block;
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
margin-
|
|
551
|
+
block-size: 1rem;
|
|
552
|
+
inline-size: 100%;
|
|
553
|
+
margin-block-start: 0.5rem;
|
|
539
554
|
|
|
540
555
|
&:first-child {
|
|
541
556
|
margin: 0;
|
|
542
557
|
}
|
|
543
558
|
|
|
544
559
|
&:nth-child(2) {
|
|
545
|
-
|
|
560
|
+
inline-size: 85%;
|
|
546
561
|
}
|
|
547
562
|
|
|
548
563
|
&:nth-child(3) {
|
|
549
|
-
|
|
564
|
+
inline-size: 95%;
|
|
550
565
|
}
|
|
551
566
|
}
|
|
552
567
|
|
|
553
568
|
.#{$prefix}--snippet--single.#{$prefix}--skeleton
|
|
554
569
|
.#{$prefix}--snippet-container {
|
|
555
|
-
padding-
|
|
570
|
+
padding-block-end: 0;
|
|
556
571
|
}
|
|
557
572
|
|
|
558
573
|
// Windows HCM fix
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
.#{$prefix}--combo-box.#{$prefix}--list-box--expanded
|
|
31
31
|
.#{$prefix}--text-input {
|
|
32
|
-
border-
|
|
32
|
+
border-block-end-color: $border-subtle;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.#{$prefix}--combo-box--input--focus.#{$prefix}--text-input {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.#{$prefix}--combo-box--readonly .#{$prefix}--text-input {
|
|
58
|
-
border-
|
|
58
|
+
border-block-end-color: $border-subtle;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.#{$prefix}--combo-box--readonly .#{$prefix}--list-box__menu-icon,
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
@each $size, $trigger in $triggerSizes {
|
|
30
30
|
.#{$prefix}--combo-button__container--#{$size}
|
|
31
31
|
.#{$prefix}--combo-button__primary-action {
|
|
32
|
-
min-
|
|
32
|
+
min-inline-size: 10rem - convert.to-rem(1px) - $trigger;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.#{$prefix}--combo-button__primary-action .#{$prefix}--btn {
|
|
37
|
-
|
|
37
|
+
inline-size: 100%;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.#{$prefix}--combo-button__trigger svg {
|