Skip to content

Commit

Permalink
fix(button): Use correct padding for Text Button
Browse files Browse the repository at this point in the history
According to the [M3 spec](https://m3.material.io/components/buttons/specs#899b9107-0127-4a01-8f4c-87f19323a1b4), Text Buttons have less side padding than the other Button variants.

PiperOrigin-RevId: 463712391
  • Loading branch information
kvizcarra authored and copybara-github committed Jul 28, 2022
1 parent 94ea58e commit 61eb08e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions button/lib/_text-button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ $light-theme: tokens.md-comp-text-button-values();
@mixin theme-styles($theme, $resolvers: resolvers.$material) {
$theme: theme.validate-theme-styles($light-theme, $theme);
// TODO(b/198759625): Remove once spacing tokens are formally added
$theme: map.set($theme, 'spacing-leading', 24px);
$theme: map.set($theme, 'spacing-trailing', 24px);
$theme: map.set($theme, 'with-icon-spacing-leading', 16px);
$theme: map.set($theme, 'with-icon-spacing-trailing', 24px);
$theme: map.set($theme, 'with-trailing-icon-spacing-leading', 24px);
$theme: map.set($theme, 'with-trailing-icon-spacing-trailing', 16px);
$theme: map.set($theme, 'spacing-leading', 12px);
$theme: map.set($theme, 'spacing-trailing', 12px);
$theme: map.set($theme, 'with-icon-spacing-leading', 12px);
$theme: map.set($theme, 'with-icon-spacing-trailing', 16px);
$theme: map.set($theme, 'with-trailing-icon-spacing-leading', 16px);
$theme: map.set($theme, 'with-trailing-icon-spacing-trailing', 12px);
$theme: _resolve-theme($theme, $resolvers);
$theme: theme.create-theme-vars($theme, $_custom-property-prefix);

Expand Down

0 comments on commit 61eb08e

Please sign in to comment.