jupyter-book icon indicating copy to clipboard operation
jupyter-book copied to clipboard

Poor visibility of "Show code cell source/output" text in dark mode

Open srprca opened this issue 1 year ago • 2 comments

For code cells with "hide-input" or "hide-output" tags, in exported html the "Show code cell source/output" text has poor visibility in the dark mode due to too bright colours, please see the picture: Screenshot_20240731_121104

srprca avatar Jul 31 '24 09:07 srprca

This is because --mystnb-source-bg-color is unaffected by the change in color scheme. I'm not sure what the correct fix is.

MortenHannemose avatar Sep 30 '24 09:09 MortenHannemose

A naïve fix is to add

:root {
    --mystnb-source-bg-color: var(--pst-color-surface)!important;
    --mystnb-stdout-bg-color: var(--pst-color-surface)!important; 
}

to a css file in your _static dir.

MortenHannemose avatar Oct 01 '24 07:10 MortenHannemose

This has been improved in JBv2, which has had a full style pass in both light and dark mode.

Image

There is an upgrade guide available here. Please reach out if there are other style issues!

rowanc1 avatar Nov 05 '25 15:11 rowanc1