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

Increase text contrast for dark mode #308

Merged
merged 4 commits into from
Sep 26, 2023

Conversation

jonathanhefner
Copy link
Member

@jonathanhefner jonathanhefner commented Sep 15, 2023

This PR includes a handful of commits that improve readability when using dark mode.

Closes #307.

Before (Firefox defaults) After (Firefox defaults) Before (18px serif, 17px mono) After (18px serif, 17px mono)
before-dark-defaults after-dark-defaults before-dark-custom after-dark-custom
before-light-defaults after-light-defaults before-light-custom after-light-custom

jonathanhefner and others added 4 commits September 23, 2023 15:45
This improves readability at smaller font sizes.
This wraps the name portion of a method's signature in a `<b>` tag,
including names in `:call-seq:` method signatures.

In modern HTML, the `<b>` tag is "bring attention to element" rather
than "bold".  It is conventionally rendered with bold font weight, but
it has no semantic meaning (unlike, for example, the `<strong>` tag).

Co-authored-by: Shouichi Kamiya <[email protected]>
Monospace fonts are commonly rendered at a smaller point size than
proportional fonts.  In some cases, such as with the default font sizes
of Firefox on Linux, the monospace font at 110% size is still smaller
than the proportional font at 100% size.  To ensure that method
signatures appear at least as large as their subsequent descriptions,
this commit changes their font size to `1rem`.
The distinction provided by the bold isn't necessary, and it added extra
visual weight to the page.
@jonathanhefner jonathanhefner force-pushed the dark-mode-increase-contrast branch from 735a226 to e0f8e54 Compare September 23, 2023 21:25
@jonathanhefner jonathanhefner marked this pull request as ready for review September 23, 2023 21:26
@p8
Copy link
Member

p8 commented Sep 24, 2023

This is much easier to scan for me. 👍

@jonathanhefner jonathanhefner merged commit 0504c46 into rails:main Sep 26, 2023
9 checks passed
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