Skip to content

Commit 4191135

Browse files
Maintain the contrast styling of sphinx gallery code out. (#170)
* Add new contrast color for the code out dark * Web accessibility styling * Modify the codeout color Co-authored-by: Roberto Pastor Muela <[email protected]>
1 parent 809f3fd commit 4191135

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ html[data-theme="light"] {
9292
--pst-color-inline-code: #000;
9393
--pst-color-target: rgb(255, 255, 255);
9494
/* color for sphinx-gallery-code output*/
95-
--pst-color-codeout: #fafae2;
95+
--pst-color-codecell: #fafae2;
96+
--pst-color-codeout:var(--pst-color-inline-code);
9697
--pst-color-sig:#0965C8;
9798
}
9899

@@ -129,7 +130,8 @@ html[data-theme="dark"] {
129130
--pst-color-inline-code: #fff;
130131
--pst-color-target: rgb(71, 39, 0);
131132
/* color for sphinx-gallery-code output*/
132-
--pst-color-codeout: #929FAA;
133+
--pst-color-codecell: #495057;
134+
--pst-color-codeout: #f2f4f6;
133135
--pst-color-sig:#d6ab1e;
134136
}
135137

@@ -552,7 +554,8 @@ a > code.download
552554
########################
553555
*/
554556
.sphx-glr-script-out .highlight pre{
555-
background-color: var(--pst-color-codeout) !important;
557+
background-color: var(--pst-color-codecell) !important;
558+
color: var(--pst-color-codeout);
556559
}
557560

558561
.prev-next-area a p.prev-next-title {

0 commit comments

Comments
 (0)