seanmturley / natureddit

A simple Reddit client, featuring a landing page dedicated to nature with posts pulled from a curated list of subreddits.
0 stars 1 forks source link

Add light mode colours #141

Closed seanmturley closed 10 months ago

seanmturley commented 10 months ago

Description

Add light mode colours. This should attempt to use the existing dark mode colours as much as possible - ideally just assigning the same colours to different roles, though this is likely going to run into issues.

Issues to resolve

seanmturley commented 10 months ago

Added a first pass at the light mode colours. It's working pretty well, with just swapping the existing palette around to different roles, and adding a single extra shade.

There are a few issues to address, which I'll add to the main task description.

seanmturley commented 10 months ago

There was a --black variable being used for the background of main that was only visible under the filters and behind the full page view of a post. Changing this to the slightly lighter --back colour that already existed fixes the colour issue for dark mode Filters, and also generally produces a cleaner look.

This also improved the colour issue for light mode Filters, but it's still a bit lacking in contrast, so further tinkering is required.

seanmturley commented 10 months ago

The problem with the Filters colours in light mode was a lack of contrast for certain elements. After some failed experiments with darkening the --mid colour for better contrast on the white background, the best solution ended up being adding a few CSS colour overrides to replace --mid with the slightly dark --mid-weak when [data-light-theme] is enabled.

seanmturley commented 10 months ago

Added a [data-light-theme] override for the "Loading..." text so it's visible (previous contrast was almost zero).