love2d-community / love-api

The whole LÖVE wiki in a Lua table.
http://love2d-community.github.io/love-api/
299 stars 47 forks source link

implement dark-mode for love-api docs #83

Closed codyloyd closed 4 years ago

codyloyd commented 4 years ago

Maybe silly, but I really like this docs site over the typical wiki, but the colors are sooo.... WHITE.

This implements a nice looking dark-mode behind the 'prefers-color-scheme: dark' media-query by converting all colors to variables, and then changing those colors inside the media-query.

the result looks like this: image

For the record, these variables do NOT work in Internet Explorer 11 or earlier, but I assumed that wasn't an issue because the site already has some bugs in IE11.

hahawoo commented 4 years ago

This looks great, thanks!