Skip to content

Commit 7449bf3

Browse files
accessibility: Larger font sizes and higher contrast link color (#66)
- Increase contrast of body link color to WCAG AAA level on white (fix #54) - Increase size of text on docs page (fix #18) - Adjust font sizes to address small font and layout inconsistencies between pages (side-effects from flatdoc CSS)
1 parent a806624 commit 7449bf3

4 files changed

Lines changed: 17 additions & 9 deletions

File tree

_sass/_base.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,18 @@ h1, h2, h3, h4, h5, h6 {
9191
/**
9292
* Links
9393
*/
94-
a {
95-
color: $brand-color;
94+
a,
95+
.content-root a,
96+
.content-root .menu a {
97+
color: $link-color;
9698
text-decoration: none;
9799

98100
&:visited {
99-
color: darken($brand-color, 15%);
101+
color: darken($link-color, 15%);
100102
}
101103

102104
&:hover {
103-
color: $text-color;
105+
color: lighten($link-color, 20%);
104106
text-decoration: underline;
105107
}
106108
}

_sass/_docs.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
.content-root {
2+
font-size: 1.1rem;
3+
color: $text-color;
24
padding-top: 4em;
35

46
div.menubar.fixed {
57
will-change: transform;
6-
padding-top: 4em;
8+
padding-top: 75px;
79
}
810

911
.content h2 {

_sass/_layout.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
padding-left: 2em;
2323
font-family: $base-font-family;
2424
font-weight: $base-font-weight;
25-
font-size: 3em;
25+
font-size: 3rem;
2626
float: left;
2727
color: $purple-color;
2828

@@ -33,13 +33,16 @@
3333
}
3434

3535
.site-logo {
36+
font-size: 1.1rem;
3637
position: absolute;
3738
top: 0.4em;
3839
width: 7em;
3940
left: 0.3em;
4041
}
4142

4243
.site-nav {
44+
font-size: 1.1rem;
45+
font-family: $base-font-family;
4346
float: right;
4447
line-height: 65px;
4548

@@ -51,7 +54,7 @@
5154
line-height: $base-line-height;
5255
font-family: $base-font-family;
5356
color: $blue-color;
54-
font-size: 1.5em;
57+
font-size: 1.5rem;
5558

5659
// Gaps between nav items, but not on the first one
5760
&:not(:first-child) {
@@ -220,7 +223,7 @@
220223

221224
.page-title {
222225
font-weight: $base-font-weight;
223-
font-size: 3em;
226+
font-size: 3rem;
224227
}
225228

226229
.post-list {

css/main.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ $spacing-unit: 30px;
1818

1919
$text-color: #111;
2020
$background-color: #fdfdfd;
21-
$brand-color: #0874df;
21+
$brand-color: #0873dd;
22+
$link-color: #0754a2;
2223

2324
$grey-color: #828282;
2425
$light-grey: #F2F1EF;

0 commit comments

Comments
 (0)