Skip to content

Commit 7bac83a

Browse files
committed
fix(material-experimental/mdc-button): high contrast outline for solitary
icon-buttons The high-contrast style for all buttons was previously defined in `button.scss`, but icon-buttons load `icon-button.scss`. This means that the high contrast style for icon buttons was only loaded when another type of button was on the page. This change moved the icon-button high-contrast style to `icon-button.scss`.
1 parent b682f84 commit 7bac83a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/material-experimental/mdc-button/button.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
.mat-mdc-button:not(.mdc-button--outlined),
4848
.mat-mdc-unelevated-button:not(.mdc-button--outlined),
4949
.mat-mdc-raised-button:not(.mdc-button--outlined),
50-
.mat-mdc-outlined-button:not(.mdc-button--outlined),
51-
.mat-mdc-icon-button {
50+
.mat-mdc-outlined-button:not(.mdc-button--outlined) {
5251
@include a11y.high-contrast(active, off) {
5352
outline: solid 1px;
5453
}

src/material-experimental/mdc-button/icon-button.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@use '../../material/core/style/private';
33
@use '../mdc-helpers/mdc-helpers';
44
@use 'button-base';
5+
@use '../../cdk/a11y';
56

67
@include mdc-icon-button.without-ripple($query: mdc-helpers.$mat-base-styles-query);
78

@@ -28,4 +29,8 @@
2829
opacity: 1;
2930
}
3031
}
32+
33+
@include a11y.high-contrast(active, off) {
34+
outline: solid 1px;
35+
}
3136
}

0 commit comments

Comments
 (0)