Skip to content

Commit

Permalink
fix(list): update tokens to 0.192
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
- Leading icon size increased from 18px to 24px
- Trailing space decreased from 24px to 16px

PiperOrigin-RevId: 565769173
  • Loading branch information
asyncLiz authored and copybara-github committed Sep 15, 2023
1 parent 9447ec7 commit 58539b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 7 additions & 5 deletions tokens/_md-comp-list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@use './md-sys-shape';
@use './md-sys-state';
@use './md-sys-typescale';
@use './v0_172/md-comp-list';
@use './v0_192/md-comp-list';
@use './values';
// go/keep-sorted end

Expand Down Expand Up @@ -91,6 +91,8 @@ $unsupported-tokens: (
'container-elevation',
'disabled-state-layer-color',
'disabled-state-layer-opacity',
'divider-leading-space',
'divider-trailing-space',
'dragged-container-elevation',
'dragged-label-text-color',
'dragged-leading-icon-icon-color',
Expand Down Expand Up @@ -147,8 +149,10 @@ $_default: (
$renamed-tokens: ();

@each $key in $keys {
$renamed-key: string.slice($key, string.length('list-item-') + 1);
$renamed-tokens: map.set($renamed-tokens, $key, $renamed-key);
@if string.index($key, 'list-item-') == 1 {
$renamed-key: string.slice($key, string.length('list-item-') + 1);
$renamed-tokens: map.set($renamed-tokens, $key, $renamed-key);
}
}

@return $renamed-tokens;
Expand All @@ -159,7 +163,6 @@ $_default: (
@return (
// go/keep-sorted start
'leading-element-leading-space': if($exclude-hardcoded-values, null, 16px),
'leading-space': if($exclude-hardcoded-values, null, 16px),
'leading-video-leading-space': if($exclude-hardcoded-values, null, 0px),
// Commented out until the comments in the spreadsheet linked above are
// resolved regarding vertical alignment.
Expand All @@ -168,7 +171,6 @@ $_default: (
// 'leading-item-bottom-space': if($exclude-hardcoded-values, null, 8px),
// 'leading-video-bottom-space': if($exclude-hardcoded-values, null, 0px),
'trailing-element-headline-trailing-element-space': 16px,
'trailing-space': if($exclude-hardcoded-values, null, 24px),
// go/keep-sorted end
);
}
6 changes: 5 additions & 1 deletion tokens/_md-comp-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@use './md-sys-shape';
@use './md-sys-state';
@use './md-sys-typescale';
@use './v0_172/md-comp-list';
@use './v0_192/md-comp-list';
@use './values';
// go/keep-sorted end

Expand All @@ -24,6 +24,8 @@ $supported-tokens: (

$unsupported-tokens: (
// go/keep-sorted start
'divider-leading-space',
'divider-trailing-space',
'list-item-container-elevation',
'list-item-container-shape',
'list-item-disabled-label-text-color',
Expand Down Expand Up @@ -73,6 +75,7 @@ $unsupported-tokens: (
'list-item-leading-image-height',
'list-item-leading-image-shape',
'list-item-leading-image-width',
'list-item-leading-space',
'list-item-leading-video-shape',
'list-item-leading-video-width',
'list-item-one-line-container-height',
Expand Down Expand Up @@ -100,6 +103,7 @@ $unsupported-tokens: (
'list-item-three-line-container-height',
'list-item-trailing-icon-color',
'list-item-trailing-icon-size',
'list-item-trailing-space',
'list-item-trailing-supporting-text-color',
'list-item-trailing-supporting-text-font',
'list-item-trailing-supporting-text-line-height',
Expand Down

0 comments on commit 58539b1

Please sign in to comment.