Skip to content
This repository was archived by the owner on May 5, 2020. It is now read-only.

Commit f90a098

Browse files
committed
Updated colors to ensure WCAG AA level contrast
1 parent 02f01c7 commit f90a098

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

styles/modules/_globals.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,13 @@ a:link {
8989
}
9090

9191
a:visited {
92-
color: color(var(--linkColor) s(-25%));
92+
color: color(var(--linkColor) s(-40%) l(-10%));
93+
border-bottom-color: color(var(--linkColor) s(-40%) l(-10%) a(-50%));
9394
}
9495

9596
a:hover, a:focus {
9697
border-bottom-color: var(--linkColor);
98+
color: var(--linkColor);
9799
}
98100

99101
.is-reverse {
@@ -103,12 +105,14 @@ a:hover, a:focus {
103105
}
104106

105107
& a:visited {
106-
color: color(var(--linkColor-reverse) s(-25%));
108+
color: color(var(--linkColor-reverse) s(-40%));
109+
border-bottom-color: color(var(--linkColor-reverse) s(-40%) a(-50%));
107110
}
108111

109112
& a:hover,
110113
& a:focus {
111114
border-bottom-color: var(--linkColor-reverse);
115+
color: var(--linkColor-reverse);
112116
}
113117
}
114118

styles/modules/_variables.css

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
--lighter-4: rgba(255,255,255,0.5);
6060

6161
/* Colors */
62-
--cream : hsl(39 , 25%, 96%);
62+
--cream : hsl(40 , 15%, 96%);
6363
--magenta : hsl(329, 69%, 56%);
6464
--red : hsl(5 , 54%, 52%);
6565
--orange : hsl(18 , 73%, 52%);
@@ -70,22 +70,24 @@
7070
/*--teal : hsl(176, 61%, 60%);*/
7171
--aqua : hsl(198, 68%, 71%);
7272
--lightBlue : hsl(201, 58%, 62%);
73-
--blue : hsl(203, 47%, 55%);
73+
--blue : hsl(198, 76%, 32%);
7474
--navy : hsl(212, 48%, 22%);
75-
--lavender : hsl(263, 65%, 64%);
75+
--lavender : hsl(263, 65%, 68%);
7676

7777
--siteBkg: var(--cream);
7878
--textColor: var(--navy);
7979
--linkColor: var(--blue);
8080
--borderColor-light: color(var(--textColor) a(-75%));
8181

82-
--sectionBlockBorder-1: var(--blue);
82+
/* Since this color is also used for links, which must meet AA contrast guidelines,
83+
and since the border is much thicker than text, it needs adjustment to look right */
84+
--sectionBlockBorder-1: color(var(--blue) l(+8%)); /* 1 */
8385
--sectionBlockBorder-2: var(--red);
8486
--sectionBlockBorder-3: var(--yellow);
8587
--sectionBlockBorder-4: var(--green);
8688

8789
--siteBkg-reverse: hsl(212,20%,15%);
88-
--textColor-reverse: hsl(231,18%,75%);
90+
--textColor-reverse: hsl(212,15%,75%);
8991
--linkColor-reverse: var(--lavender);
9092
--borderColor-light-reverse: color(var(--textColor-reverse) a(-75%));
9193

0 commit comments

Comments
 (0)