6 ms·
Do I have some weird rendering issue with this website, or do both of these snippets of code have terrible readability and highlighting? If I had to write code
by uxp 7y ago
Do I have some weird rendering issue with this website, or do both of these snippets of code have terrible readability and highlighting? If I had to write code using an IDE or editor with this scheme I'd quit my career and go into small engine repair.
https://imgur.com/a/vS2EldV https://imgur.com/a/vS2EldV
- saagarjha 7y agoThe text is black for me on my iPhone.
- FPGAhacker 7y agoIt might be a dark mode thing. Edit: Yep, dark mode mangled the code snippets.
- saagarjha 7y agoIt is!
- FPGAhacker 7y agoThat’s what it looked like for me. I thought maybe it looked illegible to me due to red-green color deficiency.
- FPGAhacker 7y agoIt’s a dark mode thing. Looks normalish with dark mode off.
- jeltz 7y agoNope, I am not color blind and it is very hard to read for me too.
- jeltz 7y agoNope, it looks the same to me and I have a screen with high contrast and high brightness. Both his examples are very hard to read. And I have done color blindness tests and know I am not color blind. Another thing: I think one thing he is missing is how important it is to see at a glance where function definitions are and where possible early returns are. The first example highlights def (function definitions), return (possible early return) and the return type (arguably not that important in most cases).
- SahAssar 7y agoI think this is what it is supposed to look like: https://imgur.com/a/OHkBb8Q https://imgur.com/a/OHkBb8Q
- pcr910303 7y agoI'm pretty sure it's b.c. you have dark mode turned on & the CSS didn't consider code snippets. Try turning them off, it'll look much better.
- jeltz 7y agoThanks, it is better now but still not very good.
- deleted 7y ago[deleted]
- Mathnerd314 7y agoui.systemUsesDarkTheme = 0 for FF users.
- mercora 7y agoI use "widget.content.gtk-theme-override;Adwaita:light" to fix commonly invalid assumptions about default colors and appearances. It overrides the GTK theme used to render page content and still allows to use a dark theme (or whatever you want) for UI components.
- czr 7y agohack to switch to light mode, if you don't want to do it systemwide (paste into console): Array.from(document.styleSheets).forEach(ss => Array.from(ss.rules).forEach((ssr,i) => {if (ssr.cssText && ssr.cssText.includes("dark")) {ssr.parentStyleSheet.deleteRule(i)}}))
- benkuhn 7y agoSorry about that! I built dark mode after writing this post and it broke the main text color inside the `pre`s, which should have been #222. Should be fixed now.