Conversation
michaelkedar
left a comment
There was a problem hiding this comment.
😎 looking good to me.
I find the white text on red buttons on white background a bit harsh - I don't know if you feel like experimenting with the colours a bit.
Also, FYI there are some code blocks in a few blog posts (e.g. https://osv.dev/blog/posts/using-the-determineversion-api/) that don't seem to be changing with light mode. I think it's fine to leave as-is (because I suspect it'd be a hassle to change), I'm just not sure if you saw those.
There was a problem hiding this comment.
I think these logos look more pixelated than the white-text ones?
I've tried looking around, but I can't find the original source of these images.
The GitHub docs use a different icon - I'm not against changing to use those instead.
There was a problem hiding this comment.
Thanks! I'll let @cuixq propose the colours.
I find the white text on red buttons on white background a bit harsh
It's possible to minimise this also by remove/lightening the button fill:

Let me know if you think that's the right move.
Also, FYI there are some code blocks in a few blog posts
I left this out since it's a bit hacky to make this dynamically apply a theme based on light/dark mode. The issue is that <code> block styling is statically configured in hugo.toml. It's possible to 'escape hatch' this though and apply CSS ourselves. I've done this after generating the CSS with:
hugo gen chromastyles --style=native
hugo gen chromastyles --style=github
Example screenshot of light theme code blocks:
There are more syntax highlighting schemes to choose from: https://gohugo.io/quick-reference/syntax-highlighting-styles/.
I think these logos look more pixelated than the white-text ones?
I've extracted the logo you suggested and replaced it in both dark/light mode with a higher resolution version. It no longer looks pixelated to me :)
d3cd4c0 to
f41adb9
Compare
f41adb9 to
262265b
Compare
|
Sorry @cuixq, you had out of date changes because I was clumsy and force pushed a much older commit by accident. I've recovered the proper commit now and all those issues should be corrected now! :) (Also changed the light mode blog code syntax highlighting from |
3eb3a9b to
3f140c2
Compare
3f140c2 to
6ed09c9
Compare







Why? Offering light/dark mode improves accessibility and legibility for web content. Light/dark themes are now an expectation for any modern tooling that developers interact with.
osv.light.mode.demo.webm
Caveats:
make run-website-emulatorbecause I don't have access to the real osv dataset - so perhaps the default emulator data is not representative of the styles that would be seen in production on real data. A thorough look against real data would be helpful to find conflicting/unresolved styles.