mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(a11y): output less CSS for high contrast styles (#14567)
Reworks the media query to output slightly less CSS. Also fixes a high contrast selector in the badge that was being output 3 times unnecessarily.
This commit is contained in:
committed by
Jeremy Elbourn
parent
61d3cf8144
commit
766dbca23b
@@ -26,7 +26,7 @@
|
||||
* `white-on-black` or `black-on-white`.
|
||||
*/
|
||||
@mixin cdk-high-contrast($target: active) {
|
||||
@media screen and (-ms-high-contrast: $target) {
|
||||
@media (-ms-high-contrast: $target) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,11 +18,6 @@ $mat-badge-large-size: $mat-badge-default-size + 6;
|
||||
width: $size;
|
||||
height: $size;
|
||||
line-height: $size;
|
||||
|
||||
@include cdk-high-contrast {
|
||||
outline: solid 1px;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.mat-badge-above {
|
||||
@@ -102,6 +97,11 @@ $mat-badge-large-size: $mat-badge-default-size + 6;
|
||||
.mat-badge-content {
|
||||
color: mat-color($primary, default-contrast);
|
||||
background: mat-color($primary);
|
||||
|
||||
@include cdk-high-contrast {
|
||||
outline: solid 1px;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-badge-accent {
|
||||
|
||||
Reference in New Issue
Block a user