material-components / material-components/material-components-android

[MaterialButton] `iconSize` does not always match Material 3 specs

Open
#3,428 1 comment 0 reactions 1 assignee View on GitHub

@afohrman is already working on this.

Since May 31, 2023.

bug Widget: Button
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:** The Material 3 `MaterialButton` style `Widget.Material3.Button.OutlinedButton.Icon` does not specify an `iconSize` so this remains at the default `wrap_content` rather than the `18dp` value defined in the [Material 3 spec](https://m3.material.io/components/buttons/specs#309d928e-e9ef-41dd-89fc-9bc51f78709c).

**Expected behavior:** Material 3 Button `.Icon` styles (or their parents) should all specify a default `app:iconSize` of `18dp`.

**Source code:**

```xml

```

The icon displayed by this button will be as large as the icon itself (due to `MaterialButton` using `wrap_content` for `iconSize` by default).

**Material Library version:** 1.7.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.