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/button): incorrect outlined focus overlay shape when border radius is customized #30513

Merged
merged 1 commit into from
Feb 24, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/material/button/button-high-contrast.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
@use '@angular/cdk';

// Add an outline to make buttons more visible in high contrast mode. Stroked buttons and FABs
// don't need a special look in high-contrast mode, because those already have an outline.
.mat-mdc-button:not(.mdc-button--outlined),
.mat-mdc-unelevated-button:not(.mdc-button--outlined),
.mat-mdc-raised-button:not(.mdc-button--outlined),
.mat-mdc-outlined-button:not(.mdc-button--outlined),
.mat-mdc-icon-button.mat-mdc-icon-button {
.mat-mdc-icon-button.mat-mdc-icon-button,
.mat-mdc-outlined-button .mdc-button__ripple {
@include cdk.high-contrast {
outline: solid 1px;
}
Expand Down
8 changes: 0 additions & 8 deletions src/material/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,6 @@
@include token-utils.create-token-slot(color, disabled-label-text-color);
@include token-utils.create-token-slot(border-color, disabled-outline-color);
}

// TODO(crisbeto): this causes a weird gap between the ripple and the
// outline. We should remove it and update the screenshot tests.
.mdc-button__ripple {
@include token-utils.create-token-slot(border-width, outline-width);
border-style: solid;
border-color: transparent;
}
}
}

Expand Down
Loading