@carbon/styles 1.86.1-rc.0 → 1.87.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.86.1-rc.0",
4
+ "version": "1.87.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -40,13 +40,13 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@carbon/colors": "^11.36.0",
44
- "@carbon/feature-flags": "^0.28.1-rc.0",
45
- "@carbon/grid": "^11.39.0",
46
- "@carbon/layout": "^11.37.0",
47
- "@carbon/motion": "^11.31.0",
48
- "@carbon/themes": "^11.56.0",
49
- "@carbon/type": "^11.43.0",
43
+ "@carbon/colors": "^11.37.0",
44
+ "@carbon/feature-flags": "^0.29.0",
45
+ "@carbon/grid": "^11.40.0",
46
+ "@carbon/layout": "^11.38.0",
47
+ "@carbon/motion": "^11.32.0",
48
+ "@carbon/themes": "^11.57.0",
49
+ "@carbon/type": "^11.44.0",
50
50
  "@ibm/plex": "6.0.0-next.6",
51
51
  "@ibm/plex-mono": "0.0.3-alpha.0",
52
52
  "@ibm/plex-sans": "0.0.3-alpha.0",
@@ -75,5 +75,5 @@
75
75
  "scss/**/*.css",
76
76
  "css/**/*.css"
77
77
  ],
78
- "gitHead": "c0c7a3adc9f05f3a1bfb0d53316167c6a7262e6e"
78
+ "gitHead": "6568a3389c2a82348c693b167b511dea66b7b269"
79
79
  }
@@ -150,17 +150,12 @@
150
150
  }
151
151
 
152
152
  .#{$prefix}--btn--icon-only {
153
+ align-items: center;
153
154
  justify-content: center;
154
155
  padding: 0;
155
156
  block-size: layout.size('height');
156
157
  inline-size: layout.size('height');
157
- // -1px to compensate for border width
158
- padding-block-start: min(
159
- calc(
160
- (layout.size('height') - convert.to-rem(16px)) / 2 - convert.to-rem(1px)
161
- ),
162
- var(--temp-padding-block-max)
163
- );
158
+ padding-block-start: 0;
164
159
 
165
160
  > :first-child {
166
161
  min-inline-size: convert.to-rem(16px);
@@ -508,15 +508,14 @@ $copy-btn-feedback: $background-inverse !default;
508
508
  // Safari-only media query
509
509
  // since fades won't appear correctly with CSS custom properties
510
510
  // see: tabs, code snippet, and modal overflow indicators
511
- @media not all and (min-resolution >= 0.001dpcm) {
512
- @supports (-webkit-appearance: none) and (stroke-color: transparent) {
513
- .#{$prefix}--snippet__overflow-indicator--left {
514
- background-image: linear-gradient(to left, rgba($layer, 0), $layer);
515
- }
516
-
517
- .#{$prefix}--snippet__overflow-indicator--right {
518
- background-image: linear-gradient(to right, rgba($layer, 0), $layer);
519
- }
511
+ @supports (hanging-punctuation: first) and (font: -apple-system-body) and
512
+ (-webkit-appearance: none) {
513
+ .#{$prefix}--snippet__overflow-indicator--left {
514
+ background-image: linear-gradient(to left, rgba($layer, 0), $layer);
515
+ }
516
+
517
+ .#{$prefix}--snippet__overflow-indicator--right {
518
+ background-image: linear-gradient(to right, rgba($layer, 0), $layer);
520
519
  }
521
520
  }
522
521
 
@@ -76,12 +76,11 @@
76
76
  }
77
77
 
78
78
  // Negative values for `stroke-dashoffset` are not supported in Safari
79
- @media not all and (resolution >= 0.001dpcm) {
80
- @supports (-webkit-appearance: none) and (stroke-color: transparent) {
81
- circle.#{$prefix}--loading__background {
82
- stroke-dasharray: 265;
83
- stroke-dashoffset: 0;
84
- }
79
+ @supports (hanging-punctuation: first) and (font: -apple-system-body) and
80
+ (-webkit-appearance: none) {
81
+ circle.#{$prefix}--loading__background {
82
+ stroke-dasharray: 265;
83
+ stroke-dashoffset: 0;
85
84
  }
86
85
  }
87
86
 
@@ -280,6 +280,19 @@
280
280
  .#{$prefix}--actionable-notification__subtitle {
281
281
  color: $text-primary;
282
282
  }
283
+
284
+ .#{$prefix}--actionable-notification__caption {
285
+ @include type-style('body-compact-01');
286
+
287
+ color: $text-inverse;
288
+ padding-block-start: $spacing-06;
289
+ }
290
+
291
+ .#{$prefix}--actionable-notification--low-contrast
292
+ .#{$prefix}--actionable-notification__caption {
293
+ color: $text-primary;
294
+ }
295
+
283
296
  /* Ghost action button when inline */
284
297
  .#{$prefix}--actionable-notification__action-button.#{$prefix}--btn--ghost {
285
298
  block-size: convert.to-rem(32px);
@@ -49,7 +49,7 @@
49
49
  }
50
50
 
51
51
  &:hover {
52
- background-color: $layer-hover;
52
+ background-color: $background-hover;
53
53
  }
54
54
  }
55
55
 
@@ -136,7 +136,7 @@
136
136
  }
137
137
 
138
138
  .#{$prefix}--overflow-menu-options--light {
139
- background-color: $layer;
139
+ background-color: $layer-hover;
140
140
 
141
141
  &::after {
142
142
  background-color: $layer;
@@ -144,7 +144,7 @@
144
144
  }
145
145
 
146
146
  .#{$prefix}--overflow-menu.#{$prefix}--overflow-menu--light.#{$prefix}--overflow-menu--open:hover {
147
- background-color: $layer;
147
+ background-color: $layer-hover;
148
148
  }
149
149
 
150
150
  .#{$prefix}--overflow-menu-options[data-floating-menu-direction='bottom']:not(
@@ -8,6 +8,7 @@
8
8
  @use '../../config' as *;
9
9
  @use '../../theme';
10
10
  @use '../../utilities/convert';
11
+ @use '../../utilities/high-contrast-mode' as *;
11
12
 
12
13
  @keyframes ai-skeleton-animation {
13
14
  0% {
@@ -61,6 +62,22 @@
61
62
  .#{$prefix}--skeleton__icon--ai {
62
63
  border-radius: convert.to-rem(2px);
63
64
  }
65
+
66
+ //High Contrast Mode
67
+ //Ensure AI Skeleton is visible and animated in Windows HCM
68
+ @include high-contrast-mode {
69
+ .#{$prefix}--skeleton__text--ai,
70
+ .#{$prefix}--skeleton__placeholder--ai,
71
+ .#{$prefix}--skeleton__icon--ai {
72
+ background: CanvasText;
73
+ }
74
+
75
+ .#{$prefix}--skeleton__text--ai::before,
76
+ .#{$prefix}--skeleton__placeholder--ai::before,
77
+ .#{$prefix}--skeleton__icon--ai::before {
78
+ background: Canvas;
79
+ }
80
+ }
64
81
  }
65
82
 
66
83
  // rgba($ai-skeleton-element-background, 1)
@@ -258,41 +258,40 @@
258
258
  // Safari-only media query
259
259
  // won't appear correctly with CSS custom properties
260
260
  // see: code snippet and modal overflow indicators
261
- @media not all and (resolution >= 0.001dpcm) {
262
- @supports (-webkit-appearance: none) and (stroke-color: transparent) {
261
+ @supports (hanging-punctuation: first) and (font: -apple-system-body) and
262
+ (-webkit-appearance: none) {
263
+ .#{$prefix}--tabs__overflow-indicator--left {
264
+ background-image: linear-gradient(
265
+ to left,
266
+ rgba($background, 0),
267
+ $background
268
+ );
269
+ }
270
+
271
+ .#{$prefix}--tabs__overflow-indicator--right {
272
+ background-image: linear-gradient(
273
+ to right,
274
+ rgba($background, 0),
275
+ $background
276
+ );
277
+ }
278
+
279
+ &.#{$prefix}--tabs--contained
263
280
  .#{$prefix}--tabs__overflow-indicator--left {
264
- background-image: linear-gradient(
265
- to left,
266
- rgba($background, 0),
267
- $background
268
- );
269
- }
281
+ background-image: linear-gradient(
282
+ to left,
283
+ rgba($layer-accent, 0),
284
+ $layer-accent
285
+ );
286
+ }
270
287
 
288
+ &.#{$prefix}--tabs--contained
271
289
  .#{$prefix}--tabs__overflow-indicator--right {
272
- background-image: linear-gradient(
273
- to right,
274
- rgba($background, 0),
275
- $background
276
- );
277
- }
278
-
279
- &.#{$prefix}--tabs--contained
280
- .#{$prefix}--tabs__overflow-indicator--left {
281
- background-image: linear-gradient(
282
- to left,
283
- rgba($layer-accent, 0),
284
- $layer-accent
285
- );
286
- }
287
-
288
- &.#{$prefix}--tabs--contained
289
- .#{$prefix}--tabs__overflow-indicator--right {
290
- background-image: linear-gradient(
291
- to right,
292
- rgba($layer-accent, 0),
293
- $layer-accent
294
- );
295
- }
290
+ background-image: linear-gradient(
291
+ to right,
292
+ rgba($layer-accent, 0),
293
+ $layer-accent
294
+ );
296
295
  }
297
296
  }
298
297
 
@@ -381,10 +381,9 @@
381
381
  inline-size: convert.to-rem(60px);
382
382
 
383
383
  // Safari specific bug (#7672)
384
- @media not all and (min-resolution >= 0.001dpcm) {
385
- @supports (-webkit-appearance: none) and (stroke-color: transparent) {
386
- transform: translateZ(0);
387
- }
384
+ @supports (hanging-punctuation: first) and (font: -apple-system-body) and
385
+ (-webkit-appearance: none) {
386
+ transform: translateZ(0);
388
387
  }
389
388
  }
390
389
 
@@ -316,10 +316,9 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
316
316
  // Safari-only media query
317
317
  // Fixes an issue with scrolling
318
318
  // and absolutely positioned elements (#8119)
319
- @media not all and (resolution >= 0.001dpcm) {
320
- @supports (-webkit-appearance: none) and (stroke-color: transparent) {
321
- overflow-y: auto;
322
- }
319
+ @supports (hanging-punctuation: first) and (font: -apple-system-body) and
320
+ (-webkit-appearance: none) {
321
+ overflow-y: auto;
323
322
  }
324
323
  }
325
324
  }
@@ -8,6 +8,7 @@
8
8
  @use 'keyframes';
9
9
  @use '../theme' as *;
10
10
  @use '../config' as *;
11
+ @use '../utilities/high-contrast-mode' as *;
11
12
 
12
13
  /// Skeleton loading animation
13
14
  /// @access public
@@ -43,6 +44,16 @@
43
44
  animation: none;
44
45
  }
45
46
  }
47
+
48
+ // High Contrast Mode support
49
+ @include high-contrast-mode {
50
+ background: CanvasText;
51
+
52
+ &::before {
53
+ background: Canvas;
54
+ forced-color-adjust: none;
55
+ }
56
+ }
46
57
  }
47
58
 
48
59
  /// Circular Skeleton loading animation
@@ -68,4 +79,15 @@
68
79
  animation: none;
69
80
  }
70
81
  }
82
+
83
+ //High Contrast Mode
84
+ //Ensure Skeleton is visible and animated in Windows HCM
85
+ @include high-contrast-mode {
86
+ background: CanvasText;
87
+
88
+ &::before {
89
+ background: Canvas;
90
+ forced-color-adjust: none;
91
+ }
92
+ }
71
93
  }