Skip to content

Commit ce0099e

Browse files
add light theme config to css (#75)
* add light theme config to css * add dark theme config to css * update dark theme config to css
1 parent ca24b0d commit ce0099e

File tree

1 file changed

+89
-10
lines changed

1 file changed

+89
-10
lines changed

src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css

+89-10
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,85 @@
4646

4747
}
4848

49+
html[data-theme="light"] {
50+
/*****************************************************************************
51+
* main colors
52+
*/
53+
--pst-color-primary: rgb(255, 183, 27);
54+
--pst-color-secondary: rgb(200, 146, 17);
55+
--pst-color-success: rgb(40, 167, 69);
56+
--pst-color-text-base: rgb(51, 51, 51);
57+
--pst-color-text-muted: rgb(26, 24, 24);
58+
--pst-color-border: rgb(201, 201, 201);
59+
--pst-color-shadow: rgb(216, 216, 216);
60+
61+
/*****************************************************************************
62+
* depth colors
63+
*
64+
* background: the more in depth color
65+
* on-background: the object directly set on the background, use of shadows in light theme
66+
* surface: object set on the background (without shadows)
67+
* on_surface: object set on surface object (without shadows)
68+
*/
69+
--pst-color-on-background: rgb(0, 0, 0);
70+
--pst-color-on-surface: rgb(255, 255, 255);
71+
72+
/*****************************************************************************
73+
* extensions
74+
*/
75+
76+
--pst-color-panel-background: var(--pst-color-on-background);
77+
78+
/*****************************************************************************
79+
* layout
80+
*/
81+
82+
--pst-color-link: rgb( 57, 114, 161);
83+
--pst-color-link-hover: #005B81;
84+
--pst-color-inline-code: rgb(232, 62, 140);
85+
--pst-color-target: rgb(255, 255, 255);
86+
}
87+
88+
html[data-theme="dark"] {
89+
/*****************************************************************************
90+
* main colors
91+
*/
92+
--pst-color-primary: rgb(255, 183, 27);
93+
--pst-color-secondary: rgb(200, 146, 17);
94+
--pst-color-success: rgb(72, 135, 87);
95+
--pst-color-text-base: rgb(201, 209, 217);
96+
--pst-color-text-muted: rgb(192, 192, 192);
97+
--pst-color-border: rgb(192, 192, 192);
98+
--pst-color-shadow: var(--pst-color-background);
99+
--pst-color-background: rgb(18, 18, 18);
100+
--pst-color-on-background: rgb(0, 0, 0);
101+
--pst-color-surface: rgb(41, 41, 41);
102+
--pst-color-on-surface: rgb(55, 55, 55);
103+
104+
/*****************************************************************************
105+
* extensions
106+
*/
107+
108+
--pst-color-panel-background: var(--pst-color-on-background);
109+
110+
/*****************************************************************************
111+
* layout
112+
*/
113+
114+
--pst-color-link: rgb( 57, 114, 161);
115+
--pst-color-link-hover: #005B81;
116+
--pst-color-inline-code: rgb(221, 158, 194);
117+
--pst-color-target: rgb(71, 39, 0);
118+
}
119+
120+
.admonition, div.admonition{
121+
background-color:var( --pst-color-on-surface);
122+
}
123+
124+
.bd-header.navbar-light#navbar-main .navbar-nav li a.nav-link {
125+
color:#ffffff;
126+
}
127+
49128
.docutils {
50129
color: #C89211;
51130
font-family: 'Inconsolata';
@@ -129,15 +208,15 @@ table {
129208
}
130209

131210
tr {
132-
background-color: white;
211+
background-color: var(--pst-color-background);
133212
}
134213

135214
th {
136215
background-color: rgb(255, 183, 27, 0.55);
137216
}
138217

139218
tr:nth-child(odd){
140-
background-color: white;
219+
background-color: var(--pst-color-background);
141220
}
142221

143222
tr:nth-child(even){
@@ -182,7 +261,7 @@ table.table-centered {
182261
}
183262

184263
.table-centered tr {
185-
background-color: white;
264+
background-color: var(--pst-color-background);
186265
text-align: center;
187266
}
188267

@@ -193,7 +272,7 @@ table.table-centered {
193272

194273
.table-centered tr:nth-child(odd){
195274
text-align: center;
196-
background-color: white;
275+
background-color: var(--pst-color-background);
197276
}
198277

199278
.table-centered tr:nth-child(even){
@@ -268,11 +347,11 @@ I do not think we will be able to call this class.
268347
*/
269348

270349
.dataframe tr{
271-
background-color: white;
350+
background-color: var(--pst-color-background);
272351
}
273352

274353
.dataframe tr:nth-child(odd){
275-
background-color: white !important;
354+
background-color: var(--pst-color-background) !important;
276355
}
277356

278357
.dataframe tr:nth-child(even){
@@ -294,12 +373,12 @@ I do not think we will be able to call this class.
294373
*/
295374

296375
.dataframe-centered tr{
297-
background-color: white;
376+
background-color: var(--pst-color-background);
298377
text-align: center;
299378
}
300379

301380
.dataframe-centered tr:nth-child(odd){
302-
background-color: white !important;
381+
background-color: var(--pst-color-background) !important;
303382
text-align: center;
304383
}
305384

@@ -329,11 +408,11 @@ I do not think we will be able to call this class.
329408
} */
330409

331410
.autosummary tr:nth-child(odd){
332-
background-color: white;
411+
background-color: var(--pst-color-background);
333412
}
334413

335414
.autosummary tr:nth-child(even){
336-
background-color: white;
415+
background-color: var(--pst-color-background);
337416
}
338417

339418

0 commit comments

Comments
 (0)