alshdavid / BorrowScript

TypeScript with a Borrow Checker. Multi-threaded, Tiny binaries. No GC. Easy to write.
1.45k stars 16 forks source link

Dark mode #40

Closed WebReflection closed 2 years ago

WebReflection commented 2 years ago

Likely the very least of this project's priorities, but worth mentioning the SVGs aren't visually great on dark theme.

Screenshot from 2021-11-12 13-46-26

alshdavid commented 2 years ago

Oh yikes, and there is no way to create adaptive markdown files in GitHub 😓

WebReflection commented 2 years ago

No, but there is a way to style within SVG and use prefers-color-schema

svg { fill: #000; }
@media (prefers-color-scheme: dark) {
  svg { fill: #fff; }
}

or something similar

Akiyamka commented 2 years ago

Unfortunate Github inject images as <img /> tag, dynamic styles won't work

alshdavid commented 2 years ago

Luckily the intro images are all SVGs so I was able to use the <style> approach within the svgs.

Unfortunately it will only respect the system theme - so if you have a light system but override GitHub to use dark mode, it will continue to use the light theme svgs.

image image

WebReflection commented 2 years ago

@alshdavid thanks, it works like a charm (GNOME on ArchLinux in Dark Mode) 👍