docs icon indicating copy to clipboard operation
docs copied to clipboard

Dark Mode for Documentation: For the Love of all that is Good and Proper

Open keepforever opened this issue 5 years ago β€’ 7 comments

Problem πŸ‘πŸ—‘πŸ‘πŸ—‘

When I or one of the other Lizard People who live and work under rocks late, late into the evening need to read the documentation we have to have our retinas scorched when we go from our nice black background text editor to the fiery inferno of an all-white background.

Solution

A smattering of CSS, maybe a local storage toggle?

Alternatives

const  = '🐢There are no alternatives, only Zuul...'

Yeah, there are extensions to force dark mode, but the code blocks always look funky and you lose all syntax highlighting, among other wonky stuff.

Additional context

It would really REALLY make the docs more pleasant to interact with for a significant portion of the community.

✌🏼, ~B

keepforever avatar Apr 16 '20 23:04 keepforever

What is the desire for this from Prisma team and would there be any criteria, or "just make it look nice" would do?

JacobMGEvans avatar Nov 17 '21 00:11 JacobMGEvans

πŸ–€

Aprillion avatar Nov 17 '21 17:11 Aprillion

Thank you @keepforever for your impassioned plea... seems you are not alone. πŸ–€ We are having internal chat about it, and taking a look at a few options. Thanks again!

tanberry avatar Nov 19 '21 18:11 tanberry

@tanberry, awesome! One suggestion would be to go for a dark scheme that's got a charcole-ish background with light-gray text as opposed to a pure "white text on black". The light gray is a lot easier on folks (like myself) who have astigmatism.

Material UI's docs page does this nicely (red arrow).

Whereas "The React" white text is too white.

image

keepforever avatar Nov 19 '21 18:11 keepforever

Lobbying continues. ;-)

tanberry avatar Aug 26 '22 15:08 tanberry

@julietacurdi :-)

tanberry avatar Aug 30 '22 13:08 tanberry

Please, my eyes. MY EYES!

EDIT: Came back in November, my eyes are still bleeding.

ryanbarr avatar Sep 20 '22 03:09 ryanbarr

I can recommend using this browser extension, https://darkreader.org/ while waiting. It works really well and for all websites ✨

Jolg42 avatar Jan 09 '23 14:01 Jolg42

I am here to Lobby

BrennerSpear avatar Jan 11 '23 04:01 BrennerSpear

A toggle, please...

kotiell avatar Mar 11 '23 23:03 kotiell

bump

moselhy avatar Apr 08 '23 03:04 moselhy

UserCSS (Chrome plugin) theme to make Prisma's documentation in dark mode in this gist.

Hopefully my poor color choices enrage the Prisma docs authors enough to make a better one!

AndrewRayCode avatar May 15 '23 04:05 AndrewRayCode

I'd like to register my interest as well, I use a bunch of technologies and the vast majority of their doc sites support dark mode. E.g.

But I always dread having to look something up on the Prisma docs for the reason OP mentioned. I spend many hours staring at a computer screen every day so it is a lot easier on the eyes to use everything in dark mode, but when opening the Prisma docs this happens every damn time...

flashbang-flash

mikemeerschaert avatar Aug 17 '23 15:08 mikemeerschaert

Great library Costs you your retinas

Baggiest avatar Sep 01 '23 21:09 Baggiest

@Baggiest Great library Costs you your retinas

No longer! We've got an initial beta-ish implementation.

Notes:

  • This is a minimal solution. More work (themes, buttons, etc etc) is coming along.
  • The Dark/Light mode of the docs will match your system preferences. Since this is a super minimal version there's no toggle switch at this time.
  • There will still be a few UI components which might look odd. In general, these will be fixed in a later (and bigger!) revamp unless it's not readable or accessible. If you come across something that's unreadable or inaccessible, please let us know.

Thanks folks and may your eyes be forever protected. 🌚

jharrell avatar Sep 05 '23 14:09 jharrell

Awesome change! Although there is an issue with highlighted code in dark theme that makes it unreadable: #5285

Adomas-Alimas avatar Sep 06 '23 13:09 Adomas-Alimas

Our latest Docs update includes a proper Dark/Light mode, including a toggle switch. 🌚 If you come across something that's unreadable or inaccessible, please let us know via a new issue.

meletj avatar Apr 24 '24 17:04 meletj

Wow, what a ride this issue has been. It was always good for a nice surprise notification. I will miss it and all of you. Xoxo

πŸͺ¦ 🫑

keepforever avatar Apr 24 '24 17:04 keepforever