Skip to content

Commit

Permalink
feat(menu): add menu padding tokens
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 720338956
  • Loading branch information
material-web-copybara authored and copybara-github committed Jan 28, 2025
1 parent 82a32ad commit 128a698
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion menu/internal/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
}

.item-padding {
padding-block: 8px;
padding-block: map.get($tokens, 'top-space')
map.get($tokens, 'bottom-space');
}

.has-overflow:not([popover]) .items {
Expand Down
8 changes: 7 additions & 1 deletion tokens/_md-comp-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

$supported-tokens: (
// go/keep-sorted start
'bottom-space',
'container-color',
'container-elevation',
'container-shadow-color',
'container-shape',
'top-space',
// go/keep-sorted end
);

Expand All @@ -46,7 +48,11 @@ $_default: (
$tokens: validate.values(
md-comp-menu.values($deps),
$supported-tokens: $supported-tokens,
$unsupported-tokens: $unsupported-tokens
$unsupported-tokens: $unsupported-tokens,
$new-tokens: (
'top-space': if($exclude-hardcoded-values, null, 8px),
'bottom-space': if($exclude-hardcoded-values, null, 8px),
)
);

@if not $exclude-custom-properties {
Expand Down

0 comments on commit 128a698

Please sign in to comment.