diff --git a/sphinx/_static/css/custom.css b/sphinx/_static/css/custom.css index e8976c3..0dd7a32 100644 --- a/sphinx/_static/css/custom.css +++ b/sphinx/_static/css/custom.css @@ -35,11 +35,29 @@ html[data-theme=dark] table.element-table tr:nth-child(even) td{ body img, body svg { background-color: transparent; } -html[data-theme='dark'] img, -html[data-theme='dark'] svg { +html[data-theme='dark'] .bd-content img, +html[data-theme='dark'] .bd-content svg { background-color: transparent !important; } +/* Light mode styles */ +html:not([data-theme='dark']) img.my-svg, +html:not([data-theme='dark']) svg.my-svg { + /* Define styles for light mode */ + color: black; /* or other properties */ + fill: black; /* for SVG paths, texts, etc. */ + stroke: black; /* for SVG lines, borders, etc. */ +} + +/* Dark mode styles */ +html[data-theme='dark'] img.my-svg, +html[data-theme='dark'] svg.my-svg { + /* Define styles for dark mode */ + color: white; + fill: white; + stroke: white; +} + diff --git a/sphinx/examples.rst b/sphinx/examples.rst index a195dad..943fb91 100644 --- a/sphinx/examples.rst +++ b/sphinx/examples.rst @@ -122,3 +122,4 @@ Electrochemical Cell .. image:: /img/ElectrochemicalCell.svg + :class: my-svg