Re: Dark mode styling for the website - Mailing list pgsql-www

From Dave Page
Subject Re: Dark mode styling for the website
Date
Msg-id CA+OCxozaaXBj_qSmojQVCZk-g6Cu4Wo9-AqZheB4Ui-97g7tSA@mail.gmail.com
Whole thread Raw
In response to Re: Dark mode styling for the website  ("Jonathan S. Katz" <jkatz@postgresql.org>)
Responses Re: Dark mode styling for the website  (Dave Page <dpage@pgadmin.org>)
List pgsql-www


On Mon, 12 Dec 2022 at 17:48, Jonathan S. Katz <jkatz@postgresql.org> wrote:
On 11/4/22 6:52 PM, Dave Page wrote:

> Here's a patch that implements the manual switching and contrast changes.
>
> The light-mode-only issue for users without JS still needs to be
> resolved (if we actually care).

Thanks for pulling this together. A few comments:

1. Should we apply the lightened text to all font, not just the top nav
links? I do think it is easier to read.

I'm not sure what you mean - maybe the Fontawesome icons? The lightened text is defined in --a-fg-color, which does apply to all links. The rest of the text is off-white.
 

2. There is an inline script that sets the toggle -- we should move that
into a JS file. We had move all of our inline scripts in JS files for
the CSPs.

That's intentional. If it's in a separate file you can get a "flash" of colour change during page load as it can cause the code that changes the theme to what was selected previously to run post-render.
 

3. Looking at examples of toggle buttons, the most icon common pattern is:

Light - sun
Dark - moon
(System - computer)

Additionally, it will display the icon of the mode you are currently in.
I'd suggest we currently follow that convention.

As David noted upthread, the issue is that the sun icon looks confusingly similar to a settings cog icon, which I can certainly see. I think the lightbulb is clearer, and just as obvious as to its purpose. I'm fine with not following convention, when the convention is sub-optimal (and note that the yum, zypp, and pgcac sites all use the lightbulb now). I'm not going to fight over it though - I'd rather get this committed ASAP given that the entire patch is driven by user feedback.
 

I may be able to take a crack at this later in the week + pending
consensus on the above.

Thanks. 

--

pgsql-www by date:

Previous
From: "Jonathan S. Katz"
Date:
Subject: Re: Dark mode styling for the website
Next
From: عارف Sbr
Date:
Subject: Wiki editor request