Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the site higher contrast for accessibility #970

Merged
merged 24 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2558476
Make white value true white
TrialDragon Feb 16, 2024
8dc47cb
Make get started button higher contrast
TrialDragon Feb 16, 2024
2558023
Make donate button higher contrast
TrialDragon Feb 16, 2024
0f7ff17
Make the header message higher contrast
TrialDragon Feb 16, 2024
cd0c715
Make docs footer higher contrast
TrialDragon Feb 16, 2024
431ca81
Make anchor links higher contrast
TrialDragon Feb 16, 2024
cf1a43d
Remove duplicates in scss
TrialDragon Feb 16, 2024
2e21516
Make code blocks higher contrast
TrialDragon Feb 16, 2024
bcb98a1
Make incorrect code blocks higher contrast
TrialDragon Feb 16, 2024
c206d76
Make subtitles higher contrast
TrialDragon Feb 16, 2024
374ea40
Revert "Remove duplicates in scss"
TrialDragon Feb 16, 2024
ec59445
Make image compare higher contrast
TrialDragon Feb 16, 2024
abcf6d9
Make button borders stand out less
TrialDragon Feb 17, 2024
970b59d
Desaturate buttons
TrialDragon Feb 17, 2024
ed6d666
Merge branch 'main' into 3_higher_contrast
TrialDragon Feb 17, 2024
579d4f7
Merge branch 'main' into 3_higher_contrast
TrialDragon Feb 17, 2024
550942e
Revert "Make white value true white"
TrialDragon Feb 17, 2024
31f921d
Use button colors similar to original
TrialDragon Feb 17, 2024
d04ca1f
Make button borders similar to original
TrialDragon Feb 17, 2024
4cad7df
Merge branch 'main' into 3_higher_contrast
TrialDragon Feb 20, 2024
96b8d34
Add final newline
TrialDragon Feb 20, 2024
b69b0c1
Lighten border instead of darken
cart Feb 21, 2024
519b13d
Merge branch 'main' into 3_higher_contrast
TrialDragon Feb 21, 2024
20bdfd9
Revert forestgreen image-comparison
cart Feb 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sass/_utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ body:not(.show_drafts) .public_draft:not(.active_draft) {
.anchor-link:link,
.anchor-link:visited {
margin-left: 0.3rem;
color: #505050;
color: #737373;
text-shadow: none;
font-weight: 500;
}
Expand All @@ -56,4 +56,4 @@ body:not(.show_drafts) .public_draft:not(.active_draft) {

.draft-header {
margin-bottom: 0.5rem;
}
}
6 changes: 3 additions & 3 deletions sass/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $color-black: #000;
$color-white: #ececec;
$color-grey-800: #232326;
$color-grey-900: #1e1e22;
$color-pink: #bb799c;
$color-pink: #9f517a;
$color-gold: #d2be4a;

$headerbar-color: #1e1e22;
Expand All @@ -31,7 +31,7 @@ $hover-shadow-color: #d6d6d6;
$link-color: #7c90ff;
$link-hover-shadow-color: #6c82ff;
$default-color: #ececec;
$subtitle-color: #8f8f8f;
$subtitle-color: #999;
$syntax-theme-background: #2b2c2f;
$syntax-theme-background-hover: #414247;
$default-image-background-color: #1b1b1b;
Expand Down Expand Up @@ -63,4 +63,4 @@ $border-radius: 10px;
}

// Accessibility
$focus-outline: solid #b1d9ff 3px;
$focus-outline: solid #b1d9ff 3px;
68 changes: 35 additions & 33 deletions sass/components/_button.scss
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
.button {
$color-blue: #799bbb;
$color-blue: #4a6e91;

display: inline-flex;
align-items: center;
background-color: $color-blue;
border: 3px solid #576f86;
padding: 6px 8px;
border-radius: $border-radius;
font-size: 1.2rem;
font-weight: 500;
transition: transform $duration-fast;
display: inline-flex;
align-items: center;
background-color: $color-blue;
border: 3px solid darken($color-blue, 10%);
padding: 6px 8px;
border-radius: $border-radius;
font-size: 1.2rem;
font-weight: 500;
transition: transform $duration-fast;

&:hover {
background-color: darken($color-blue, 3%);
}
&:hover {
background-color: darken($color-blue, 3%);
}

&:active {
transform: translateY(2px);
}
&:active {
transform: translateY(2px);
}

&, &:hover, &:visited {
color: $color-white;
text-decoration: none;
}
&,
&:hover,
&:visited {
color: $color-white;
text-decoration: none;
}

&__icon {
height: 1.1em;
vertical-align: middle;
margin-left: 0.2em;
font-size: 0.9em;
}
&__icon {
height: 1.1em;
vertical-align: middle;
margin-left: 0.2em;
font-size: 0.9em;
}

&--pink {
background-color: $color-pink;
border-color: #865767;
&--pink {
background-color: $color-pink;
border-color: darken($color-pink, 10%);

&:hover {
background-color: darken($color-pink, 3%);
}
&:hover {
background-color: darken($color-pink, 3%);
}
}
}
}
8 changes: 4 additions & 4 deletions sass/components/_docs-footer.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.docs-footer {
$border-color: #2f3033;

$secondary-text-color: #8c8c8c;
--docs-footer-gap: 12px;

margin: 32px 0;
Expand Down Expand Up @@ -73,7 +73,7 @@

&__dir {
margin-bottom: 4px;
color: #666;
color: $secondary-text-color;
text-transform: uppercase;
font-size: 0.8rem;
line-height: 1;
Expand All @@ -97,11 +97,11 @@
font-size: 0.9rem;

@include override-anchor {
color: #555;
color: $secondary-text-color;
}

&:hover {
color: #aaa;
color: lighten($secondary-text-color, 20%);
}

.icon {
Expand Down
2 changes: 1 addition & 1 deletion sass/components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
display: none;
font-size: 1.28rem;
font-weight: 500;
color: #797979;
color: #868686;
margin-left: 12px;
white-space: nowrap;

Expand Down
5 changes: 5 additions & 0 deletions sass/components/_image_compare.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ div.image-compare {
width: calc(100% - var(--text-padding));
text-shadow: 0 0 2px $color-black;
}

$before-after-color: forestgreen;

&::before {
@include image-title;

color: $before-after-color;
content: attr(data-title-a);
padding-left: var(--text-padding);
clip-path: var(--clip-L-geo);
Expand All @@ -39,6 +43,7 @@ div.image-compare {
&::after {
@include image-title;

color: $before-after-color;
content: attr(data-title-b);
padding-right: var(--text-padding);
clip-path: var(--clip-R-geo);
Expand Down
9 changes: 5 additions & 4 deletions sass/components/_syntax-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
}

div.incorrect {
$incorrect_block_background_color: #481e21;
position: relative;
background-color: #542326;
background-color: $incorrect_block_background_color;
border-left: 10px solid darkred;
border-radius: 10px;
padding-right: 55px;

.z-code,
.z-code code {
background-color: #542326;
background-color: $incorrect_block_background_color;
}
}

Expand Down Expand Up @@ -45,7 +46,7 @@ div.incorrect-image {

.z-comment,
.z-punctuation.z-definition.z-comment {
color: #65737e;
color: #8e9aa4;
}

.z-punctuation.z-definition.z-string,
Expand Down Expand Up @@ -116,7 +117,7 @@ div.incorrect-image {
}

.z-entity.z-name.z-tag {
color: #e05a67;
color: #e0858d;
}

.z-entity.z-other.z-attribute-name {
Expand Down