Skip to content

Commit 96bf84b

Browse files
Add style for sphinx design (#127)
* inline code * sphinx design styles
1 parent 555bee5 commit 96bf84b

File tree

1 file changed

+48
-15
lines changed

1 file changed

+48
-15
lines changed

src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
@import "../basic.css";
33
@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@600&display=swap');
44
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&display=swap');
5-
@import "../tabs.css";
65
@import "../sg_gallery.css";
6+
@import "../design-style.4045f2051d55cab465a707391d5b2007.min.css";
77

88

99
@font-face {
@@ -89,7 +89,7 @@ html[data-theme="light"] {
8989

9090
--pst-color-link:#1E6DDC;
9191
--pst-color-link-hover:#32cfea;
92-
--pst-color-inline-code: #CD186D;
92+
--pst-color-inline-code: #000;
9393
--pst-color-target: rgb(255, 255, 255);
9494
/* color for sphinx-gallery-code output*/
9595
--pst-color-codeout: #fafae2;
@@ -125,7 +125,7 @@ html[data-theme="dark"] {
125125

126126
--pst-color-link: #0088CC;
127127
--pst-color-link-hover:#32cfea;
128-
--pst-color-inline-code: rgb(221, 158, 194);
128+
--pst-color-inline-code: #fff;
129129
--pst-color-target: rgb(71, 39, 0);
130130
/* color for sphinx-gallery-code output*/
131131
--pst-color-codeout: #6c757d;
@@ -144,6 +144,10 @@ h1, h2 {
144144
color: #ddd;
145145
}
146146

147+
dt:target, span.highlighted {
148+
background-color: var(--pst-color-border);
149+
}
150+
147151
.docutils {
148152
color: var(--pst-color-inline-code);
149153
font-family:var(--font-family-monospace);
@@ -204,25 +208,54 @@ p.rubric {
204208

205209

206210
/*
207-
###############
208-
Sphinx-tab
209-
###############
211+
#################
212+
Sphinx-design
213+
#################
210214
*/
211-
.sphinx-tabs-panel p{
212-
font-weight: 400;
213-
font-family: 'Source Sans Pro', sans-serif;
214-
font-size: 1rem;
215-
font-style: var(--pst-font-family-base-system);
215+
216+
.sd-tab-set>input:not(.focus-visible)+label {
217+
outline: none;
218+
font-size: large;
219+
-webkit-tap-highlight-color: transparent;
220+
color: var(--pst-color-text-base);
216221
}
217222

218-
.sphinx-tabs-tab[aria-selected="true"] {
219-
background-color: var(--pst-color-background);
223+
224+
.sd-tab-set>input:checked+label+.sd-tab-content {
225+
display: block;
226+
font-size: medium;
220227
}
221228

222-
.sphinx-tabs-panel {
223-
background: var(--pst-color-background);
229+
.sd-tab-set>input:checked+label+.sd-tab-content {
230+
display: block;
231+
font-size: .9rem;
224232
}
225233

234+
.sd-tab-content {
235+
font-family: var(--pst-font-family-base);
236+
}
237+
238+
.bd-content .sd-tab-set>input:checked+label, .bd-content .sd-tab-set>input:not(:checked)+label:hover {
239+
color: var(--pst-color-text-base);
240+
}
241+
242+
.sd-row-cols-lg-4>* {
243+
flex: 0 0 auto;
244+
-ms-flex: 0 0 auto;
245+
width: 25%;
246+
}
247+
248+
.sd-sphinx-override, .sd-sphinx-override * {
249+
-moz-box-sizing: border-box;
250+
-webkit-box-sizing: border-box;
251+
box-sizing: border-box;
252+
background-color: var(--pst-color-background)!important;
253+
font-family: var(--pst-font-family-base)!important;
254+
font-size: small;
255+
color: var(--pst-color-text-base)!important;
256+
}
257+
258+
226259
/*
227260
###############
228261
table

0 commit comments

Comments
 (0)