Skip to content

Commit 4dd8a9a

Browse files
#281 - Fix dataframe rendering in dark mode (#282)
Co-authored-by: Roberto Pastor Muela <[email protected]>
1 parent b7c8256 commit 4dd8a9a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ tr:nth-child(even) {
290290
background-color: var(--pst-color-table-hover);
291291
}
292292

293+
div.rendered_html table.dataframe td {
294+
color: var(--pst-color-text-base);
295+
}
296+
293297
/*
294298
###############
295299
Table-centered
@@ -1018,6 +1022,12 @@ div.admonition {
10181022
background-color: var(--pst-color-on-surface);
10191023
}
10201024

1025+
/* Select only divisions that contain a dataframe, with enough specificity to override pydata css */
1026+
div.nboutput
1027+
div.output_area.rendered_html.docutils.container:has(table.dataframe) {
1028+
background-color: transparent;
1029+
}
1030+
10211031
/*
10221032
############
10231033
Border lines

0 commit comments

Comments
 (0)