@carbon/styles 1.77.0-rc.0 → 1.77.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.
@@ -130,8 +130,8 @@ describe('@carbon/styles/scss/type', () => {
130
130
  const { stylesheet } = css.parse(result.css.toString());
131
131
  const [rule] = stylesheet.rules;
132
132
  for (const declaration of rule.declarations) {
133
- expect(declaration.property).toEqual(
134
- expect.stringContaining('--custom-')
133
+ expect(declaration.value).toEqual(
134
+ expect.stringContaining('var(--custom-')
135
135
  );
136
136
  }
137
137
  });
package/scss/_config.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2018, 2023
2
+ // Copyright IBM Corp. 2018, 2025
3
3
  //
4
4
  // This source code is licensed under the Apache-2.0 license found in the
5
5
  // LICENSE file in the root directory of this source tree.
@@ -18,11 +18,11 @@ $css--body: true !default;
18
18
  /// @group config
19
19
  $css--font-face: true !default;
20
20
 
21
- /// If true, emit the custom type properties in in :root
21
+ /// If true, emit the custom type properties in :root
22
22
  /// @access public
23
23
  /// @type Bool
24
24
  /// @group config
25
- $css--emit-type-custom-props: true !default;
25
+ $css--emit-type-custom-props: false !default;
26
26
 
27
27
  /// If true, include reset CSS
28
28
  /// @access public
@@ -98,14 +98,6 @@
98
98
  }
99
99
  }
100
100
 
101
- .#{$prefix}--menu-item__icon {
102
- display: none;
103
- }
104
-
105
- .#{$prefix}--menu--with-icons .#{$prefix}--menu-item__icon {
106
- display: flex;
107
- }
108
-
109
101
  .#{$prefix}--menu-item__label {
110
102
  overflow: hidden;
111
103
  text-overflow: ellipsis;
@@ -121,18 +113,74 @@
121
113
  @include component-reset.reset;
122
114
  }
123
115
 
116
+ .#{$prefix}--menu-item__icon,
117
+ .#{$prefix}--menu-item__selection-icon {
118
+ display: none;
119
+ }
120
+
124
121
  .#{$prefix}--menu--with-icons > .#{$prefix}--menu-item,
125
122
  .#{$prefix}--menu--with-icons
126
123
  > .#{$prefix}--menu-item-group
127
124
  > ul
128
125
  > .#{$prefix}--menu-item,
129
126
  .#{$prefix}--menu--with-icons
127
+ > .#{$prefix}--menu-item-radio-group
128
+ > ul
129
+ > .#{$prefix}--menu-item,
130
+ .#{$prefix}--menu--with-selectable-items > .#{$prefix}--menu-item,
131
+ .#{$prefix}--menu--with-selectable-items
132
+ > .#{$prefix}--menu-item-group
133
+ > ul
134
+ > .#{$prefix}--menu-item,
135
+ .#{$prefix}--menu--with-selectable-items
130
136
  > .#{$prefix}--menu-item-radio-group
131
137
  > ul
132
138
  > .#{$prefix}--menu-item {
133
139
  grid-template-columns: 1rem 1fr max-content;
134
140
  }
135
141
 
142
+ .#{$prefix}--menu--with-icons
143
+ > .#{$prefix}--menu-item
144
+ > .#{$prefix}--menu-item__icon,
145
+ .#{$prefix}--menu--with-icons
146
+ > .#{$prefix}--menu-item-group
147
+ > ul
148
+ > .#{$prefix}--menu-item
149
+ > .#{$prefix}--menu-item__icon,
150
+ .#{$prefix}--menu--with-icons
151
+ > .#{$prefix}--menu-item-radio-group
152
+ > ul
153
+ > .#{$prefix}--menu-item
154
+ > .#{$prefix}--menu-item__icon,
155
+ .#{$prefix}--menu--with-selectable-items
156
+ > .#{$prefix}--menu-item
157
+ > .#{$prefix}--menu-item__selection-icon,
158
+ .#{$prefix}--menu--with-selectable-items
159
+ > .#{$prefix}--menu-item-group
160
+ > ul
161
+ > .#{$prefix}--menu-item
162
+ > .#{$prefix}--menu-item__selection-icon,
163
+ .#{$prefix}--menu--with-selectable-items
164
+ > .#{$prefix}--menu-item-radio-group
165
+ > ul
166
+ > .#{$prefix}--menu-item
167
+ > .#{$prefix}--menu-item__selection-icon {
168
+ display: flex;
169
+ }
170
+
171
+ .#{$prefix}--menu--with-icons.#{$prefix}--menu--with-selectable-items
172
+ > .#{$prefix}--menu-item,
173
+ .#{$prefix}--menu--with-icons.#{$prefix}--menu--with-selectable-items
174
+ > .#{$prefix}--menu-item-group
175
+ > ul
176
+ > .#{$prefix}--menu-item,
177
+ .#{$prefix}--menu--with-icons.#{$prefix}--menu--with-selectable-items
178
+ > .#{$prefix}--menu-item-radio-group
179
+ > ul
180
+ > .#{$prefix}--menu-item {
181
+ grid-template-columns: 1rem 1rem 1fr max-content;
182
+ }
183
+
136
184
  .#{$prefix}--menu-item--disabled {
137
185
  color: $text-disabled;
138
186
  cursor: not-allowed;
@@ -30,19 +30,4 @@
30
30
  .#{$prefix}--menu-button__trigger--open svg {
31
31
  transform: rotate(180deg);
32
32
  }
33
-
34
- // Menu alignment classes
35
- $popover-offset: custom-property.get-var('popover-offset', 3rem);
36
-
37
- .#{$prefix}--menu-button__top {
38
- transform: translate(0, calc(-100% - $popover-offset));
39
- }
40
-
41
- .#{$prefix}--menu-button__top-start {
42
- transform: translate(0, calc(-100% - $popover-offset));
43
- }
44
-
45
- .#{$prefix}--menu-button__top-end {
46
- transform: translate(0, calc(-100% - $popover-offset));
47
- }
48
33
  }