-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
337 lines (319 loc) · 9.04 KB
/
Copy pathstyle.css
File metadata and controls
337 lines (319 loc) · 9.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
/* ============================================================
quantem-docs — custom theming on top of MyST book-theme.
Loaded via `site.options.style` in myst.yml.
Accent: dark red rgb(204,0,0), lightened slightly in dark
mode for contrast on the dark background.
============================================================ */
:root {
--qem-accent: rgb(204, 0, 0);
--qem-accent-soft: rgba(204, 0, 0, 0.12);
}
html.dark {
--qem-accent: rgb(232, 81, 73);
--qem-accent-soft: rgba(232, 81, 73, 0.18);
}
/* ---------- Site title (upper-left) ---------- */
.myst-home-link,
.myst-home-link span {
color: var(--qem-accent) !important;
font-weight: 700;
letter-spacing: 0.02em;
}
.myst-home-link:hover span {
text-decoration: underline;
text-decoration-thickness: 1.5px;
}
/* ---------- Top-nav links ---------- */
.myst-top-nav-item {
font-weight: 500;
}
/* ---------- Article links ----------
Scoped to <article> so the home-link and navbar controls keep
their own colors. */
article a:not(.myst-home-link),
article .link,
article .hover-link {
color: var(--qem-accent) !important;
}
/* Cards: red title, neutral body text */
article a.myst-card {
color: inherit !important;
}
article a.myst-card .myst-card-title {
color: var(--qem-accent);
}
article a.myst-card:hover {
border-color: var(--qem-accent) !important;
}
/* ---------- Places book-theme still uses Tailwind blue ---------- */
.myst-tab-item-header-active {
color: var(--qem-accent) !important;
border-bottom-color: var(--qem-accent) !important;
}
.myst-toc-item.active,
.myst-toc-item-exact {
background-color: var(--qem-accent-soft) !important;
}
.myst-toc-item:focus,
.myst-toc-item:focus-visible {
outline-color: var(--qem-accent) !important;
}
.myst-code-copy-icon {
color: var(--qem-accent) !important;
}
.myst-code-copy-icon:hover {
opacity: 0.7;
}
.outline-blue-200 {
outline-color: var(--qem-accent-soft) !important;
}
button.myst-search-bar:hover {
border-color: var(--qem-accent) !important;
--tw-ring-color: var(--qem-accent) !important;
}
/* ---------- Code blocks ----------
book-theme leaves `pre` at overflow-x: visible, so one long line pushes
the whole page sideways on narrow screens. Scroll inside the block
instead, and never let it widen the article. */
article pre {
max-width: 100%;
overflow-x: auto;
}
/* ---------- Inline code spans ---------- */
:not(pre) > code {
color: rgb(190, 24, 93);
}
html.dark :not(pre) > code {
color: rgb(244, 114, 182);
}
/* ---------- Left sidebar ----------
Smaller type, tighter rhythm, bold top-level sections. */
.myst-primary-sidebar-toc {
font-size: 0.85rem;
}
.myst-primary-sidebar-toc .myst-toc-item {
margin-top: 0.125rem;
margin-bottom: 0.125rem;
}
.myst-primary-sidebar-toc a.myst-toc-item {
padding-top: 0.3rem;
padding-bottom: 0.3rem;
}
.myst-primary-sidebar-toc .myst-toc-item > div {
padding-top: 0.3rem;
padding-bottom: 0.3rem;
}
.myst-primary-sidebar-toc button svg {
height: 1.1rem;
width: 1.1rem;
}
/* Top-level sections (Get Started, User Guide, ...) in bold */
.myst-toc > div > .myst-toc-item {
font-weight: 700;
}
/* book-theme marks the section containing the current page in blue; make it
bold red instead, and keep the page links themselves red when active. */
.myst-primary-sidebar-toc .text-blue-800,
html.dark .myst-primary-sidebar-toc .dark\:text-blue-200 {
color: var(--qem-accent) !important;
font-weight: 700;
}
.myst-primary-sidebar-toc a.myst-toc-item-exact,
.myst-primary-sidebar-toc a.myst-toc-item.active {
color: var(--qem-accent) !important;
font-weight: 700;
}
/* The site title is already in the top bar; drop the duplicate
root entry at the top of the sidebar. */
.myst-toc > a.myst-toc-item[title="quantEM"] {
display: none;
}
/* book-theme replays a height:0 -> full expand animation on every
`data-state=open`. Because the sections are forced open on each
client-side navigation, that animation re-fires on every click and
the sidebar visibly twitches. The sections start open, so kill the
animation and make any real toggle instant. */
.myst-primary-sidebar-toc .collapsible-content {
animation: none !important;
}
/* ---------- Search ----------
The theme's dialog-based search is replaced at runtime (see
scripts/patch_theme.py) with a flat input in the top bar. No overlay,
no scroll lock, so opening it never shifts the page. */
.qem-search {
position: relative;
display: flex;
align-items: center;
min-width: 0; /* allow the input to shrink inside the flex nav */
}
.qem-search input {
height: 2.5rem;
width: 100%;
max-width: 12rem;
padding: 0 0.75rem;
font-size: 0.875rem;
color: inherit;
background: rgb(249, 250, 251);
border: 1px solid rgb(209, 213, 219);
border-radius: 0.5rem;
outline: none;
appearance: none;
}
html.dark .qem-search input {
background: rgb(55, 65, 81);
border-color: rgb(75, 85, 99);
}
.qem-search input::-webkit-search-cancel-button {
appearance: none;
}
.qem-search input:focus {
border-color: var(--qem-accent);
box-shadow: 0 0 0 1px var(--qem-accent);
}
@media (min-width: 640px) {
.qem-search input { max-width: 20rem; }
}
.qem-search-results {
position: absolute;
top: calc(100% + 6px);
right: 0;
z-index: 1000;
width: min(26rem, 90vw);
max-height: 70vh;
overflow-y: auto;
padding: 0.25rem;
background: #fff;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 0.5rem;
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
html.dark .qem-search-results {
background: rgb(28, 25, 23);
border-color: rgba(255, 255, 255, 0.18);
}
a.qem-search-hit {
display: block;
padding: 0.4rem 0.55rem;
border-radius: 0.35rem;
color: inherit !important;
text-decoration: none;
}
a.qem-search-hit:hover,
a.qem-search-hit.active {
background: var(--qem-accent);
color: #fff !important;
}
.qem-search-hit-title {
font-size: 0.85rem;
font-weight: 600;
}
.qem-search-hit-text {
font-size: 0.78rem;
opacity: 0.75;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ---------- Hide the article-style frontmatter strip ---------- */
.myst-fm-block-header,
.myst-fm-block-date-doi,
header.myst-fm-authors-affiliations {
display: none !important;
}
/* ---------- Landing page: layered, hover-animated logo ----------
The logo is stacked from the wordmark base plus one SVG layer per
element. A runtime injected by scripts/patch_theme.py inlines the
layers and runs an element's animations only while hovered; leaving
it pauses in place. Percentages come from scripts/build_logo.py. */
.qem-logo-box {
position: relative;
width: 100%;
max-width: 580px;
justify-self: center;
margin: 3.5rem auto 0.5rem auto;
}
.qem-logo-box p {
margin: 0;
}
.qem-logo-box .qem-lbase {
display: block;
width: 100%;
height: auto;
aspect-ratio: 460.8 / 266.4;
}
.qem-logo-box .qem-el {
position: absolute;
display: block;
height: auto;
}
.qem-el-eels { left: 2.19%; top: 5.12%; width: 56.22%; aspect-ratio: 259.0 / 148.1; }
.qem-el-dif { left: 13.48%; top: 5.26%; width: 29.88%; aspect-ratio: 137.7 / 115.6; }
.qem-el-struct { left: 39.82%; top: 14.11%; width: 23.44%; aspect-ratio: 108.0 / 108.0; }
.qem-el-tomo { left: 59.35%; top: 17.34%; width: 38.32%; aspect-ratio: 176.6 / 91.4; }
/* Light/dark variants follow the book-theme html.dark toggle. */
html:not(.dark) .qem-logo-box .qem-logo-dark { display: none; }
html.dark .qem-logo-box .qem-logo-light { display: none; }
.qem-tagline {
text-align: left;
font-size: 1.15rem;
opacity: 0.85;
max-width: 42rem;
margin: 1rem auto 1.5rem auto;
}
/* ---------- Funding logos (Acknowledgements) ----------
Logo-only cards: each logo is a link that fills its cell, with the
light/dark variant chosen by theme. */
.qem-funders {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
align-items: center;
max-width: 420px;
margin: 1.5rem 0 2rem 0;
}
.qem-funders p {
margin: 0;
display: contents;
}
.qem-funders a {
display: flex;
align-items: center;
justify-content: center;
height: 116px;
padding: 1.25rem 2rem;
border: 1px solid rgba(0, 0, 0, 0.12);
border-radius: 0.5rem;
transition: border-color 0.2s ease, transform 0.2s ease;
}
html.dark .qem-funders a {
border-color: rgba(255, 255, 255, 0.18);
}
.qem-funders a:hover {
border-color: var(--qem-accent);
transform: translateY(-2px);
}
/* MyST wraps a linked image in <a><span class="link-text"><img>, so the
span must be told to fill the cell before the image can. */
.qem-funders a > span,
.qem-funders .link-text {
display: block;
width: 100%;
}
/* The theme caps images inside links at ~1.2em so inline icons stay small;
these are full logos, so override it. */
.qem-funders img {
display: block !important;
width: 100% !important;
height: auto !important;
max-width: 100% !important;
max-height: 74px !important;
object-fit: contain;
margin: 0 !important;
}
/* book-theme adds an external-link icon after off-site links */
.qem-funders a svg,
.qem-funders a .link-icon {
display: none;
}
html:not(.dark) .qem-only-dark { display: none; }
html.dark .qem-only-light { display: none; }