-
Notifications
You must be signed in to change notification settings - Fork 812
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
Dark theme / night mod for PC #637
Comments
You can accomplish this with a user style. This is also a dupe of #404. |
I saw a dark mode screenshot by @lattera go by on Twitter, he suggested the Dark Reader browser extension. Hope this works out for you. |
Would it be of interest to add a dark mode using the CSS Pros:
I see no explicit downsides except that it requires some more CSS. And the obligatory disagreements on how a dark theme should look. Edit: this seems to have been brought up already https://lobste.rs/s/ntcqzp/dark_mode |
@magikid I agree, but I haven't registered yet. 😀 Would you mind sending me an invite? |
I apologize for resurrecting this thread. I'd be happy to provide a PR implementing a dark mode based on The good thing about
is not an issue, as ¹ There are two ways I'm able to read @pushcx comment, either as "I'll consider implementing this if there is overwhelming demand" or as "I'll accept an implementation if there is overwhelming demand". If it's the former, I'm happy to provide a PR. |
Sounds like a great approach that doesn't make the site any more complicated. I'd merge a PR for it. |
@pushcx Cool, thanks! |
Is there a way to get a Lobste.rs instance running without the database setup mentioned in the README? |
No, without the database it would have nothing to present. If you don't want to do the setup hassle, I'd say just Save pages in your browser as "web page, complete" and you'll have the css files in front of you to tweak and reload in the browser without any gem/rails/db hassles. When you're done, copy it into the repo and submit a PR. |
Ah, thanks! I came up with a similar way: Editing the CSS file in the IDE and just pasting it into the style editor in the browser tools. I factored out all the relevant CSS colors to variables already – which will make it much easier to adjust things (also with users' own userstyles that some may prefer). This brings me to the question: Are we supporting IE11? (Then I'll also add the required polyfill.) (I tried switching to ActiveRecord's |
Submitted a PR in #823. |
We don't serve js to logged-out users and MS still hasn't apologized for 90s IE, so, no. |
Great! :-) |
When you mention WCAG Guidelines, are you thinking of the color contrast guidelines or something else? |
Yes, the color contrast guidelines. Thanks for the clarification. |
There's no way I'm plugging in every single possible pair of colors into a rando tool one at a time for those vague guidelines, but it's moot as I reverted in 65b0b34. Browser support is insufficient for development. We can revisit when that's there. |
As for testing colors, there are existing dark theme colors we can just copy. I think Apple's are pretty good, but there are others. As for browser support, this is pretty much complete. p-c-s works on:
In all the above cases, dark theme is configured in the OS settings, not the browser settings, which seemed to be confusing people in IRC. The only major missing player is Chrome on Linux. |
@pushcx Re:
I also realized that I lost the ability to switch between light mode and dark mode, because my Gtk theme is now correctly marked as a dark theme, which makes Firefox pick the dark CSS theme by default and ... Firefox lacks the ability to switch back to light mode. Yikes. |
Yeah. I'm not opening my wm config, restarting my browser, or waiting twelve hours to toggle back and forth between light and dark. Let alone dealing with devtools showing the wrong selector and having no view into variables. |
Strange that Firefox doesn't have the option to switch manually, even in the "developer edition". There's always extensions though. @pushcx As for debugging, am I missing something? I can inspect variables just fine by hovering over them. The root namespace is inherited and its definition is shown last. Although one annoying issue with the extension is that I need to reselect the dom element to update the ruleset. Image below of what I mean. Though it is not from lobste.rs. |
@adriangoransson that's the one I'm using, and it doesn't work due to the issues mentioned above. |
If I've understood all this, the task remaining is to choose a nice set of colors for dark mode that pass WCAG color contrast guidelines, then prepare a PR with an un-revert of 65b0b34 plus the color changes. Is that accurate? If so, I'd be happy to take that on this week. I'm on macOS and iOS and could solicit spot checks from other platforms. |
Yep, you understand correctly, and I appreciate you volunteering. The browser dev tooling has caught up and now this is straightforward to test and debug. |
Could you please add night mode / dark theme for lobster site so ppl who reading could use it.
Thank you.
The text was updated successfully, but these errors were encountered: