Skip to content

Commit eba2f8c

Browse files
allan-chencopybara-github
authored andcommitted
feat(button): update tokens excluding padding
PiperOrigin-RevId: 401820667
1 parent def17cd commit eba2f8c

File tree

6 files changed

+80
-80
lines changed

6 files changed

+80
-80
lines changed

components/button/lib/_button-theme.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
@use '@material/typography/typography';
1313

1414
$light-theme: (
15-
container-height: 36px,
16-
container-shape: 4px,
15+
container-height: 40px,
16+
container-shape: 100px,
1717
label-text-font: typography.get-font(button),
18-
label-text-size: typography.get-size(button),
19-
label-text-tracking: typography.get-tracking(button),
20-
label-text-transform: uppercase,
21-
label-text-weight: typography.get-weight(button),
18+
label-text-size: 14px,
19+
label-text-tracking: typography.px-to-rem(0.1px),
20+
label-text-transform: none,
21+
label-text-weight: 500,
2222
with-icon-icon-size: 18px,
2323
);
2424

components/button/lib/_elevated-button-theme.scss

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,31 @@ $_custom-property-prefix: 'elevated-button';
1616
$light-theme: map.merge(
1717
button-theme.$light-theme,
1818
(
19-
container-color: #6200ee,
19+
container-color: #fffbfe,
2020
container-elevation: 1,
2121
container-shadow-color: #000,
22-
disabled-container-color: rgba(#000, 0.12),
22+
disabled-container-color: rgba(#1c1b1f, 0.12),
2323
disabled-container-elevation: 0,
24-
disabled-label-text-color: rgba(#000, 0.38),
24+
disabled-label-text-color: rgba(#1c1b1f, 0.38),
2525
focus-container-elevation: 1,
26-
focus-label-text-color: #fff,
27-
focus-state-layer-color: #fff,
28-
focus-state-layer-opacity: 0.24,
26+
focus-label-text-color: #6750a4,
27+
focus-state-layer-color: #6750a4,
28+
focus-state-layer-opacity: 0.12,
2929
hover-container-elevation: 3,
30-
hover-label-text-color: #fff,
31-
hover-state-layer-color: #fff,
30+
hover-label-text-color: #6750a4,
31+
hover-state-layer-color: #6750a4,
3232
hover-state-layer-opacity: 0.08,
33-
label-text-color: #fff,
33+
label-text-color: #6750a4,
3434
pressed-container-elevation: 1,
35-
pressed-label-text-color: #fff,
36-
pressed-state-layer-color: #fff,
37-
pressed-state-layer-opacity: 0.24,
38-
surface-tint-layer-color: transparent,
39-
with-icon-disabled-icon-color: rgba(#000, 0.38),
40-
with-icon-focus-icon-color: #fff,
41-
with-icon-hover-icon-color: #fff,
42-
with-icon-icon-color: #fff,
43-
with-icon-pressed-icon-color: #fff,
35+
pressed-label-text-color: #6750a4,
36+
pressed-state-layer-color: #6750a4,
37+
pressed-state-layer-opacity: 0.12,
38+
surface-tint-layer-color: #6750a4,
39+
with-icon-disabled-icon-color: rgba(#1c1b1f, 0.38),
40+
with-icon-focus-icon-color: #6750a4,
41+
with-icon-hover-icon-color: #6750a4,
42+
with-icon-icon-color: #6750a4,
43+
with-icon-pressed-icon-color: #6750a4,
4444
)
4545
);
4646

components/button/lib/_filled-button-theme.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ $_custom-property-prefix: 'filled-button';
1616
$light-theme: map.merge(
1717
button-theme.$light-theme,
1818
(
19-
container-color: #6200ee,
19+
container-color: #6750a4,
2020
container-elevation: 0,
2121
container-shadow-color: #000,
22-
disabled-container-color: rgba(#000, 0.12),
22+
disabled-container-color: rgba(#1c1b1f, 0.12),
2323
disabled-container-elevation: 0,
24-
disabled-label-text-color: rgba(#000, 0.38),
24+
disabled-label-text-color: rgba(#1c1b1f, 0.38),
2525
focus-container-elevation: 0,
2626
focus-label-text-color: #fff,
2727
focus-state-layer-color: #fff,
28-
focus-state-layer-opacity: 0.24,
29-
hover-container-elevation: 0,
28+
focus-state-layer-opacity: 0.12,
29+
hover-container-elevation: 1,
3030
hover-label-text-color: #fff,
3131
hover-state-layer-color: #fff,
3232
hover-state-layer-opacity: 0.08,
3333
label-text-color: #fff,
3434
pressed-container-elevation: 0,
3535
pressed-label-text-color: #fff,
3636
pressed-state-layer-color: #fff,
37-
pressed-state-layer-opacity: 0.24,
38-
with-icon-disabled-icon-color: rgba(#000, 0.38),
37+
pressed-state-layer-opacity: 0.12,
38+
with-icon-disabled-icon-color: rgba(#1c1b1f, 0.38),
3939
with-icon-focus-icon-color: #fff,
4040
with-icon-hover-icon-color: #fff,
4141
with-icon-icon-color: #fff,

components/button/lib/_outlined-button-theme.scss

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ $_custom-property-prefix: 'outlined-button';
2020
$light-theme: map.merge(
2121
button-theme.$light-theme,
2222
(
23-
disabled-label-text-color: rgba(#000, 0.38),
24-
disabled-outline-color: rgba(#000, 0.12),
25-
focus-label-text-color: #6200ee,
26-
focus-outline-color: rgba(#000, 0.12),
27-
focus-state-layer-color: #fff,
23+
disabled-label-text-color: rgba(#1c1b1f, 0.38),
24+
disabled-outline-color: rgba(#1c1b1f, 0.12),
25+
focus-label-text-color: #6750a4,
26+
focus-outline-color: #79747e,
27+
focus-state-layer-color: #6750a4,
2828
focus-state-layer-opacity: 0.12,
29-
hover-label-text-color: #6200ee,
30-
hover-outline-color: rgba(#000, 0.12),
31-
hover-state-layer-color: #6200ee,
32-
hover-state-layer-opacity: 0.04,
33-
label-text-color: #6200ee,
34-
outline-color: rgba(#000, 0.12),
29+
hover-label-text-color: #6750a4,
30+
hover-outline-color: #79747e,
31+
hover-state-layer-color: #6750a4,
32+
hover-state-layer-opacity: 0.08,
33+
label-text-color: #6750a4,
34+
outline-color: #79747e,
3535
outline-width: 1px,
36-
pressed-label-text-color: #6200ee,
37-
pressed-state-layer-color: #6200ee,
36+
pressed-label-text-color: #6750a4,
37+
pressed-state-layer-color: #6750a4,
3838
pressed-state-layer-opacity: 0.12,
39-
with-icon-disabled-icon-color: rgba(#000, 0.38),
40-
with-icon-focus-icon-color: #6200ee,
41-
with-icon-hover-icon-color: #6200ee,
42-
with-icon-icon-color: #6200ee,
43-
with-icon-pressed-icon-color: #6200ee,
39+
with-icon-disabled-icon-color: rgba(#1c1b1f, 0.38),
40+
with-icon-focus-icon-color: #6750a4,
41+
with-icon-hover-icon-color: #6750a4,
42+
with-icon-icon-color: #6750a4,
43+
with-icon-pressed-icon-color: #6750a4,
4444
)
4545
);
4646

components/button/lib/_text-button-theme.scss

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ $_custom-property-prefix: 'text-button';
1616
$light-theme: map.merge(
1717
button-theme.$light-theme,
1818
(
19-
disabled-label-text-color: rgba(#000, 0.38),
20-
focus-label-text-color: #6200ee,
21-
focus-state-layer-color: #6200ee,
19+
disabled-label-text-color: rgba(#1c1b1f, 0.38),
20+
focus-label-text-color: #6750a4,
21+
focus-state-layer-color: #6750a4,
2222
focus-state-layer-opacity: 0.12,
23-
hover-label-text-color: #6200ee,
24-
hover-state-layer-color: #6200ee,
25-
hover-state-layer-opacity: 0.04,
26-
label-text-color: #6200ee,
27-
pressed-label-text-color: #6200ee,
28-
pressed-state-layer-color: #6200ee,
23+
hover-label-text-color: #6750a4,
24+
hover-state-layer-color: #6750a4,
25+
hover-state-layer-opacity: 0.08,
26+
label-text-color: #6750a4,
27+
pressed-label-text-color: #6750a4,
28+
pressed-state-layer-color: #6750a4,
2929
pressed-state-layer-opacity: 0.12,
30-
with-icon-disabled-icon-color: rgba(#000, 0.38),
31-
with-icon-focus-icon-color: #6200ee,
32-
with-icon-hover-icon-color: #6200ee,
33-
with-icon-icon-color: #6200ee,
34-
with-icon-pressed-icon-color: #6200ee,
30+
with-icon-disabled-icon-color: rgba(#1c1b1f, 0.38),
31+
with-icon-focus-icon-color: #6750a4,
32+
with-icon-hover-icon-color: #6750a4,
33+
with-icon-icon-color: #6750a4,
34+
with-icon-pressed-icon-color: #6750a4,
3535
)
3636
);
3737

components/button/lib/_tonal-button-theme.scss

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,30 @@ $_custom-property-prefix: 'tonal-button';
1616
$light-theme: map.merge(
1717
button-theme.$light-theme,
1818
(
19-
container-color: #6200ee,
19+
container-color: #e8def8,
2020
container-elevation: 0,
2121
container-shadow-color: #000,
22-
disabled-container-color: rgba(#000, 0.12),
22+
disabled-container-color: rgba(#1c1b1f, 0.12),
2323
disabled-container-elevation: 0,
24-
disabled-label-text-color: rgba(#000, 0.38),
24+
disabled-label-text-color: rgba(#1c1b1f, 0.38),
2525
focus-container-elevation: 0,
26-
focus-label-text-color: #fff,
27-
focus-state-layer-color: #fff,
28-
focus-state-layer-opacity: 0.24,
26+
focus-label-text-color: #1d192b,
27+
focus-state-layer-color: #23005d,
28+
focus-state-layer-opacity: 0.12,
2929
hover-container-elevation: 0,
30-
hover-label-text-color: #fff,
31-
hover-state-layer-color: #fff,
30+
hover-label-text-color: #1d192b,
31+
hover-state-layer-color: #23005d,
3232
hover-state-layer-opacity: 0.08,
33-
label-text-color: #fff,
33+
label-text-color: #1d192b,
3434
pressed-container-elevation: 0,
35-
pressed-label-text-color: #fff,
36-
pressed-state-layer-color: #fff,
37-
pressed-state-layer-opacity: 0.24,
38-
with-icon-disabled-icon-color: rgba(#000, 0.38),
39-
with-icon-focus-icon-color: #fff,
40-
with-icon-hover-icon-color: #fff,
41-
with-icon-icon-color: #fff,
42-
with-icon-pressed-icon-color: #fff,
35+
pressed-label-text-color: #1d192b,
36+
pressed-state-layer-color: #23005d,
37+
pressed-state-layer-opacity: 0.12,
38+
with-icon-disabled-icon-color: rgba(#1c1b1f, 0.38),
39+
with-icon-focus-icon-color: #1d192b,
40+
with-icon-hover-icon-color: #1d192b,
41+
with-icon-icon-color: #1d192b,
42+
with-icon-pressed-icon-color: #1d192b,
4343
)
4444
);
4545

0 commit comments

Comments
 (0)