Skip to content

Commit 3ce01d1

Browse files
feat(menu): add menu padding tokens
PiperOrigin-RevId: 720334050
1 parent 82a32ad commit 3ce01d1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

menu/internal/_menu.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
}
101101

102102
.item-padding {
103-
padding-block: 8px;
103+
padding-block: map.get($tokens, 'top-space')
104+
map.get($tokens, 'bottom-space');
104105
}
105106

106107
.has-overflow:not([popover]) .items {

tokens/_md-comp-menu.scss

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616

1717
$supported-tokens: (
1818
// go/keep-sorted start
19+
'bottom-space',
1920
'container-color',
2021
'container-elevation',
2122
'container-shadow-color',
2223
'container-shape',
24+
'top-space',
2325
// go/keep-sorted end
2426
);
2527

@@ -46,7 +48,11 @@ $_default: (
4648
$tokens: validate.values(
4749
md-comp-menu.values($deps),
4850
$supported-tokens: $supported-tokens,
49-
$unsupported-tokens: $unsupported-tokens
51+
$unsupported-tokens: $unsupported-tokens,
52+
$new-tokens: (
53+
'top-space': if($exclude-hardcoded-values, null, 8px),
54+
'bottom-space': if($exclude-hardcoded-values, null, 8px),
55+
)
5056
);
5157

5258
@if not $exclude-custom-properties {

0 commit comments

Comments
 (0)