@carbon/styles 1.38.0 → 1.39.0-rc.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/styles",
3
3
  "description": "Styles for the Carbon Design System",
4
- "version": "1.38.0",
4
+ "version": "1.39.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -65,5 +65,5 @@
65
65
  "scss/**/*.css",
66
66
  "css/**/*.css"
67
67
  ],
68
- "gitHead": "33f414ff39064f1c432898ab8204b89b7b02cfb4"
68
+ "gitHead": "39b377be9e59d22de4a45c874227a6e2fe578557"
69
69
  }
@@ -23,7 +23,7 @@
23
23
 
24
24
  @mixin button {
25
25
  .#{$prefix}--btn {
26
- @include layout.use('size', $default: 'lg');
26
+ @include layout.use('size', $min: 'sm', $default: 'lg', $max: '2xl');
27
27
  @include layout.use('density', $default: 'normal');
28
28
 
29
29
  @include button-base;
@@ -48,9 +48,9 @@ $button-focus-color: custom-property.get-var('button-focus-color', $focus);
48
48
  display: inline-flex;
49
49
  flex-shrink: 0;
50
50
  justify-content: space-between;
51
+ border-radius: $button-border-radius;
51
52
  // Fix to remove added margins on buttons in safari (see #5155)
52
53
  margin: 0;
53
- border-radius: $button-border-radius;
54
54
  cursor: pointer;
55
55
  inline-size: max-content;
56
56
  max-inline-size: convert.to-rem(320px);
@@ -23,12 +23,12 @@
23
23
  // Spacing between checkboxes
24
24
  .#{$prefix}--form-item.#{$prefix}--checkbox-wrapper {
25
25
  position: relative;
26
- margin-block-end: $spacing-02;
26
+ margin-block-end: convert.to-rem(6px);
27
27
  }
28
28
 
29
29
  // Spacing above collection of checkboxes
30
30
  .#{$prefix}--form-item.#{$prefix}--checkbox-wrapper:first-of-type {
31
- margin-block-start: convert.to-rem(3px);
31
+ margin-block-start: 0;
32
32
  }
33
33
 
34
34
  // Shift collection of checkboxes up if label is present
@@ -61,15 +61,15 @@
61
61
  position: relative;
62
62
  display: flex;
63
63
  cursor: pointer;
64
- min-block-size: convert.to-rem(24px);
65
- padding-block-start: convert.to-rem(3px);
64
+ min-block-size: convert.to-rem(20px);
65
+ padding-block-start: convert.to-rem(2px);
66
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-inline-start: convert.to-rem(6px);
72
+ padding-inline-start: convert.to-rem(10px);
73
73
  }
74
74
 
75
75
  // Required because `$css--reset: true` cannot currently apply to this `::before` and `::after`
@@ -86,14 +86,11 @@
86
86
  // text overflows.
87
87
  position: absolute;
88
88
  border: 1px solid $icon-primary;
89
- // increase left margin for #6480
90
- margin: convert.to-rem(2px) convert.to-rem(2px) convert.to-rem(2px)
91
- convert.to-rem(3px);
89
+ border-radius: 2px;
92
90
 
93
91
  // Checkboxes with a background color look visually off against a parent container.
94
92
  background-color: transparent;
95
93
  block-size: convert.to-rem(16px);
96
- border-radius: 2px;
97
94
  content: '';
98
95
 
99
96
  // According to the spec, we'll want the bounding box for our checkbox to
@@ -102,6 +99,10 @@
102
99
  inline-size: convert.to-rem(16px);
103
100
  inset-block-start: convert.to-rem(2px);
104
101
  inset-inline-start: 0;
102
+
103
+ // increase left margin for #6480
104
+ margin-block: convert.to-rem(1px) convert.to-rem(2px);
105
+ margin-inline: convert.to-rem(3px) 0;
105
106
  }
106
107
 
107
108
  // Create the appearance of the check in the `after` pseudo-element
@@ -113,7 +114,7 @@
113
114
  border-inline-start: 1.5px solid $icon-inverse;
114
115
  content: '';
115
116
  inline-size: convert.to-rem(9px);
116
- inset-block-start: convert.to-rem(7.5px);
117
+ inset-block-start: convert.to-rem(6.5px);
117
118
  inset-inline-start: convert.to-rem(7px);
118
119
  margin-block-start: convert.to-rem(-3px);
119
120
  transform: scale(0) rotate(-45deg);
@@ -189,8 +190,8 @@
189
190
  //----------------------------------------------
190
191
  // Invalid + warn
191
192
  // ---------------------------------------------
192
- .#{$prefix}--checkbox-group[data-invalid] .cds--checkbox-label::before,
193
- .#{$prefix}--checkbox-wrapper--invalid .cds--checkbox-label::before,
193
+ .#{$prefix}--checkbox-group[data-invalid] .#{$prefix}--checkbox-label::before,
194
+ .#{$prefix}--checkbox-wrapper--invalid .#{$prefix}--checkbox-label::before,
194
195
  .#{$prefix}--checkbox-wrapper--invalid
195
196
  .#{$prefix}--checkbox:checked
196
197
  + .#{$prefix}--checkbox-label::before {
@@ -212,7 +213,7 @@
212
213
 
213
214
  .#{$prefix}--checkbox-group:not(.#{$prefix}--checkbox-group[data-invalid])
214
215
  .#{$prefix}--checkbox-wrapper--invalid
215
- .cds--checkbox-label::before,
216
+ .#{$prefix}--checkbox-label::before,
216
217
  .#{$prefix}--checkbox-group:not(.#{$prefix}--checkbox-group[data-invalid])
217
218
  .#{$prefix}--checkbox-wrapper--invalid
218
219
  .#{$prefix}--checkbox:checked
@@ -71,8 +71,8 @@ $copy-btn-feedback: $background-inverse !default;
71
71
  display: inline;
72
72
  padding: 0;
73
73
  border: 1px solid transparent;
74
- background-color: $layer;
75
74
  border-radius: 4px;
75
+ background-color: $layer;
76
76
  color: $text-primary;
77
77
  cursor: pointer;
78
78
 
@@ -367,9 +367,18 @@
367
367
  // Select
368
368
  //----------------------------------------------------------------------------
369
369
  .#{$prefix}--table-column-checkbox .#{$prefix}--checkbox-label {
370
+ min-block-size: $spacing-06;
370
371
  padding-inline-start: 0;
371
372
  }
372
373
 
374
+ .#{$prefix}--table-column-checkbox .#{$prefix}--checkbox-label::before {
375
+ margin-block-start: convert.to-rem(2px);
376
+ }
377
+
378
+ .#{$prefix}--table-column-checkbox .#{$prefix}--checkbox-label::after {
379
+ inset-block-start: convert.to-rem(7.5px);
380
+ }
381
+
373
382
  .#{$prefix}--data-table th.#{$prefix}--table-column-checkbox {
374
383
  // Do not use `position: relative`, as its behavior is undefined for many table elements: https://www.w3.org/TR/CSS21/visuren.html#propdef-position
375
384
  position: static;
@@ -95,8 +95,8 @@
95
95
  box-sizing: border-box;
96
96
  padding: 0;
97
97
  border: 0;
98
- animation: none;
99
98
  border-radius: 0;
99
+ animation: none;
100
100
  direction: ltr;
101
101
  inline-size: convert.to-rem(315px);
102
102
  max-block-size: 0;
@@ -464,9 +464,9 @@ $list-box-menu-width: convert.to-rem(300px);
464
464
  align-items: center;
465
465
  justify-content: space-between;
466
466
  padding: convert.to-rem(8px);
467
+ border-radius: convert.to-rem(12px);
467
468
  background-color: $background-inverse;
468
469
  block-size: convert.to-rem(24px);
469
- border-radius: convert.to-rem(12px);
470
470
  color: $text-inverse;
471
471
  inline-size: auto;
472
472
  inset-block-start: auto;
@@ -485,8 +485,8 @@ $list-box-menu-width: convert.to-rem(300px);
485
485
  margin-inline-start: convert.to-rem(4px);
486
486
 
487
487
  &:hover {
488
- background-color: $button-secondary-hover;
489
488
  border-radius: 50%;
489
+ background-color: $button-secondary-hover;
490
490
  }
491
491
  }
492
492
 
@@ -45,6 +45,7 @@
45
45
  display: inline-flex;
46
46
  box-sizing: border-box;
47
47
  border: 0;
48
+ border-radius: 0;
48
49
 
49
50
  // Firefox: Hide spinner (up and down buttons)
50
51
  -moz-appearance: textfield;
@@ -52,7 +53,6 @@
52
53
  background-color: $field;
53
54
  block-size: convert.to-rem(40px);
54
55
  border-block-end: convert.to-rem(1px) solid $border-strong;
55
- border-radius: 0;
56
56
  color: $text-primary;
57
57
  font-family: font-family('sans');
58
58
  font-weight: 400;
@@ -130,8 +130,8 @@ $popover-caret-height: custom-property.get-var(
130
130
  position: absolute;
131
131
  z-index: z('floating');
132
132
  display: none;
133
- background-color: $popover-background-color;
134
133
  border-radius: $popover-border-radius;
134
+ background-color: $popover-background-color;
135
135
  color: $popover-text-color;
136
136
  inline-size: max-content;
137
137
  max-inline-size: convert.to-rem(368px);
@@ -70,8 +70,8 @@ $progress-indicator-bar-width: 1px inset transparent !default;
70
70
  position: relative;
71
71
  z-index: 1;
72
72
  flex-shrink: 0;
73
- block-size: $spacing-05;
74
73
  border-radius: 50%;
74
+ block-size: $spacing-05;
75
75
  fill: $interactive;
76
76
  inline-size: $spacing-05;
77
77
  margin-block-start: convert.to-rem(10px);
@@ -54,7 +54,6 @@ $radio-border-width: 1px !default;
54
54
  }
55
55
 
56
56
  .#{$prefix}--radio-button__label {
57
- line-height: 1.25;
58
57
  margin-inline-end: 0;
59
58
  }
60
59
 
@@ -70,25 +69,32 @@ $radio-border-width: 1px !default;
70
69
  }
71
70
 
72
71
  .#{$prefix}--radio-button__label {
73
- @include type.type-style('body-compact-01');
74
-
75
72
  display: flex;
76
73
  align-items: center;
77
74
  cursor: pointer;
78
75
  margin-inline-end: $spacing-05;
79
76
  }
80
77
 
78
+ .#{$prefix}--radio-button__label-text {
79
+ @include type.type-style('body-compact-01');
80
+ }
81
+
81
82
  .#{$prefix}--radio-button__appearance {
82
83
  @include reset;
83
84
 
84
85
  flex-shrink: 0;
85
86
  border: $radio-border-width solid $icon-primary;
87
+ border-radius: 50%;
86
88
  background-color: transparent;
87
89
  block-size: convert.to-rem(18px);
88
- border-radius: 50%;
89
90
  inline-size: convert.to-rem(18px);
90
91
  margin-block: convert.to-rem(1px) convert.to-rem(2px);
91
- margin-inline: convert.to-rem(2px) $spacing-03;
92
+ margin-inline: convert.to-rem(2px) convert.to-rem(10px);
93
+ }
94
+
95
+ .#{$prefix}--radio-button-group--vertical
96
+ .#{$prefix}--radio-button__appearance {
97
+ margin-block: 0;
92
98
  }
93
99
 
94
100
  .#{$prefix}--radio-button:checked
@@ -102,9 +108,9 @@ $radio-border-width: 1px !default;
102
108
  &::before {
103
109
  position: relative;
104
110
  display: inline-block;
111
+ border-radius: 50%;
105
112
  background-color: $icon-primary;
106
113
  block-size: 100%;
107
- border-radius: 50%;
108
114
  content: '';
109
115
  inline-size: 100%;
110
116
  transform: scale(0.5);
@@ -244,12 +250,17 @@ $radio-border-width: 1px !default;
244
250
  margin-inline-end: $spacing-05;
245
251
  }
246
252
 
247
- .#{$prefix}--radio-button-group--vertical
248
- .#{$prefix}--radio-button-wrapper:not(:last-of-type) {
249
- margin-block-end: $spacing-03;
253
+ .#{$prefix}--radio-button-group--vertical .#{$prefix}--radio-button-wrapper {
254
+ margin-block-end: convert.to-rem(6px);
250
255
  margin-inline-end: 0;
251
256
  }
252
257
 
258
+ .#{$prefix}--radio-button-group--vertical
259
+ .#{$prefix}--radio-button-wrapper
260
+ .#{$prefix}--radio-button__label {
261
+ padding-block-start: convert.to-rem(2px);
262
+ }
263
+
253
264
  .#{$prefix}--radio-button-group--label-right .#{$prefix}--radio-button__label,
254
265
  .#{$prefix}--radio-button-wrapper.#{$prefix}--radio-button-wrapper--label-right
255
266
  .#{$prefix}--radio-button__label {
@@ -45,11 +45,11 @@
45
45
 
46
46
  display: block;
47
47
  border: none;
48
+ border-radius: 0;
48
49
  appearance: none;
49
50
  background-color: $field;
50
51
  block-size: convert.to-rem(40px);
51
52
  border-block-end: 1px solid $border-strong;
52
- border-radius: 0;
53
53
  color: $text-primary;
54
54
  cursor: pointer;
55
55
  font-family: inherit;
@@ -88,9 +88,9 @@
88
88
  .#{$prefix}--slider__thumb {
89
89
  position: absolute;
90
90
  z-index: 3;
91
+ border-radius: 50%;
91
92
  background: $layer-selected-inverse;
92
93
  block-size: convert.to-rem(14px);
93
- border-radius: 50%;
94
94
  box-shadow: inset 0 0 0 1px transparent, inset 0 0 0 2px transparent;
95
95
  inline-size: convert.to-rem(14px);
96
96
  outline: none;
@@ -44,8 +44,8 @@
44
44
  display: inline-flex;
45
45
  align-items: center;
46
46
  justify-content: center;
47
- margin: $spacing-02;
48
47
  border-radius: convert.to-rem(15px);
48
+ margin: $spacing-02;
49
49
  cursor: default;
50
50
  // restricts size of contained elements
51
51
  max-inline-size: 100%;
@@ -186,10 +186,10 @@
186
186
  justify-content: center;
187
187
  padding: 0;
188
188
  border: 0;
189
+ border-radius: 50%;
189
190
  margin: 0 0 0 convert.to-rem(2px);
190
191
  background-color: transparent;
191
192
  block-size: layout.size('height');
192
- border-radius: 50%;
193
193
  color: currentColor;
194
194
  cursor: pointer;
195
195
  inline-size: layout.size('height');
@@ -51,17 +51,17 @@
51
51
 
52
52
  .#{$prefix}--toggle__switch {
53
53
  position: relative;
54
+ border-radius: convert.to-rem(12px);
54
55
  background-color: $toggle-off;
55
56
  block-size: convert.to-rem(24px);
56
- border-radius: convert.to-rem(12px);
57
57
  inline-size: convert.to-rem(48px);
58
58
  transition: background-color $duration-fast-01 motion(exit, productive);
59
59
 
60
60
  &::before {
61
61
  position: absolute;
62
+ border-radius: 50%;
62
63
  background-color: $icon-on-color;
63
64
  block-size: convert.to-rem(18px);
64
- border-radius: 50%;
65
65
  content: '';
66
66
  inline-size: convert.to-rem(18px);
67
67
  inset-block-start: convert.to-rem(3px);
@@ -204,9 +204,8 @@
204
204
  .#{$prefix}--toggle--skeleton .#{$prefix}--toggle__skeleton-circle {
205
205
  @include circular-skeleton;
206
206
 
207
- block-size: convert.to-rem(18px);
208
207
  border-radius: 50%;
209
-
208
+ block-size: convert.to-rem(18px);
210
209
  inline-size: convert.to-rem(18px);
211
210
  }
212
211
 
@@ -214,7 +213,6 @@
214
213
  @include skeleton;
215
214
 
216
215
  block-size: convert.to-rem(8px);
217
-
218
216
  inline-size: convert.to-rem(24px);
219
217
  margin-inline-start: convert.to-rem(8px);
220
218
  }
@@ -35,9 +35,7 @@ $tooltip-padding-inline: custom-property.get-var(
35
35
  @include type.type-style('body-01');
36
36
 
37
37
  padding: $tooltip-padding-block $tooltip-padding-inline;
38
-
39
38
  color: theme.$text-inverse;
40
-
41
39
  max-inline-size: convert.to-rem(288px);
42
40
  }
43
41
  }
@@ -46,9 +44,8 @@ $tooltip-padding-inline: custom-property.get-var(
46
44
  .#{$prefix}--definition-term {
47
45
  @include button-reset.reset;
48
46
 
49
- border-block-end: 1px dotted theme.$border-strong;
50
47
  border-radius: 0;
51
-
48
+ border-block-end: 1px dotted theme.$border-strong;
52
49
  color: theme.$text-primary;
53
50
  }
54
51
 
@@ -66,7 +63,6 @@ $tooltip-padding-inline: custom-property.get-var(
66
63
  @include type.type-style('body-01');
67
64
 
68
65
  padding: convert.to-rem(8px) convert.to-rem(16px);
69
-
70
66
  max-inline-size: convert.to-rem(176px);
71
67
  }
72
68
  }
@@ -50,8 +50,8 @@
50
50
  @mixin circular-skeleton {
51
51
  position: relative;
52
52
  overflow: hidden;
53
- background: $skeleton-background;
54
53
  border-radius: 50%;
54
+ background: $skeleton-background;
55
55
 
56
56
  &::before {
57
57
  position: absolute;
@@ -41,9 +41,9 @@
41
41
  convert.to-rem(8px) convert.to-rem(16px),
42
42
  convert.to-rem(3px) convert.to-rem(16px)
43
43
  );
44
+ border-radius: convert.to-rem(2px);
44
45
  background-color: $background-inverse;
45
46
  block-size: auto;
46
- border-radius: convert.to-rem(2px);
47
47
  color: $text-inverse;
48
48
  font-weight: 400;
49
49
  inline-size: max-content;