From 4191135262b4bd4476b5a44c645f753767682a94 Mon Sep 17 00:00:00 2001 From: Revathy Venugopal <104772255+Revathyvenugopal162@users.noreply.github.com> Date: Mon, 16 Jan 2023 11:51:40 +0100 Subject: [PATCH] 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 --- src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css b/src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css index f7a3b266..a4cdf365 100644 --- a/src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css +++ b/src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css @@ -92,7 +92,8 @@ html[data-theme="light"] { --pst-color-inline-code: #000; --pst-color-target: rgb(255, 255, 255); /* color for sphinx-gallery-code output*/ - --pst-color-codeout: #fafae2; + --pst-color-codecell: #fafae2; + --pst-color-codeout:var(--pst-color-inline-code); --pst-color-sig:#0965C8; } @@ -129,7 +130,8 @@ html[data-theme="dark"] { --pst-color-inline-code: #fff; --pst-color-target: rgb(71, 39, 0); /* color for sphinx-gallery-code output*/ - --pst-color-codeout: #929FAA; + --pst-color-codecell: #495057; + --pst-color-codeout: #f2f4f6; --pst-color-sig:#d6ab1e; } @@ -552,7 +554,8 @@ a > code.download ######################## */ .sphx-glr-script-out .highlight pre{ - background-color: var(--pst-color-codeout) !important; + background-color: var(--pst-color-codecell) !important; + color: var(--pst-color-codeout); } .prev-next-area a p.prev-next-title {