-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(material-experimental/mdc-button): high contrast outline for soli…
…tary 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 moves the high-contrast styles to their own file that's referenced from buttons and icon-buttons (but not FABs).
- Loading branch information
Showing
6 changed files
with
32 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/material-experimental/mdc-button/button-high-contrast.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@use '../../cdk/a11y'; | ||
|
||
// 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 { | ||
@include a11y.high-contrast(active, off) { | ||
outline: solid 1px; | ||
} | ||
} | ||
|
||
@include a11y.high-contrast(active, off) { | ||
.mat-mdc-button-base:focus { | ||
outline: solid 3px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters