piccolo_theme icon indicating copy to clipboard operation
piccolo_theme copied to clipboard

Dark mode in combination with group tabs is not readable

Open ThijsSassen opened this issue 2 years ago • 4 comments

When using dark mode and group tabs the text inside the tabs is not visible

for an example see here

ThijsSassen avatar Apr 04 '23 14:04 ThijsSassen

Thanks for reporting this.

Is this using the sphinx-tabs library?

dantownsend avatar Apr 04 '23 14:04 dantownsend

@dantownsend yes it is

ThijsSassen avatar Apr 04 '23 15:04 ThijsSassen

Looks like sphinx-tabs explicitly sets the background colour to white.

I'd add this to your CSS file, and it'll fix it:

.sphinx-tabs-panel {
    background: none;
}

We could add this override to the Piccolo theme, but it feels a bit fragile overriding the styles of other libraries.

It looks like they do support a dark theme by adding data-theme="dark" to the body tag. That's probably the best solution, though it does tie us to a third party library.

https://github.com/executablebooks/sphinx-tabs/blob/9431223384729010ba29c27c2d2976ce76b7e1ad/sphinx_tabs/static/tabs.css#L76

dantownsend avatar Apr 05 '23 05:04 dantownsend

@dantownsend thanks that worked

ThijsSassen avatar Apr 24 '23 12:04 ThijsSassen