Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material-experimental/mdc-button): avoid shrinking FAB and icon button #23532

Merged
merged 1 commit into from Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/material-experimental/mdc-button/fab.scss
Expand Up @@ -11,6 +11,9 @@
@include button-base.mat-private-button-touch-target(true);
@include private.private-animation-noop();

// Prevent the button from shrinking since it's always supposed to be a circle.
flex-shrink: 0;

// MDC adds some styles to fab and mini-fab that conflict with some of our focus indicator
// styles and don't actually do anything. This undoes those conflicting styles.
&:not(.mdc-ripple-upgraded):focus::before {
Expand Down
3 changes: 3 additions & 0 deletions src/material-experimental/mdc-button/icon-button.scss
Expand Up @@ -15,6 +15,9 @@
// Border radius is inherited by ripple to know its shape. Set to 50% so the ripple is round.
border-radius: 50%;

// Prevent the button from shrinking since it's always supposed to be a circle.
flex-shrink: 0;

@include button-base.mat-private-button-disabled();
@include button-base.mat-private-button-touch-target(true);
@include private.private-animation-noop();
Expand Down