NSHipster/nshipster.com

LSP Graphics hard to read in dark mode

bnickel opened this issue · 1 comments

When viewed on a Mac in Dark Mode, the graphics on https://nshipster.com/language-server-protocol/ are very hard to read:

screen shot 2018-11-05 at 10 52 05 am

The good news is that browsers are able to change fill and stroke colors for simple inline graphics and Jekyll supports inlining SVG assets.

I propose the following changes:

  • Embed these SVG assets using the @inline argument, eg. {% asset lsp-languages-plus-editors.svg @inline %}
  • Add the style rule article svg { max-width: 100%; } to match img's behavior.
  • Inside these assets, add a default fill="currentColor" to the SVG element.
  • Set stroke and fill to currentColor anywhere they are currently set to black.
  • Eliminate the white boxes in languages-times-editors.

A cheaper alternative would just be to throw a white background on these graphics.

The work should be relatively straightforward to implement and if no one has tackled it, I could probably find some time later in the week. Someone with a set up environment would just have a quicker go of it.

mattt commented

Thanks so much for pointing this out, @bnickel. I think you'll appreciate the clever solution I came up with in e060f90 😄

screen shot 2018-11-05 at 10 51 01