angular / angular/components

docs-bug(button): Change icon button size missing

Open
#30,448 2 comments 18 reactions 0 assignees View on GitHub
area: material/button area: material/icon docs needs: discussion P2
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

### Documentation Feedback

There is only an example to change some colours of a button (https://material.angular.io/components/button/styling) but no example of changing the size.
Especially for icon buttons, different sizes are often needed. Right now we are using something like that:
```
.mdc-icon-button.small {
line-height: 18px;
.mat-icon {
width: 18px;
height: 18px;
font-size: 18px;
}
}
```
which is probably not the preferred way. I also tried it with:
```
.small {
@include mat.icon-button-overrides((
icon-size: 18px
));
}
```
which doesn't work as expected.

![Image](https://github.com/user-attachments/assets/c0682e91-4f4b-4af9-8e85-5705560b83af)

### Affected documentation page

https://material.angular.io/components/button/styling

Contributor guide

Open the contributing guide

Research direction

Start with the affected button styling documentation page and compare its existing color-customization example with the reported icon-button Sass snippets. Determine the supported way to customize icon-button size, document it with a working example, and verify that the rendered example matches the intended sizes.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, sass
Domain
design, documentation, frontend
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.