Skip to content

M3 Buttons have incorrect padding values from spec  #118182

@esouthren

Description

@esouthren

Raised internally via b/263865808.

According to spec (https://m3.material.io/components/buttons/specs), Outlined, Elevated and Filled buttons should have horizontal: 24 padding with no icon, and (left: 16, right 24) padding with an icon.

image

Text buttons are slightly different and should have symmetric(horizontal: 12) padding with no icon, and (left: 12, right 16) padding with an icon:

image

However, in the current implementation OutlinedButton, ElevatedButton and FilledButton, padding is set to horizontal: 16 with no icon, and left:12, right:16 with an icon.

TextButtons have all: 8 with no icon or left:12, right: 16) with an icon.

These values are correct for a Material 2 specification (https://m2.material.io/components/buttons#specs), so I think they just need to be updated for M3 values.

Metadata

Metadata

Assignees

Labels

f: material designflutter/packages/flutter/material repository.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions