Uh oh!
There was an error while loading. Please reload this page.
doc: add dark mode styles - #36306
Conversation
Pulled colors from nodejs.dev Refs: nodejs#35793
| } | ||
| @media (prefers-color-scheme: dark) { | ||
| body { | ||
| background-color: #090c15; |
There was a problem hiding this comment.
Can you please remove the trailing whitespace?
| color: #cbd4d9; | ||
| } | ||
| a:link { | ||
| color: #5fa04e; |
| color: #5fa04e; | ||
| } | ||
| #column2.interior, #column2 ul { | ||
| background-color: #0d111d; |
Trott
commented
Nov 30, 2020
Trott
commented
Nov 30, 2020
Are the different background colors between the nav pane on the left and the main display area intentional? They're similar...but not quite the same. |
Trott
left a comment
There was a problem hiding this comment.
Thanks for doing this! The color contrast issue is definitely something we'd want fixed before landing but all my other comments are things that can be ignored for now as minor.
Trott
commented
Nov 30, 2020
@nodejs/website If we do this for the docs, I imagine we'd want to do it for the rest of the site as well? So I imagine you'll have some thoughts.... |
Needs to handle borders, dividers, etc. Essentially dark mode should remap every color. I suggest using CSS variables instead of hardcoding colors which among maintenance benefits also allows easier third-party theming. Also, that shade of blue seems rather opinionated to me. suggest a neutral dark gray like Also, I do think we need it toggleable via JS, not just via |
jabyrd3
commented
Nov 30, 2020
jabyrd3
commented
Nov 30, 2020
They are; I mimicked https://nodejs.dev as requested in the original ticket. If we want to use different values though, I'm open to suggestions. |
jabyrd3
commented
Nov 30, 2020
For the borders/dividers, the existing values for borders (usually lighter shades), meshed well with the values from https://nodejs.dev. As far as using CSS variables go, nothing else in either stylesheet for this set of pages is using CSS variables, so it seemed reasonable to me to match the existing patterns instead of refactoring the entire stylesheet, or only using variables for the darkmode theme.
I pulled all color values from https://nodejs.dev; I've got no preferences for these, if we want to change the values I'm open to suggestions.
I'm amenable to this, I can push another commit to this PR this evening, EST, if its a blocking concern. |
One example of a border that will not work is the Regarding variables: I think it's reasonable to do now. This indirection for colors was not necessary before but is now with two themes. |
DerekNonGeneric
left a comment
There was a problem hiding this comment.
This is a very good start! Something that I would be interested in seeing is having a way to toggle between the two modes. If that's not included in this PR, it can surely come later, though.
jabyrd3
commented
Dec 1, 2020
Yeah, I intended to add a toggle yesterday evening but my day job ended up running a bit long, will try to add something in today. |
aduh95
commented
Feb 5, 2021
@jabyrd3 do you still want to work on this? You'd need to rebase the PR to resolve the git conflict. Also, it'd be nice to use the |
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
Closing this because it has stalled. Feel free to reopen if this PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. |



Pulled colors from nodejs.dev
Refs: #35793
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes