-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/compile: add a dark mode for GOSSAFUNC html output #34325
Comments
If your screen stresses your eyes, your brightness is set too high. I prefer a light background but the background brightness is comparable to the rest of the room. This is the way things should be set up, so your eye accommodates equally to the screen and the environment. I'm not in favor of dark mode but I know I am in the minority. Research shows it causes more eyestrain than properly set up light backgrounds. I do not expect to win this argument. |
I have also had problems particularly with ssa.html. I subscribe to the “turn down the monitor” and “use red shifting” philosophies, but ssa.html is peculiarly bad. Just switching away from programmer white to a gentler background color might help a lot. Also, some of the highlight colors get lost or muddled when red-shifted. I have no idea how to fix that. Colors are subtle. |
I have already done all of that. Low brightness, red filter (had been using f.lux but switched to redshift couple of years back). But I recently started to use the dark reader chrome extension, and everything seems so easy on the eyes at night. I do realize it's a personal choice at the end of the day. That's why I suggested a small opt-in switch for people who want to use it. No harm in that :)
I have been using redshift for a while now. Never had an issue with the highlight colors. So I think a new set of colors for the dark background should not be an issue. |
Since the file is viewed using the browser, wouldn't a dark mode browser extension also work? |
It doesn't work. I don't know why. But even if it did, it's just a generic solution. It won't have bg-specific highlight colors. I would like the ssa.html itself to have a dark mode switch. |
Hey yall, I'm going to start working on this! |
Awesome. Ask if you have questions. One item of note: It is an explicit goal that ssa.html is a single, standalone file—so go ahead and slap all that css and goo right into the html head. :) |
Thanks @josharian, will do. Yes, it seemed like a really intentional decision - I will follow suite with the rest of the file. |
Change https://golang.org/cl/220260 mentions this issue: |
Okay, just submitted a patch for this - let me know if it's what you all were thinking! |
What version of Go are you using (
go version
)?It would be very helpful to have a dark mode switch for the GOSSAFUNC html file. Staring at the white screen for a long time at night is stressful to the eyes.
Just an inverted color scheme with the proper highlight colors and a checkbox at the top to toggle scheme should be good enough.
Marking it as help wanted, as it's a good started issue for anybody looking to contribute. The relevant code is in this file - https://github.com/golang/go/blob/master/src/cmd/compile/internal/ssa/html.go
@ysmolsky
The text was updated successfully, but these errors were encountered: