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

Dark color scheme support (via prefers-color-scheme media query) #865

Closed
dmitshur opened this issue Aug 10, 2019 · 6 comments
Closed

Dark color scheme support (via prefers-color-scheme media query) #865

dmitshur opened this issue Aug 10, 2019 · 6 comments
Assignees
Labels
Stale Automatically marked as stale.

Comments

@dmitshur
Copy link

dmitshur commented Aug 10, 2019

Hello. 👋 (Obligatory thanks for making Primer CSS, it's awesome!)

With the recent release of Chrome 76 on the stable channel, there are now 3 major desktop browsers that support the prefers-color-scheme media query: Chrome 76, Firefox 67+, and Safari 12.1. More are coming soon, as are mobile browsers.

As far as I can tell, Primer CSS does not support the dark color scheme. It works well when light color is selected. For example, using the Tabnav CSS component:

image

But it's not very usable when dark color scheme is selected:

image

(https://jsfiddle.net/do3eL8p2/)

I often use computers in the dark, and Dark Mode makes looking at a screen much easier on the eyes. By now, most of the apps and websites I use support dark mode, so the few that don't are very jarring. Also see this article on web.dev that motivates support for dark mode.

I'm working on adding support for dark color scheme to my websites and I'm not sure what to do about ones where Primer CSS is used. I'd either have to stop using it, or try to hack dark color scheme support on top.

That's why I wanted to ask if there are any plans to add support for dark color scheme to Primer CSS? (I understand it's likely a large amount of work and maintenance for a CSS framework of this size.)

Thank you!

@tonimelisma
Copy link

I'm also interested in this. I'm confused that there seems to be constant commits to the repo but within 1,5 years none of the maintainers have indicated whether this sort of functionality would be welcome in the project? Is there a reason this isn't a good match for primer or have the maintainers just been too busy to consider the idea?

If PRs are welcome, any possible tips on how one might implement this functionality would also be appreciated.

@simurai
Copy link
Contributor

simurai commented Nov 10, 2020

This is currently being implemented in #1131. It's quite a big PR and probably still takes a while until the changes are released.

@tonimelisma
Copy link

Thanks @simurai! Is there anything we can help with?

@simurai
Copy link
Contributor

simurai commented Nov 17, 2020

Is there anything we can help with?

You're welcome to check out the changes in #1131. And cnce the new version is released, would be great to have some extra
👀 eyes testing it and report any bugs.

@github-actions
Copy link
Contributor

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.

@github-actions github-actions bot added the Stale Automatically marked as stale. label May 26, 2021
@github-actions github-actions bot closed this as completed Jun 2, 2021
@dmitshur
Copy link
Author

dmitshur commented Jun 3, 2021

I didn't see github-actions' earlier ping on this issue, but I see it now that it's closed.

It seems PR #1131 has been merged by now, with additional documentation work in PR #1186, which all got released in v16.0.0, so this is indeed done.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Automatically marked as stale.
Projects
None yet
Development

No branches or pull requests

4 participants