Skip to content

Commit

Permalink
fix(textfield)!: rename supporting-text-padding tokens
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Rename `--md-*-field-supporting-text-padding` to `--md-*-field-supporting-text-leading-space` and `--md-*-field-supporting-text-trailing-space`. Rename `--md-*-field-supporting-text-padding-top` to `--md-*-field-supporting-text-top-space`

PiperOrigin-RevId: 547218344
  • Loading branch information
asyncLiz authored and copybara-github committed Jul 11, 2023
1 parent 53966af commit 4f37b44
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
9 changes: 5 additions & 4 deletions field/lib/_supporting-text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
.supporting-text {
color: var(--_supporting-text-color);
display: flex;
gap: var(--_supporting-text-padding);
justify-content: space-between;
padding: var(--_supporting-text-padding-top) var(--_supporting-text-padding)
0;
font: var(--_supporting-text-type);
gap: 16px;
justify-content: space-between;
padding-inline-start: var(--_supporting-text-leading-space);
padding-inline-end: var(--_supporting-text-trailing-space);
padding-top: var(--_supporting-text-top-space);
}

// Don't shrink the counter when the supporting text is long and wraps
Expand Down
10 changes: 6 additions & 4 deletions tokens/_md-comp-filled-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ $supported-tokens: (
'label-text-type',
'leading-content-color',
'supporting-text-color',
'supporting-text-padding',
'supporting-text-padding-top',
'supporting-text-leading-space',
'supporting-text-top-space',
'supporting-text-trailing-space',
'supporting-text-type',
'trailing-content-color',
'with-label-container-padding-vertical',
Expand Down Expand Up @@ -214,8 +215,9 @@ $_default: (
'label-text-type': map.get($text-field, 'label-text-type'),
'leading-content-color': map.get($text-field, 'leading-icon-color'),
'supporting-text-color': map.get($text-field, 'supporting-text-color'),
'supporting-text-padding': if($exclude-hardcoded-values, null, 16px),
'supporting-text-padding-top': if($exclude-hardcoded-values, null, 4px),
'supporting-text-leading-space': if($exclude-hardcoded-values, null, 16px),
'supporting-text-top-space': if($exclude-hardcoded-values, null, 4px),
'supporting-text-trailing-space': if($exclude-hardcoded-values, null, 16px),
'supporting-text-type': map.get($text-field, 'supporting-text-type'),
'trailing-content-color': map.get($text-field, 'trailing-icon-color'),
'with-label-container-padding-vertical':
Expand Down
10 changes: 6 additions & 4 deletions tokens/_md-comp-outlined-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ $supported-tokens: (
'outline-label-padding',
'outline-width',
'supporting-text-color',
'supporting-text-padding',
'supporting-text-padding-top',
'supporting-text-leading-space',
'supporting-text-top-space',
'supporting-text-trailing-space',
'supporting-text-type',
'trailing-content-color',
// go/keep-sorted end
Expand Down Expand Up @@ -191,8 +192,9 @@ $_default: (
'outline-label-padding': if($exclude-hardcoded-values, null, 4px),
'outline-width': map.get($text-field, 'outline-width'),
'supporting-text-color': map.get($text-field, 'supporting-text-color'),
'supporting-text-padding': if($exclude-hardcoded-values, null, 16px),
'supporting-text-padding-top': if($exclude-hardcoded-values, null, 4px),
'supporting-text-leading-space': if($exclude-hardcoded-values, null, 16px),
'supporting-text-top-space': if($exclude-hardcoded-values, null, 4px),
'supporting-text-trailing-space': if($exclude-hardcoded-values, null, 16px),
'supporting-text-type': map.get($text-field, 'supporting-text-type'),
'trailing-content-color': map.get($text-field, 'trailing-icon-color'),
// go/keep-sorted end
Expand Down

0 comments on commit 4f37b44

Please sign in to comment.