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:
Kristiyan Kostadinov
2018-12-19 16:15:30 +01:00
committed by Jeremy Elbourn
parent 61d3cf8144
commit 766dbca23b
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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;
}
}
+5 -5
View File
@@ -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 {