-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/website: add dark (night) theme #34601
Comments
This is a substantial amount of work. In design, implementation, and testing. We would not want to force dark mode users to only see the dark mode version, so we’d want a toggle. @vitaly-zdanevich when you say you can do it, which parts are you planning to do? |
@andybons it looks like not difficult task for me, and I believe that this is important accessibility feature. I hope that I can do all parts of it. So, if you approve it, and you think that we need explicit toggle also - maybe we can start with this toggle design. What is the appropriate position? At the bottom of every page? At the top? In some preferences screen? |
If the user doesn't want to see dark mode, they can change the setting in their user agent or operating system. Adding a toggle on the website seems redundant. |
@jayschwa I disagree. It’s not clear what user expectations are across the web with regard to this. |
Also Chromium from 73 became dark automatically if user switch dark mode inside operating system. |
Dark mode, as a feature on the web, is very new. As I said above, we don’t have a thorough understanding of user expectations yet. I don’t think we can entertain this without a toggle. |
Ok, so - I do not know your rules how you make decisions. We need to wait for other members to vote? For me this is not important - with or without toggle, I can implement both variants. |
Before deciding about the toggle, shouldn't we decide whether we want a dark mode at all? I've read https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme, but nothing there says every website must have a dark mode. So why it's a given that we want one? |
We need dark mode for two reasons:
Android 10 also have system wide dark theme for the same reasons. I remember that in this year (or in 2018, I do not remember) Google at Android conference said that this is recommended to have optional dark theme for every app. And with this new |
On Android most apps have their own settings like
Would this be an option for a website as well? So instead of a toggle implementing a spinner? The default one should then respect the operation defaults (or browser defaults) - not sure about the specification 😅. |
What if we just make the web site gray on gray? Then it will work equally well in both modes. |
More seriously, it seems like the web as a whole needs to figure out what the expectation is for default-white web sites (which is most of them, right?). In general we have a lot of web design work that goes into the pages, so it's not like we can just make up some hex codes and add a switch. Having two modes doubles the design work and adds complexity. Let's wait on doing anything on this until more sites have figured out what to do. For example, google.com is still white in dark mode. If that changes, then I'd be more inclined to look into what golang.org should do. |
Just going to leave this here:
https://twitter.com/pbakaus/status/1189057074925191168?s=09
Don't be that web site 😉
…On Wed, Oct 9, 2019, 7:35 PM Russ Cox ***@***.***> wrote:
More seriously, it seems like the web as a whole needs to figure out what
the expectation is for default-white web sites (which is most of them,
right?). In general we have a lot of web design work that goes into the
pages, so it's not like we can just make up some hex codes and add a
switch. Having two modes doubles the design work and adds complexity.
Let's wait on doing anything on this until more sites have figured out
what to do. For example, google.com is still white in dark mode. If that
changes, then I'd be more inclined to look into what golang.org should do.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#34601?email_source=notifications&email_token=ACOBQ65434LHEQORH4KRURDQNYI7RA5CNFSM4I3USUDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAYV7PI#issuecomment-540106685>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACOBQ62UMEW4O3U3P2K72O3QNYI7RANCNFSM4I3USUDA>
.
|
This comment has been minimized.
This comment has been minimized.
The web team has looked into this as part of a larger redesign and has the work pending. I don't think this needs further discussion. |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Transparent images on the doc pages assume there is a white background. This change preserves the white background for images when the site is viewed with the dark theme. For golang/go#34601. Change-Id: I4c0a28d173d7ecf52547da6e5a6382d84bc922e3 Reviewed-on: https://go-review.googlesource.com/c/website/+/392479 Run-TryBot: Jamal Carvalho <jamal@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Trust: Jamal Carvalho <jamalcarvalho@google.com>
With dark mode added to go.dev in CL 391536 we can update the cookie to apply the cookie to both pkg.go.dev and go.dev. For golang/go#34601. Change-Id: I49b50241f9e57ede369260aeb52512aebef88239 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/391517 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com>
Added a toggle button with three states: auto, light, and dark to set the preferred color scheme of go.dev. For golang/go#34601. Change-Id: I771f64f34294fa0a86bbcdd6c0acaa4af7e7cf8c Reviewed-on: https://go-review.googlesource.com/c/website/+/391536 Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com>
Try out the dark theme today on go.dev. We'll leave this issue open for minor issues discovered post launch. |
Change https://go.dev/cl/398974 mentions this issue: |
For the text in the download table to be visible for all themes the row background color must switch with the page theme. For golang/go#34601 Change-Id: I369445f25efc3b3771f324f1c0555f9049cf3390 Reviewed-on: https://go-review.googlesource.com/c/website/+/398974 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Jamal Carvalho <jamal@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Added dark mode styles and images. For golang/go#34601 Change-Id: I1a4d9599cbe8e3b51380be914cfe1abbc3cd79bb Reviewed-on: https://go-review.googlesource.com/c/website/+/384874 Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com> Trust: Dmitri Shuralyov <dmitshur@google.com>
For golang/go#34601. Fixes golang/go#51584. Change-Id: I0a1715eacb5e3cef51aff7285dbdf9a0a5a6ea3c Reviewed-on: https://go-review.googlesource.com/c/website/+/391535 Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Jamal Carvalho <jamalcarvalho@google.com>
Transparent images on the doc pages assume there is a white background. This change preserves the white background for images when the site is viewed with the dark theme. For golang/go#34601. Change-Id: I4c0a28d173d7ecf52547da6e5a6382d84bc922e3 Reviewed-on: https://go-review.googlesource.com/c/website/+/392479 Run-TryBot: Jamal Carvalho <jamal@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Trust: Jamal Carvalho <jamalcarvalho@google.com>
Added a toggle button with three states: auto, light, and dark to set the preferred color scheme of go.dev. For golang/go#34601. Change-Id: I771f64f34294fa0a86bbcdd6c0acaa4af7e7cf8c Reviewed-on: https://go-review.googlesource.com/c/website/+/391536 Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com>
For the text in the download table to be visible for all themes the row background color must switch with the page theme. For golang/go#34601 Change-Id: I369445f25efc3b3771f324f1c0555f9049cf3390 Reviewed-on: https://go-review.googlesource.com/c/website/+/398974 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Jamal Carvalho <jamal@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Please read https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
I can do it if you approve me.
The text was updated successfully, but these errors were encountered: