Skip to content

Dark theme accessibility #4069

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

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

robbystk
Copy link
Contributor

Why

For #4031
In dark mode, <code> elements are red-on-black which is difficult to read

What Changed

  • Added a --code-color variable with existing color
  • Copied color from newsletter dark theme

Previous contrast ratio: 2.59:1
New contrast ratio: 5.48:1

Testing

  • Build the site with the rusted theme: pelican --delete-output-directory content
  • Check <code> elements in one of the posts. The 'Updates from the Rust Project' section has several

@andrewpollack
Copy link
Member

Thank you @robbystk ! This is a great improvement in accessibility, and I particularly like the use of the contrastchecker website. Merging now

(Left showing old coloring, right showing new)
Screen Shot 2023-02-20 at 12 09 54 PM

@andrewpollack andrewpollack merged commit 55a5fb2 into rust-lang:master Feb 20, 2023
@robbystk robbystk deleted the dark-theme-accessibility branch February 21, 2023 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants