piccolo-orm / piccolo_theme

A clean and modern Sphinx theme.
https://piccolo-theme.readthedocs.io/en/latest/
MIT License
93 stars 10 forks source link

Dark mode in combination with group tabs is not readable #52

Open ThijsSassen opened 1 year ago

ThijsSassen commented 1 year ago

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

for an example see here

dantownsend commented 1 year ago

Thanks for reporting this.

Is this using the sphinx-tabs library?

ThijsSassen commented 1 year ago

@dantownsend yes it is

dantownsend commented 1 year ago

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

ThijsSassen commented 1 year ago

@dantownsend thanks that worked