Skip to content

Commit

Permalink
improve accessibility: underline links, change colors
Browse files Browse the repository at this point in the history
  • Loading branch information
blahosyl committed Mar 10, 2024
1 parent a2df659 commit a4983b7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,15 @@ Palette: Arctic, northern lights

Color arrangement inspiration: [https://youpreneur.com/](https://youpreneur.com/)

2 salient colors combined with white, gray and black.
2 salient colors (#9FFFCB and #004e64) combined with white, gray (#537D88) and dark gray (#3C5158).

Contrast between 2 salient colors: 7.75:1 ([WebAIM](https://webaim.org/resources/contrastchecker/))

Light and dark gray: 7.02:1
Dark and white: 9.23:1
Dark gray and white: 4.5:1 (only used for large text)
Gray and light: 3.78:1 (only used for graphical objects)

<!--TODO: decide if we wanna introduce a 3rd salient color, like the green accents on hover-->

Color variables were used instead of hard-coding colors for each element, so that the overall color scheme can easily be modified in the future if needed. This was based on the [W3Schools tutorial on variables](https://www.w3schools.com/css/css3_variables.asp), a resource pointed out by my mentor.
Expand Down
28 changes: 14 additions & 14 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
--dark: #004e64;
--white: #ffffff;
--light: #9fffcb;
--gray: #62929e;
--dark-gray: #516f77;
--gray: #537D88;
--dark-gray: #3C5158;
}

/* overall style, override browser defaults */
Expand Down Expand Up @@ -229,20 +229,15 @@ p {

#solutions p,
#solutions ul {
color: var(--gray);
color: var(--dark-gray);
}

/* inline links */

#solutions a {
text-decoration: none;
color: var(--dark);
}

#solutions a:hover {
color: var(--white);
}

#problems-solutions p {
margin: 0.5rem 0;
}
Expand Down Expand Up @@ -450,15 +445,10 @@ this is not displayed by default, only when tapped/hovered over */
/* inline links within the content on the flip side of the cards*/

.cred-content a {
text-decoration: none;
color:inherit;
font-weight: bold;
}

.cred-content a:hover {
color: var(--light);
}

/* the title of the leadership position held by the client */
.pos {
font-size: 120%;
Expand Down Expand Up @@ -681,10 +671,20 @@ footer ul {
/* laptops and desktops */
@media screen and (min-width: 992px) {

/* links change color when hovered over */
/* links change color and are underlined when hovered over */
a:hover,
a:hover i { /* footer icons included*/
color: var(--white);
text-decoration: underline;
}

#solutions a:hover {
color: var(--white);
font-weight: bold;
}

.cred-content a:hover {
color: var(--light);
}

/* hero image */
Expand Down

0 comments on commit a4983b7

Please sign in to comment.