@carbon/styles 1.82.0-rc.0 → 1.82.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.
@@ -0,0 +1,110 @@
1
+ //
2
+ // Copyright IBM Corp. 2025
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @use 'sass:color';
9
+ @use 'sass:map';
10
+ @use '../../config';
11
+ @use '../../colors';
12
+ @use '../../themes';
13
+ @use '../../theme' as *;
14
+ @use '../../utilities/component-tokens';
15
+ @use '@carbon/themes/scss/component-tokens' as content-switcher;
16
+
17
+ // content-switcher-background
18
+ $content-switcher-background: (
19
+ fallback: map.get(content-switcher.$content-switcher-background, white-theme),
20
+ values: (
21
+ (
22
+ theme: themes.$white,
23
+ value: map.get(content-switcher.$content-switcher-background, white-theme),
24
+ ),
25
+ (
26
+ theme: themes.$g10,
27
+ value: map.get(content-switcher.$content-switcher-background, g-10),
28
+ ),
29
+ (
30
+ theme: themes.$g90,
31
+ value: map.get(content-switcher.$content-switcher-background, g-90),
32
+ ),
33
+ (
34
+ theme: themes.$g100,
35
+ value: map.get(content-switcher.$content-switcher-background, g-100),
36
+ ),
37
+ ),
38
+ ) !default;
39
+
40
+ // content-switcher-background-hover
41
+ $content-switcher-background-hover: (
42
+ fallback:
43
+ map.get(content-switcher.$content-switcher-background-hover, white-theme),
44
+ values: (
45
+ (
46
+ theme: themes.$white,
47
+ value:
48
+ map.get(
49
+ content-switcher.$content-switcher-background-hover,
50
+ white-theme
51
+ ),
52
+ ),
53
+ (
54
+ theme: themes.$g10,
55
+ value: map.get(content-switcher.$content-switcher-background-hover, g-10),
56
+ ),
57
+ (
58
+ theme: themes.$g90,
59
+ value: map.get(content-switcher.$content-switcher-background-hover, g-90),
60
+ ),
61
+ (
62
+ theme: themes.$g100,
63
+ value: map.get(content-switcher.$content-switcher-background-hover, g-100),
64
+ ),
65
+ ),
66
+ ) !default;
67
+
68
+ // content-switcher-selected
69
+ $content-switcher-selected: (
70
+ fallback: map.get(content-switcher.$content-switcher-selected, white-theme),
71
+ values: (
72
+ (
73
+ theme: themes.$white,
74
+ value: map.get(content-switcher.$content-switcher-selected, white-theme),
75
+ ),
76
+ (
77
+ theme: themes.$g10,
78
+ value: map.get(content-switcher.$content-switcher-selected, g-10),
79
+ ),
80
+ (
81
+ theme: themes.$g90,
82
+ value: map.get(content-switcher.$content-switcher-selected, g-90),
83
+ ),
84
+ (
85
+ theme: themes.$g100,
86
+ value: map.get(content-switcher.$content-switcher-selected, g-100),
87
+ ),
88
+ ),
89
+ ) !default;
90
+
91
+ // Add to $content-switcher-tokens map
92
+ $content-switcher-tokens: (
93
+ content-switcher-background: $content-switcher-background,
94
+ content-switcher-background-hover: $content-switcher-background-hover,
95
+ content-switcher-selected: $content-switcher-selected,
96
+ );
97
+
98
+ // Generate CSS custom properties for each token
99
+ $content-switcher-background: component-tokens.get-var(
100
+ $content-switcher-background,
101
+ 'content-switcher-background'
102
+ );
103
+ $content-switcher-background-hover: component-tokens.get-var(
104
+ $content-switcher-background-hover,
105
+ 'content-switcher-background-hover'
106
+ );
107
+ $content-switcher-selected: component-tokens.get-var(
108
+ $content-switcher-selected,
109
+ 'content-switcher-selected'
110
+ );
@@ -19,6 +19,11 @@ $-default-layer-sets: (
19
19
  theme.$layer-active-02,
20
20
  theme.$layer-active-03,
21
21
  ),
22
+ layer-background: (
23
+ theme.$layer-background-01,
24
+ theme.$layer-background-02,
25
+ theme.$layer-background-03,
26
+ ),
22
27
  layer-hover: (
23
28
  theme.$layer-hover-01,
24
29
  theme.$layer-hover-02,
@@ -25,6 +25,7 @@
25
25
  // Layer sets
26
26
  $layer: custom-property.get-var('layer');
27
27
  $layer-active: custom-property.get-var('layer-active');
28
+ $layer-background: custom-property.get-var('layer-background');
28
29
  $layer-hover: custom-property.get-var('layer-hover');
29
30
  $layer-selected: custom-property.get-var('layer-selected');
30
31
  $layer-selected-hover: custom-property.get-var('layer-selected-hover');