Skip to content

Commit f5d6e5f

Browse files
fix: make table captions and figure captions visible in light mode (#535)
The pydata-sphinx-theme styles table caption and figure figcaption with --pst-color-text-muted, which the SCORE theme sets to #FFF for the dark header background. This made captions invisible on the light page body. Add targeted overrides for these content-area elements in light mode instead of changing the shared CSS variable, which would break the header/nav styling. Fixes #529
1 parent 4eefb39 commit f5d6e5f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • src/extensions/score_layout/assets/css

src/extensions/score_layout/assets/css/score.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ blockquote {
143143
color: var(--pst-color-text-base);
144144
}
145145

146+
/* Override text-muted for content-area elements that need readable text on light backgrounds.
147+
--pst-color-text-muted is set to #FFF for the dark header, but these sit on the page body. */
148+
html[data-theme="light"] table caption,
149+
html[data-theme="light"] figure figcaption {
150+
color: var(--pst-color-text-base);
151+
}
152+
146153
.admonition, div.admonition {
147154
background-color: rgba(0,0,0,0.1);
148155
}

0 commit comments

Comments
 (0)