Skip to content

Commit 1e13ab0

Browse files
Splaktarjelbourn
authored andcommittedSep 20, 2019
fix(a11y): various issues with contrast ratios (#635)
Fixes #398. Reverts #399.
1 parent 950a0e0 commit 1e13ab0

File tree

7 files changed

+26
-9
lines changed

7 files changed

+26
-9
lines changed
 

‎material.angular.io/src/app/pages/component-sidenav/_component-sidenav-theme.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
&.docs-component-viewer-sidenav-item-selected,
3737
&:hover {
38-
color: mat-color($primary);
38+
color: mat-color($primary, if($is-dark-theme, 200, default));
3939
}
4040
}
4141
}

‎material.angular.io/src/app/pages/guide-list/_guide-list-theme.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
$warn: map-get($theme, warn);
77
$background: map-get($theme, background);
88
$foreground: map-get($theme, foreground);
9+
$is-dark-theme: map-get($theme, is-dark);
910

1011
.docs-guide-list .docs-guide-item {
11-
color: mat-color($primary);
12+
color: mat-color($primary, if($is-dark-theme, 200, default));
1213
}
1314
}

‎material.angular.io/src/app/shared/table-of-contents/_table-of-contents-theme.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
$warn: map-get($theme, warn);
55
$background: map-get($theme, background);
66
$foreground: map-get($theme, foreground);
7+
$is-dark-theme: map-get($theme, is-dark);
78

89
.docs-toc-container {
910
border-left: solid 4px mat-color($primary);
@@ -14,7 +15,7 @@
1415

1516
&:hover,
1617
&.docs-active {
17-
color: mat-color($primary);
18+
color: mat-color($primary, if($is-dark-theme, 200, default));
1819
}
1920
}
2021
}

‎material.angular.io/src/highlightjs/material-dark.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Orginal Style from https://github.com/Kelbster/highlightjs-material-dark-theme
1818
}
1919

2020
.hljs-comment {
21-
color: #656565;
21+
color: #9E9E9E;
2222
font-style: italic;
2323
}
2424

‎material.angular.io/src/highlightjs/material-light.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818

1919
.hljs-comment {
20-
color: #B0BEC5;
20+
color: #616161;
2121
font-style: italic;
2222
}
2323

‎material.angular.io/src/styles/_api-theme.scss

+18-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,24 @@
99
$foreground: map-get($theme, foreground);
1010
$is-dark-theme: map-get($theme, is-dark);
1111

12-
.docs-api-method-returns-type,
13-
.docs-api-method-parameter-type {
14-
color: mat-color($primary, darker);
12+
@if $is-dark-theme {
13+
.docs-api-method-name-cell {
14+
color: mat-color($primary, 200);
15+
}
16+
17+
.docs-api-method-returns-type,
18+
.docs-api-method-parameter-type {
19+
color: mat-color($primary, 200);
20+
}
21+
} @else {
22+
.docs-api-method-name-cell {
23+
color: mat-color($primary, 800);
24+
}
25+
26+
.docs-api-method-returns-type,
27+
.docs-api-method-parameter-type {
28+
color: mat-color($primary, darker);
29+
}
1530
}
1631

1732
// Force the top-level API docs header to be hidden, since this is already

‎material.angular.io/src/styles/_markdown-theme.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
.docs-markdown {
1414
a {
15-
color: mat-color($primary);
15+
color: mat-color($primary, if($is-dark-theme, 200, default));
1616
}
1717

1818
pre {

0 commit comments

Comments
 (0)
Please sign in to comment.