Re: [PATCH 0/1] Docs: use RTD dark mode if available

From: Mauro Carvalho Chehab
Date: Wed Dec 01 2021 - 03:41:58 EST


Em Wed, 1 Dec 2021 09:22:02 +0100
Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> escreveu:

> Hi Jon,
>
> As we're analyzing some theme alternatives, one of the things that annoys
> me more at our theme is that it doesn't come with a dark mode.
>
> At least here, I strongly prefer dark themes, as it seems to be a lot more
> comfortable to my eyes, specially in the morning.
>
> There's an extension to the RTD theme that allows building the docs with a
> dark theme, with a button to select normal mode.
>
> As this comes almost for free, optionally enable the dark mode extension if
> such theme is installed at the machine.

Too good to be true... It won't work properly, as:

1. Some of the css custom configs at sphinx-static define colors;
2. It sounds that this overlay to RTD theme is missing some classes,
as, at least here, function prototypes from driver-api/media/v4l2-async.html
are written with a black color over a dark gray background.

I'll do more tests. If I find a solution, I'll submit another version.

Thanks,
Mauro