Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html: support dark scheme #17

Merged
merged 1 commit into from Mar 22, 2024
Merged

Conversation

matttbe
Copy link
Contributor

@matttbe matttbe commented Mar 20, 2024

While working on an MPTCP version of "flakes", the Dark Reader extension I used with my browser was poorly rendering the pages when used from a local server.

I realised it was easy to add a dark scheme support by overriding some colours in a '@media (prefers-color-scheme: dark)' section, in the CSS. So it will used the dark scheme if the browser prefers a dark scheme.

So I duplicated the solution here, just in case you want to support it as well :)
(The Dark Reader extension works good when looking at pages from https://netdev.bots.linux.dev, it's only for those not using the extension and still liking a dark scheme.)

Note that a text written with the default blue colour is hardly visible when a dark background is used. So I used the recommended #809fff colour instead, a bit lighter, still blue. It is used with and without the dark scheme.

While working on an MPTCP version of "flakes", the Dark Reader extension
I used with my browser was poorly rendering the page when used from a
local server.

I realised it was easy to add a dark scheme support by overriding some
colours in a '@media (prefers-color-scheme: dark)' section, in the CSS.
So it will used the dark scheme if the browser prefers a dark scheme.

Note that a text written with the default 'blue' colour is hardly
visible when a dark background is used. So I used the recommended
'#809fff' colour instead, a bit lighter, still blue. It is used with and
without the dark scheme.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
@kuba-moo kuba-moo merged commit c0a4fa0 into linux-netdev:main Mar 22, 2024
1 check passed
@kuba-moo
Copy link
Contributor

I tweaked the palette a little but I really like this, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants