@carbon/styles 1.35.0 → 1.36.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 +76 -55
- package/css/styles.min.css +1 -1
- package/package.json +6 -6
- package/scss/_layout.scss +7 -7
- package/scss/components/breadcrumb/_breadcrumb.scss +6 -6
- package/scss/components/button/_button.scss +27 -18
- package/scss/components/button/_mixins.scss +15 -10
- package/scss/components/checkbox/_checkbox.scss +22 -21
- package/scss/components/code-snippet/_code-snippet.scss +15 -15
- package/scss/components/code-snippet/_mixins.scss +2 -2
- package/scss/components/combo-button/_combo-button.scss +6 -6
- package/scss/components/contained-list/_contained-list.scss +0 -1
- package/scss/components/content-switcher/_content-switcher.scss +19 -19
- package/scss/components/copy-button/_copy-button.scss +0 -1
- package/scss/components/data-table/_data-table.scss +62 -62
- package/scss/components/data-table/_mixins.scss +3 -2
- package/scss/components/data-table/action/_data-table-action.scss +28 -28
- package/scss/components/data-table/expandable/_data-table-expandable.scss +11 -11
- package/scss/components/data-table/skeleton/_data-table-skeleton.scss +7 -7
- package/scss/components/data-table/sort/_data-table-sort.scss +13 -13
- package/scss/components/date-picker/_date-picker.scss +11 -11
- package/scss/components/date-picker/_flatpickr.scss +30 -30
- package/scss/components/dropdown/_dropdown.scss +30 -30
- package/scss/components/file-uploader/_file-uploader.scss +13 -13
- package/scss/components/fluid-combo-box/_fluid-combo-box.scss +4 -4
- package/scss/components/fluid-date-picker/_fluid-date-picker.scss +19 -19
- package/scss/components/fluid-dropdown/_fluid-dropdown.scss +0 -1
- package/scss/components/fluid-list-box/_fluid-list-box.scss +13 -13
- package/scss/components/fluid-multiselect/_fluid-multiselect.scss +0 -1
- package/scss/components/fluid-number-input/_fluid-number-input.scss +14 -13
- package/scss/components/fluid-search/_fluid-search.scss +15 -14
- package/scss/components/fluid-select/_fluid-select.scss +9 -8
- package/scss/components/fluid-text-area/_fluid-text-area.scss +7 -7
- package/scss/components/fluid-text-input/_fluid-text-input.scss +14 -14
- package/scss/components/fluid-time-picker/_fluid-time-picker.scss +5 -5
- package/scss/components/form/_form.scss +5 -5
- package/scss/components/inline-loading/_inline-loading.scss +3 -3
- package/scss/components/list/_list.scss +2 -2
- package/scss/components/list-box/_list-box.scss +50 -50
- package/scss/components/loading/_loading.scss +2 -2
- package/scss/components/menu/_menu.scss +2 -2
- package/scss/components/menu-button/_menu-button.scss +0 -1
- package/scss/components/modal/_modal.scss +32 -10
- package/scss/components/multiselect/_multiselect.scss +3 -3
- package/scss/components/notification/_actionable-notification.scss +22 -20
- package/scss/components/notification/_inline-notification.scss +16 -16
- package/scss/components/notification/_toast-notification.scss +8 -8
- package/scss/components/number-input/_number-input.scss +36 -35
- package/scss/components/overflow-menu/_overflow-menu.scss +30 -30
- package/scss/components/pagination/_pagination.scss +17 -17
- package/scss/components/pagination/_unstable_pagination.scss +8 -8
- package/scss/components/pagination-nav/_pagination-nav.scss +0 -1
- package/scss/components/popover/_popover.scss +55 -45
- package/scss/components/progress-bar/_progress-bar.scss +6 -6
- package/scss/components/progress-indicator/_progress-indicator.scss +21 -21
- package/scss/components/radio-button/_radio-button.scss +10 -9
- package/scss/components/search/_search.scss +20 -20
- package/scss/components/select/_select.scss +8 -8
- package/scss/components/skeleton-styles/_skeleton-styles.scss +5 -5
- package/scss/components/slider/_slider.scss +15 -14
- package/scss/components/structured-list/_structured-list.scss +2 -2
- package/scss/components/tabs/_tabs.scss +8 -8
- package/scss/components/tag/_tag.scss +11 -11
- package/scss/components/text-area/_text-area.scss +4 -4
- package/scss/components/text-input/_text-input.scss +17 -17
- package/scss/components/tile/_tile.scss +9 -9
- package/scss/components/time-picker/_time-picker.scss +7 -7
- package/scss/components/toggle/_toggle.scss +27 -27
- package/scss/components/toggletip/_toggletip.scss +4 -1
- package/scss/components/tooltip/_tooltip.scss +7 -7
- package/scss/components/treeview/_treeview.scss +9 -9
- package/scss/components/ui-shell/header/_header.scss +7 -7
- package/scss/components/ui-shell/side-nav/_side-nav.scss +10 -10
- package/scss/components/ui-shell/switcher/_switcher.scss +3 -3
- package/scss/utilities/_convert.scss +15 -0
- package/scss/utilities/_tooltip.scss +36 -20
|
@@ -125,8 +125,8 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
125
125
|
.#{$prefix}--tile--clickable.#{$prefix}--link--disabled
|
|
126
126
|
.#{$prefix}--tile--disabled-icon {
|
|
127
127
|
position: absolute;
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
inset-block-end: layout.density('padding-inline');
|
|
129
|
+
inset-inline-end: layout.density('padding-inline');
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
.#{$prefix}--tile--clickable .#{$prefix}--tile--icon {
|
|
@@ -157,11 +157,11 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
157
157
|
|
|
158
158
|
.#{$prefix}--tile__checkmark {
|
|
159
159
|
position: absolute;
|
|
160
|
-
top: layout.density('padding-inline');
|
|
161
|
-
right: layout.density('padding-inline');
|
|
162
160
|
height: 1rem;
|
|
163
161
|
border: none;
|
|
164
162
|
background: transparent;
|
|
163
|
+
inset-block-start: layout.density('padding-inline');
|
|
164
|
+
inset-inline-end: layout.density('padding-inline');
|
|
165
165
|
opacity: 0;
|
|
166
166
|
transition: $duration-fast-02 motion(standard, productive);
|
|
167
167
|
|
|
@@ -181,13 +181,13 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
181
181
|
|
|
182
182
|
.#{$prefix}--tile__chevron {
|
|
183
183
|
position: absolute;
|
|
184
|
-
right: 0;
|
|
185
|
-
bottom: 0;
|
|
186
184
|
display: flex;
|
|
187
185
|
width: $-icon-container-size;
|
|
188
186
|
height: $-icon-container-size;
|
|
189
187
|
align-items: center;
|
|
190
188
|
justify-content: center;
|
|
189
|
+
inset-block-end: 0;
|
|
190
|
+
inset-inline-end: 0;
|
|
191
191
|
|
|
192
192
|
svg {
|
|
193
193
|
fill: $icon-primary;
|
|
@@ -211,13 +211,13 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
211
211
|
@include button-reset.reset;
|
|
212
212
|
|
|
213
213
|
position: absolute;
|
|
214
|
-
right: 0;
|
|
215
|
-
bottom: 0;
|
|
216
214
|
display: flex;
|
|
217
215
|
width: $-icon-container-size;
|
|
218
216
|
height: $-icon-container-size;
|
|
219
217
|
align-items: center;
|
|
220
218
|
justify-content: center;
|
|
219
|
+
inset-block-end: 0;
|
|
220
|
+
inset-inline-end: 0;
|
|
221
221
|
|
|
222
222
|
&:focus {
|
|
223
223
|
outline: 2px solid $focus;
|
|
@@ -239,7 +239,7 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
239
239
|
cursor: pointer;
|
|
240
240
|
font-family: inherit;
|
|
241
241
|
font-size: inherit;
|
|
242
|
-
text-align:
|
|
242
|
+
text-align: start;
|
|
243
243
|
transition: max-height $duration-moderate-01 motion(standard, productive);
|
|
244
244
|
|
|
245
245
|
@include type-style('body-compact-01');
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
@use '../../spacing' as *;
|
|
13
13
|
@use '../../theme' as *;
|
|
14
14
|
@use '../../type' as *;
|
|
15
|
-
@use '../../utilities/convert'
|
|
15
|
+
@use '../../utilities/convert';
|
|
16
16
|
@use '../../utilities/focus-outline' as *;
|
|
17
17
|
@use '../../utilities/placeholder-colors' as *;
|
|
18
18
|
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
.#{$prefix}--time-picker .#{$prefix}--select-input {
|
|
58
58
|
width: auto;
|
|
59
59
|
min-width: auto;
|
|
60
|
-
padding-right: rem(48px);
|
|
60
|
+
padding-right: convert.to-rem(48px);
|
|
61
61
|
margin: 0;
|
|
62
62
|
line-height: 1;
|
|
63
63
|
}
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
|
|
69
69
|
display: flex;
|
|
70
70
|
width: 4.875rem;
|
|
71
|
-
height: rem(40px);
|
|
71
|
+
height: convert.to-rem(40px);
|
|
72
72
|
align-items: center;
|
|
73
73
|
transition: outline $duration-fast-01 motion(standard, productive),
|
|
74
74
|
background-color $duration-fast-01 motion(standard, productive);
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
|
|
102
102
|
.#{$prefix}--time-picker--sm .#{$prefix}--select-input,
|
|
103
103
|
.#{$prefix}--time-picker--sm .#{$prefix}--time-picker__input-field {
|
|
104
|
-
height: rem(32px);
|
|
105
|
-
max-height: rem(32px);
|
|
104
|
+
height: convert.to-rem(32px);
|
|
105
|
+
max-height: convert.to-rem(32px);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.#{$prefix}--time-picker--lg .#{$prefix}--select-input,
|
|
109
109
|
.#{$prefix}--time-picker--lg .#{$prefix}--time-picker__input-field {
|
|
110
|
-
height: rem(48px);
|
|
111
|
-
max-height: rem(48px);
|
|
110
|
+
height: convert.to-rem(48px);
|
|
111
|
+
max-height: convert.to-rem(48px);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// readonly
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
@use '../../theme' as *;
|
|
12
12
|
@use '../../type' as *;
|
|
13
13
|
@use '../button/tokens' as button;
|
|
14
|
-
@use '../../utilities/convert'
|
|
14
|
+
@use '../../utilities/convert';
|
|
15
15
|
@use '../../utilities/high-contrast-mode' as *;
|
|
16
16
|
@use '../../utilities/visually-hidden' as *;
|
|
17
17
|
@use '../../utilities/skeleton' as *;
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
|
|
52
52
|
.#{$prefix}--toggle__switch {
|
|
53
53
|
position: relative;
|
|
54
|
-
width: rem(48px);
|
|
55
|
-
height: rem(24px);
|
|
54
|
+
width: convert.to-rem(48px);
|
|
55
|
+
height: convert.to-rem(24px);
|
|
56
56
|
background-color: $toggle-off;
|
|
57
|
-
border-radius: rem(12px);
|
|
57
|
+
border-radius: convert.to-rem(12px);
|
|
58
58
|
transition: background-color $duration-fast-01 motion(exit, productive);
|
|
59
59
|
|
|
60
60
|
&::before {
|
|
61
61
|
position: absolute;
|
|
62
|
-
top: rem(3px);
|
|
63
|
-
left: rem(3px);
|
|
64
|
-
width: rem(18px);
|
|
65
|
-
height: rem(18px);
|
|
62
|
+
top: convert.to-rem(3px);
|
|
63
|
+
left: convert.to-rem(3px);
|
|
64
|
+
width: convert.to-rem(18px);
|
|
65
|
+
height: convert.to-rem(18px);
|
|
66
66
|
background-color: $icon-on-color;
|
|
67
67
|
border-radius: 50%;
|
|
68
68
|
content: '';
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
background-color: $support-success;
|
|
87
87
|
|
|
88
88
|
&::before {
|
|
89
|
-
transform: translateX(rem(24px));
|
|
89
|
+
transform: translateX(convert.to-rem(24px));
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -97,26 +97,26 @@
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.#{$prefix}--toggle__appearance--sm .#{$prefix}--toggle__switch {
|
|
100
|
-
width: rem(32px);
|
|
101
|
-
height: rem(16px);
|
|
100
|
+
width: convert.to-rem(32px);
|
|
101
|
+
height: convert.to-rem(16px);
|
|
102
102
|
|
|
103
103
|
&::before {
|
|
104
|
-
width: rem(10px);
|
|
105
|
-
height: rem(10px);
|
|
104
|
+
width: convert.to-rem(10px);
|
|
105
|
+
height: convert.to-rem(10px);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
.#{$prefix}--toggle__appearance--sm
|
|
110
110
|
.#{$prefix}--toggle__switch--checked::before {
|
|
111
|
-
transform: translateX(rem(16px));
|
|
111
|
+
transform: translateX(convert.to-rem(16px));
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
.#{$prefix}--toggle__check {
|
|
115
115
|
position: absolute;
|
|
116
|
-
top: rem(6px);
|
|
117
|
-
right: rem(5px);
|
|
118
|
-
width: rem(6px);
|
|
119
|
-
height: rem(5px);
|
|
116
|
+
top: convert.to-rem(6px);
|
|
117
|
+
right: convert.to-rem(5px);
|
|
118
|
+
width: convert.to-rem(6px);
|
|
119
|
+
height: convert.to-rem(5px);
|
|
120
120
|
fill: $support-success;
|
|
121
121
|
visibility: hidden;
|
|
122
122
|
}
|
|
@@ -162,15 +162,15 @@
|
|
|
162
162
|
background-color: transparent;
|
|
163
163
|
|
|
164
164
|
&::before {
|
|
165
|
-
top: rem(2px);
|
|
166
|
-
left: rem(2px);
|
|
165
|
+
top: convert.to-rem(2px);
|
|
166
|
+
left: convert.to-rem(2px);
|
|
167
167
|
background-color: $text-primary;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
.#{$prefix}--toggle--readonly .#{$prefix}--toggle__check {
|
|
172
|
-
top: rem(5px);
|
|
173
|
-
right: rem(4px);
|
|
172
|
+
top: convert.to-rem(5px);
|
|
173
|
+
right: convert.to-rem(4px);
|
|
174
174
|
fill: $background;
|
|
175
175
|
}
|
|
176
176
|
|
|
@@ -204,16 +204,16 @@
|
|
|
204
204
|
.#{$prefix}--toggle--skeleton .#{$prefix}--toggle__skeleton-circle {
|
|
205
205
|
@include circular-skeleton;
|
|
206
206
|
|
|
207
|
-
width: rem(18px);
|
|
208
|
-
height: rem(18px);
|
|
207
|
+
width: convert.to-rem(18px);
|
|
208
|
+
height: convert.to-rem(18px);
|
|
209
209
|
border-radius: 50%;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
.#{$prefix}--toggle--skeleton .#{$prefix}--toggle__skeleton-rectangle {
|
|
213
213
|
@include skeleton;
|
|
214
214
|
|
|
215
|
-
width: rem(24px);
|
|
216
|
-
height: rem(8px);
|
|
217
|
-
margin-left: rem(8px);
|
|
215
|
+
width: convert.to-rem(24px);
|
|
216
|
+
height: convert.to-rem(8px);
|
|
217
|
+
margin-left: convert.to-rem(8px);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
@@ -34,7 +34,7 @@ $tooltip-padding-inline: custom-property.get-var(
|
|
|
34
34
|
.#{$prefix}--tooltip-content {
|
|
35
35
|
@include type.type-style('body-01');
|
|
36
36
|
|
|
37
|
-
max-width: convert.rem(288px);
|
|
37
|
+
max-width: convert.to-rem(288px);
|
|
38
38
|
padding: $tooltip-padding-block $tooltip-padding-inline;
|
|
39
39
|
|
|
40
40
|
color: theme.$text-inverse;
|
|
@@ -64,8 +64,8 @@ $tooltip-padding-inline: custom-property.get-var(
|
|
|
64
64
|
.#{$prefix}--definition-tooltip {
|
|
65
65
|
@include type.type-style('body-01');
|
|
66
66
|
|
|
67
|
-
max-width: convert.rem(176px);
|
|
68
|
-
padding: convert.rem(8px) convert.rem(16px);
|
|
67
|
+
max-width: convert.to-rem(176px);
|
|
68
|
+
padding: convert.to-rem(8px) convert.to-rem(16px);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -73,17 +73,17 @@ $tooltip-padding-inline: custom-property.get-var(
|
|
|
73
73
|
.#{$prefix}--icon-tooltip {
|
|
74
74
|
@include custom-property.declaration(
|
|
75
75
|
'tooltip-padding-block',
|
|
76
|
-
convert.rem(2px)
|
|
76
|
+
convert.to-rem(2px)
|
|
77
77
|
);
|
|
78
78
|
@include custom-property.declaration(
|
|
79
79
|
'popover-caret-width',
|
|
80
|
-
convert.rem(8px)
|
|
80
|
+
convert.to-rem(8px)
|
|
81
81
|
);
|
|
82
82
|
@include custom-property.declaration(
|
|
83
83
|
'popover-caret-height',
|
|
84
|
-
convert.rem(4px)
|
|
84
|
+
convert.to-rem(4px)
|
|
85
85
|
);
|
|
86
|
-
@include custom-property.declaration('popover-offset', convert.rem(8px));
|
|
86
|
+
@include custom-property.declaration('popover-offset', convert.to-rem(8px));
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.#{$prefix}--icon-tooltip .#{$prefix}--tooltip-content {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
@use '../../spacing' as *;
|
|
12
12
|
@use '../../theme' as *;
|
|
13
13
|
@use '../../type' as *;
|
|
14
|
-
@use '../../utilities/convert'
|
|
14
|
+
@use '../../utilities/convert';
|
|
15
15
|
@use '../../utilities/component-reset';
|
|
16
16
|
@use '../../utilities/focus-outline' as *;
|
|
17
17
|
@use '../../utilities/skeleton' as *;
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
@include type-style('body-compact-01');
|
|
89
89
|
|
|
90
90
|
display: flex;
|
|
91
|
-
min-height: rem(32px);
|
|
91
|
+
min-height: convert.to-rem(32px);
|
|
92
92
|
flex: 1;
|
|
93
93
|
align-items: center;
|
|
94
94
|
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
.#{$prefix}--tree-node:not(.#{$prefix}--tree-parent-node)
|
|
102
102
|
.#{$prefix}--tree-node__label {
|
|
103
103
|
// (min-height 32px - single line text height 18px) / 2 = 7px
|
|
104
|
-
padding-top: rem(7px);
|
|
105
|
-
padding-bottom: rem(7px);
|
|
104
|
+
padding-top: convert.to-rem(7px);
|
|
105
|
+
padding-bottom: convert.to-rem(7px);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.#{$prefix}--tree-node__label:hover .#{$prefix}--tree-node__label__details {
|
|
@@ -140,8 +140,8 @@
|
|
|
140
140
|
|
|
141
141
|
.#{$prefix}--tree-parent-node__toggle {
|
|
142
142
|
display: flex;
|
|
143
|
-
width: rem(24px);
|
|
144
|
-
height: rem(24px);
|
|
143
|
+
width: convert.to-rem(24px);
|
|
144
|
+
height: convert.to-rem(24px);
|
|
145
145
|
align-items: center;
|
|
146
146
|
align-self: flex-start;
|
|
147
147
|
padding-left: $spacing-02;
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
min-width: 1rem;
|
|
174
174
|
min-height: 1rem;
|
|
175
175
|
align-self: flex-start;
|
|
176
|
-
margin-top: rem(1px);
|
|
176
|
+
margin-top: convert.to-rem(1px);
|
|
177
177
|
margin-right: $spacing-03;
|
|
178
178
|
margin-left: $spacing-03;
|
|
179
179
|
fill: $icon-secondary;
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
position: absolute;
|
|
211
211
|
top: 0;
|
|
212
212
|
left: 0;
|
|
213
|
-
width: rem(4px);
|
|
213
|
+
width: convert.to-rem(4px);
|
|
214
214
|
height: 100%;
|
|
215
215
|
background-color: $interactive;
|
|
216
216
|
content: '';
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
|
|
220
220
|
// xs size variant
|
|
221
221
|
.#{$prefix}--tree--xs .#{$prefix}--tree-node__label {
|
|
222
|
-
min-height: rem(24px);
|
|
222
|
+
min-height: convert.to-rem(24px);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
.#{$prefix}--tree--xs
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@use '../../../type' as *;
|
|
18
18
|
@use '../../../utilities/button-reset';
|
|
19
19
|
@use '../../../utilities/component-reset';
|
|
20
|
-
@use '../../../utilities/convert'
|
|
20
|
+
@use '../../../utilities/convert';
|
|
21
21
|
@use '../../../utilities/z-index' as *;
|
|
22
22
|
|
|
23
23
|
/// UI shell header
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
display: inline-flex;
|
|
46
46
|
width: mini-units(6);
|
|
47
47
|
height: mini-units(6);
|
|
48
|
-
border: rem(1px) solid transparent;
|
|
48
|
+
border: convert.to-rem(1px) solid transparent;
|
|
49
49
|
transition: background-color $duration-fast-02,
|
|
50
50
|
border-color $duration-fast-02;
|
|
51
51
|
@include breakpoint-down('md') {
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
height: 100%;
|
|
147
147
|
align-items: center;
|
|
148
148
|
padding: 0 mini-units(4) 0 mini-units(2);
|
|
149
|
-
border: rem(2px) solid transparent;
|
|
149
|
+
border: convert.to-rem(2px) solid transparent;
|
|
150
150
|
font-weight: 600;
|
|
151
151
|
letter-spacing: 0.1px;
|
|
152
152
|
line-height: 1.25rem;
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
|
|
176
176
|
.#{$prefix}--header__menu-toggle:not(.#{$prefix}--header__menu-toggle__hidden)
|
|
177
177
|
~ .#{$prefix}--header__name {
|
|
178
|
-
padding-left: rem(8px);
|
|
178
|
+
padding-left: convert.to-rem(8px);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
//--------------------------------------------------------------------------
|
|
@@ -197,8 +197,8 @@
|
|
|
197
197
|
top: 50%;
|
|
198
198
|
left: 0;
|
|
199
199
|
display: block;
|
|
200
|
-
width: rem(1px);
|
|
201
|
-
height: rem(24px);
|
|
200
|
+
width: convert.to-rem(1px);
|
|
201
|
+
height: convert.to-rem(24px);
|
|
202
202
|
background-color: $border-subtle;
|
|
203
203
|
content: '';
|
|
204
204
|
transform: translateY(-50%);
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
background-color: $background;
|
|
228
228
|
color: $text-secondary;
|
|
229
229
|
// Text styles
|
|
230
|
-
font-size: rem(14px);
|
|
230
|
+
font-size: convert.to-rem(14px);
|
|
231
231
|
font-weight: 400;
|
|
232
232
|
letter-spacing: 0;
|
|
233
233
|
line-height: 1.125rem;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
@use '../../../type' as *;
|
|
17
17
|
@use '../../../utilities/button-reset';
|
|
18
18
|
@use '../../../utilities/component-reset';
|
|
19
|
-
@use '../../../utilities/convert'
|
|
19
|
+
@use '../../../utilities/convert';
|
|
20
20
|
@use '../../../utilities/focus-outline' as *;
|
|
21
21
|
@use '../../../utilities/high-contrast-mode' as *;
|
|
22
22
|
@use '../../../utilities/z-index' as *;
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
.#{$prefix}--side-nav__overlay {
|
|
78
78
|
position: fixed;
|
|
79
|
-
top: rem(48px);
|
|
79
|
+
top: convert.to-rem(48px);
|
|
80
80
|
left: 0;
|
|
81
81
|
width: 0;
|
|
82
82
|
height: 0;
|
|
@@ -234,8 +234,8 @@
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
.#{$prefix}--side-nav__submenu-chevron > svg {
|
|
237
|
-
width: rem(16px);
|
|
238
|
-
height: rem(16px);
|
|
237
|
+
width: convert.to-rem(16px);
|
|
238
|
+
height: convert.to-rem(16px);
|
|
239
239
|
transition: transform $duration-fast-02;
|
|
240
240
|
}
|
|
241
241
|
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
|
|
292
292
|
.#{$prefix}--side-nav__submenu[aria-expanded='true']
|
|
293
293
|
+ .#{$prefix}--side-nav__menu {
|
|
294
|
-
max-height: rem(1500px);
|
|
294
|
+
max-height: convert.to-rem(1500px);
|
|
295
295
|
visibility: inherit;
|
|
296
296
|
}
|
|
297
297
|
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
@include text-overflow();
|
|
350
350
|
|
|
351
351
|
color: $text-secondary;
|
|
352
|
-
font-size: rem(14px);
|
|
352
|
+
font-size: convert.to-rem(14px);
|
|
353
353
|
letter-spacing: 0.1px;
|
|
354
354
|
line-height: 1.25rem;
|
|
355
355
|
user-select: none;
|
|
@@ -453,16 +453,16 @@
|
|
|
453
453
|
@include breakpoint-down('lg') {
|
|
454
454
|
position: relative;
|
|
455
455
|
display: block;
|
|
456
|
-
margin-bottom: rem(32px);
|
|
456
|
+
margin-bottom: convert.to-rem(32px);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
.#{$prefix}--side-nav__header-divider::after {
|
|
461
461
|
position: absolute;
|
|
462
|
-
bottom: rem(-16px);
|
|
463
|
-
left: rem(16px);
|
|
462
|
+
bottom: convert.to-rem(-16px);
|
|
463
|
+
left: convert.to-rem(16px);
|
|
464
464
|
width: calc(100% - 32px);
|
|
465
|
-
height: rem(1px);
|
|
465
|
+
height: convert.to-rem(1px);
|
|
466
466
|
background: $border-subtle;
|
|
467
467
|
content: '';
|
|
468
468
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@use '../../../theme' as *;
|
|
11
11
|
@use '../../../type' as *;
|
|
12
12
|
@use '../../../utilities/component-reset';
|
|
13
|
-
@use '../../../utilities/convert'
|
|
13
|
+
@use '../../../utilities/convert';
|
|
14
14
|
|
|
15
15
|
/// UI shell side nav
|
|
16
16
|
/// @access private
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
.#{$prefix}--switcher__item--divider {
|
|
42
42
|
display: block;
|
|
43
|
-
width: rem(224px);
|
|
43
|
+
width: convert.to-rem(224px);
|
|
44
44
|
height: 1px;
|
|
45
45
|
border: none;
|
|
46
46
|
margin: $spacing-03 $spacing-05;
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
display: block;
|
|
54
54
|
height: $spacing-07;
|
|
55
|
-
padding: rem(6px) $spacing-05;
|
|
55
|
+
padding: convert.to-rem(6px) $spacing-05;
|
|
56
56
|
color: $text-secondary;
|
|
57
57
|
text-decoration: none;
|
|
58
58
|
|
|
@@ -18,6 +18,21 @@ $base-font-size: 16px !default;
|
|
|
18
18
|
/// @return {Number} Number with rem unit
|
|
19
19
|
/// @access public
|
|
20
20
|
/// @group utilities
|
|
21
|
+
@function to-rem($px) {
|
|
22
|
+
@if unit($px) != 'px' {
|
|
23
|
+
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@return math.div($px, $base-font-size) * 1rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/// This function causes an error when using sass > 1.65.0
|
|
30
|
+
/// Replaced with `to-rem` function
|
|
31
|
+
/// @param {Number} $px - Number with px unit
|
|
32
|
+
/// @return {Number} Number with rem unit
|
|
33
|
+
/// @access public
|
|
34
|
+
/// @deprecated
|
|
35
|
+
/// @group @carbon/layout
|
|
21
36
|
@function rem($px) {
|
|
22
37
|
@if unit($px) != 'px' {
|
|
23
38
|
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
@use 'box-shadow' as *;
|
|
9
|
-
@use 'convert'
|
|
9
|
+
@use 'convert';
|
|
10
10
|
@use 'focus-outline' as *;
|
|
11
11
|
@use 'z-index' as *;
|
|
12
12
|
@use '../config' as *;
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
|
|
38
38
|
z-index: z('floating');
|
|
39
39
|
width: max-content;
|
|
40
|
-
min-width: rem(24px);
|
|
41
|
-
max-width: rem(208px);
|
|
40
|
+
min-width: convert.to-rem(24px);
|
|
41
|
+
max-width: convert.to-rem(208px);
|
|
42
42
|
height: auto;
|
|
43
43
|
padding: if(
|
|
44
44
|
$tooltip-type == 'definition',
|
|
45
|
-
rem(8px) rem(16px),
|
|
46
|
-
rem(3px) rem(16px)
|
|
45
|
+
convert.to-rem(8px) convert.to-rem(16px),
|
|
46
|
+
convert.to-rem(3px) convert.to-rem(16px)
|
|
47
47
|
);
|
|
48
48
|
background-color: $background-inverse;
|
|
49
|
-
border-radius: rem(2px);
|
|
49
|
+
border-radius: convert.to-rem(2px);
|
|
50
50
|
color: $text-inverse;
|
|
51
51
|
font-weight: 400;
|
|
52
52
|
text-align: left;
|
|
@@ -232,11 +232,15 @@
|
|
|
232
232
|
$align: 'center'
|
|
233
233
|
) {
|
|
234
234
|
// position and alignment
|
|
235
|
-
$caret-spacing: if(
|
|
235
|
+
$caret-spacing: if(
|
|
236
|
+
$tooltip-type == 'definition',
|
|
237
|
+
convert.to-rem(4px),
|
|
238
|
+
convert.to-rem(8px)
|
|
239
|
+
);
|
|
236
240
|
|
|
237
241
|
// space between caret and trigger button
|
|
238
|
-
$caret-height: rem(5px);
|
|
239
|
-
$caret-width: rem(8px);
|
|
242
|
+
$caret-height: convert.to-rem(5px);
|
|
243
|
+
$caret-width: convert.to-rem(8px);
|
|
240
244
|
$body-spacing: $caret-spacing + $caret-height;
|
|
241
245
|
|
|
242
246
|
// Use pseudo element to create invisible hover area to keep tooltip open on hover
|
|
@@ -249,26 +253,26 @@
|
|
|
249
253
|
@if ($position == 'top' or $position == 'bottom') {
|
|
250
254
|
left: 0;
|
|
251
255
|
width: 100%;
|
|
252
|
-
height: rem(12px);
|
|
256
|
+
height: convert.to-rem(12px);
|
|
253
257
|
}
|
|
254
258
|
|
|
255
259
|
@if ($position == 'left' or $position == 'right') {
|
|
256
260
|
top: 0;
|
|
257
|
-
width: rem(12px);
|
|
261
|
+
width: convert.to-rem(12px);
|
|
258
262
|
height: 100%;
|
|
259
263
|
}
|
|
260
264
|
|
|
261
265
|
@if ($position == 'top') {
|
|
262
|
-
bottom: rem(-12px);
|
|
266
|
+
bottom: convert.to-rem(-12px);
|
|
263
267
|
}
|
|
264
268
|
@if ($position == 'right') {
|
|
265
|
-
left: rem(-12px);
|
|
269
|
+
left: convert.to-rem(-12px);
|
|
266
270
|
}
|
|
267
271
|
@if ($position == 'bottom') {
|
|
268
|
-
top: rem(-12px);
|
|
272
|
+
top: convert.to-rem(-12px);
|
|
269
273
|
}
|
|
270
274
|
@if ($position == 'left') {
|
|
271
|
-
right: rem(-12px);
|
|
275
|
+
right: convert.to-rem(-12px);
|
|
272
276
|
}
|
|
273
277
|
}
|
|
274
278
|
|
|
@@ -298,25 +302,37 @@
|
|
|
298
302
|
&::before {
|
|
299
303
|
@if ($position == 'top') {
|
|
300
304
|
top: -$caret-spacing;
|
|
301
|
-
border-width: rem(5px)
|
|
305
|
+
border-width: convert.to-rem(5px)
|
|
306
|
+
convert.to-rem(4px)
|
|
307
|
+
0
|
|
308
|
+
convert.to-rem(4px);
|
|
302
309
|
border-color: $background-inverse transparent transparent transparent;
|
|
303
310
|
transform: translate(-50%, -100%);
|
|
304
311
|
}
|
|
305
312
|
@if ($position == 'right') {
|
|
306
313
|
right: -$caret-spacing;
|
|
307
|
-
border-width: rem(4px)
|
|
314
|
+
border-width: convert.to-rem(4px)
|
|
315
|
+
convert.to-rem(5px)
|
|
316
|
+
convert.to-rem(4px)
|
|
317
|
+
0;
|
|
308
318
|
border-color: transparent $background-inverse transparent transparent;
|
|
309
319
|
transform: translate(100%, -50%);
|
|
310
320
|
}
|
|
311
321
|
@if ($position == 'bottom') {
|
|
312
322
|
bottom: -$caret-spacing;
|
|
313
|
-
border-width: 0
|
|
323
|
+
border-width: 0
|
|
324
|
+
convert.to-rem(4px)
|
|
325
|
+
convert.to-rem(5px)
|
|
326
|
+
convert.to-rem(4px);
|
|
314
327
|
border-color: transparent transparent $background-inverse transparent;
|
|
315
328
|
transform: translate(-50%, 100%);
|
|
316
329
|
}
|
|
317
330
|
@if ($position == 'left') {
|
|
318
331
|
left: -$caret-spacing;
|
|
319
|
-
border-width: rem(4px)
|
|
332
|
+
border-width: convert.to-rem(4px)
|
|
333
|
+
0
|
|
334
|
+
convert.to-rem(4px)
|
|
335
|
+
convert.to-rem(5px);
|
|
320
336
|
border-color: transparent transparent transparent $background-inverse;
|
|
321
337
|
transform: translate(-100%, -50%);
|
|
322
338
|
}
|
|
@@ -369,7 +385,7 @@
|
|
|
369
385
|
&.#{$prefix}--tooltip--a11y + .#{$prefix}--assistive-text {
|
|
370
386
|
@if ($position == 'bottom') {
|
|
371
387
|
// carryover from https://github.com/carbon-design-system/carbon/pull/3151/files#diff-93734be0784e9530b6d14a7b03b0d352R261-R265
|
|
372
|
-
bottom: -($body-spacing - rem(1px));
|
|
388
|
+
bottom: -($body-spacing - convert.to-rem(1px));
|
|
373
389
|
@if ($align == 'start' or $align == 'end') {
|
|
374
390
|
transform: translate(0, 100%);
|
|
375
391
|
} @else {
|