Skip to content

Commit 83b92e1

Browse files
fix : reformat sphinx gallery styles
1 parent 8abe782 commit 83b92e1

File tree

5 files changed

+23
-52
lines changed

5 files changed

+23
-52
lines changed

src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys-sphinx-theme-variable.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ html[data-theme="light"] {
8484
--pst-color-link: #1e6ddc;
8585
--pst-color-link-hover: #32cfea;
8686
--pst-color-link-visted: #9428f2;
87-
--pst-color-inline-code: #000;
87+
--pst-color-inline-code: #000; /* inline code color for docutils (_base.scss)*/
8888
--pst-color-target: rgb(255, 255, 255);
8989

9090
/*****************************************************************************

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

-45
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,6 @@ span.highlighted {
2020
background-color: var(--pst-color-codecell) !important;
2121
}
2222

23-
.docutils {
24-
color: var(--pst-color-inline-code);
25-
font-family: var(--pst-font-family-monospace);
26-
font-weight: 500;
27-
}
28-
29-
code.literal {
30-
padding: 0.1rem 0.25rem;
31-
padding-top: 0.1rem;
32-
padding-right: 0.25rem;
33-
padding-bottom: 0.1rem;
34-
padding-left: 0.25rem;
35-
background-color: var(--pst-color-on-surface);
36-
border: 1px solid var(--pst-color-border);
37-
border-radius: 0.25rem;
38-
}
39-
4023
.xref.std.std-ref {
4124
color: var(--pst-color-inline-code);
4225
font-family: "Inconsolata";
@@ -90,29 +73,6 @@ Autosummary
9073
background-color: var(--pst-color-background);
9174
}
9275

93-
/*
94-
#####################
95-
ReST :download: links
96-
#####################
97-
*/
98-
a > code.download {
99-
font-family: var(--pst-font-family-base);
100-
color: var(--pst-color-link);
101-
text-decoration: none;
102-
font-weight: normal;
103-
}
104-
105-
/*
106-
#################################
107-
Syntax highlighting in code block
108-
#################################
109-
*/
110-
111-
html[data-theme="light"] .highlight .o {
112-
color: #b35000;
113-
font-weight: bold;
114-
}
115-
11676
/*
11777
#############################
11878
Bold font weight for **code**
@@ -204,11 +164,6 @@ nav.bd-links li > a {
204164
font-size: 0.98rem;
205165
}
206166

207-
html[data-theme="light"] .highlight pre {
208-
line-height: 125%;
209-
font-size: 0.9em;
210-
}
211-
212167
html[data-theme="dark"] .highlight pre {
213168
line-height: 125%;
214169
font-size: 0.9em;

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

-6
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@ div[data-ds-theme] .searchbox input {
7979
box-shadow: none !important;
8080
}
8181

82-
.container {
83-
display: flex;
84-
justify-content: center;
85-
align-items: right;
86-
}
87-
8882
div[data-ds-theme] .meilisearch-autocomplete {
8983
text-align: center;
9084
color: var(--pst-color-text-base);

src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/pydata-sphinx-theme-reformat.css

+6
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,9 @@ kbd {
254254
html[data-theme="light"] #pst-back-to-top {
255255
background-color: var(--pst-color-link);
256256
}
257+
258+
/* _code.scss related changes */
259+
.docutils {
260+
font-family: var(--pst-font-family-monospace);
261+
font-weight: 500;
262+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@import "ansys-sphinx-theme-variable.css";
2+
3+
/* Sphinx gallery output cell */
4+
5+
html[data-theme="light"] .highlight pre {
6+
font-size: 0.9em;
7+
}
8+
9+
/* Sphinx gallery download butto text */
10+
11+
a > code.download {
12+
font-family: var(--pst-font-family-base);
13+
color: var(--pst-color-link);
14+
text-decoration: none;
15+
font-weight: normal;
16+
}

0 commit comments

Comments
 (0)