Sitelet https://github.com/flutter/flutter/issues/118182
Skip to content

M3 Buttons have incorrect padding values from spec  #118182

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.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

p: material_uimaterial_ui package in flutter/packages

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions