Skip to content

Commit 1abf4fe

Browse files
committed
Update the styling
1 parent 97335dd commit 1abf4fe

File tree

1 file changed

+121
-18
lines changed

1 file changed

+121
-18
lines changed

docs/stylesheets/extra.css

Lines changed: 121 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -187,21 +187,77 @@
187187
border-left: 4px solid var(--md-accent-fg-color);
188188
}
189189

190-
/* Enhanced method signatures - more prominent method names */
190+
/* Enhanced method signatures - hierarchical styling with blue/purple background */
191+
/* Class headers (h4) - larger and more prominent */
191192
h2[id^="jsrm"], h3[id^="jsrm"], h4[id^="jsrm"] {
192193
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
193194
color: white !important;
194-
padding: 1rem 1.25rem;
195-
margin: 1.75rem 0 1rem 0;
195+
padding: 1.2rem 1.5rem;
196+
margin: 2rem 0 1.2rem 0;
196197
border-radius: 8px;
197-
font-size: 1.25rem !important;
198+
font-size: 1.5rem !important;
198199
font-weight: 700 !important;
200+
box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
201+
border: none !important;
202+
position: relative;
203+
}
204+
205+
/* Method headers (h5) - smaller than class headers */
206+
h5[id^="jsrm"] {
207+
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
208+
color: white !important;
209+
padding: 0.8rem 1rem;
210+
margin: 1.5rem 0 0.8rem 0;
211+
border-radius: 6px;
212+
font-size: 1.2rem !important;
213+
font-weight: 600 !important;
199214
box-shadow: 0 3px 12px rgba(79, 70, 229, 0.2);
200215
border: none !important;
201216
position: relative;
202217
}
203218

219+
/* Target mkdocstrings method headings specifically */
220+
.doc.doc-heading {
221+
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
222+
color: white !important;
223+
padding: 0.8rem 1rem !important;
224+
margin: 1.5rem 0 0.8rem 0 !important;
225+
border-radius: 6px !important;
226+
font-size: 1.2rem !important;
227+
font-weight: 600 !important;
228+
box-shadow: 0 3px 12px rgba(79, 70, 229, 0.2) !important;
229+
border: none !important;
230+
position: relative;
231+
}
232+
233+
/* Method name styling within the heading */
234+
.doc-object-name.doc-function-name {
235+
color: white !important;
236+
font-size: 1.2rem !important;
237+
font-weight: 600 !important;
238+
}
239+
240+
/* Code symbols in method headings */
241+
.doc-heading .doc-symbol {
242+
color: white !important;
243+
background: rgba(255, 255, 255, 0.15) !important;
244+
padding: 0.2rem 0.4rem !important;
245+
border-radius: 4px !important;
246+
}
247+
248+
/* Icons for class headers (larger) */
204249
h2[id^="jsrm"]:before, h3[id^="jsrm"]:before, h4[id^="jsrm"]:before {
250+
content: "🏗️";
251+
position: absolute;
252+
right: 1.2rem;
253+
top: 50%;
254+
transform: translateY(-50%);
255+
font-size: 1.2rem;
256+
opacity: 0.8;
257+
}
258+
259+
/* Icons for method headers (smaller) */
260+
h5[id^="jsrm"]:before {
205261
content: "🔧";
206262
position: absolute;
207263
right: 1rem;
@@ -211,14 +267,24 @@ h2[id^="jsrm"]:before, h3[id^="jsrm"]:before, h4[id^="jsrm"]:before {
211267
opacity: 0.8;
212268
}
213269

270+
/* Code styling for class headers */
214271
h2[id^="jsrm"] code, h3[id^="jsrm"] code, h4[id^="jsrm"] code {
215272
background: rgba(255, 255, 255, 0.15) !important;
216273
color: white !important;
217-
padding: 0.3rem 0.6rem;
274+
padding: 0.4rem 0.8rem;
218275
border-radius: 5px;
276+
font-size: 1.3rem !important;
277+
font-weight: 700 !important;
278+
}
279+
280+
/* Code styling for method headers */
281+
h5[id^="jsrm"] code {
282+
background: rgba(255, 255, 255, 0.15) !important;
283+
color: white !important;
284+
padding: 0.3rem 0.6rem;
285+
border-radius: 4px;
219286
font-size: 1.1rem !important;
220287
font-weight: 600 !important;
221-
margin-right: 2rem;
222288
}
223289

224290
h2[id^="jsrm"] a, h3[id^="jsrm"] a, h4[id^="jsrm"] a {
@@ -266,31 +332,31 @@ h3[id*="property"]:before, h4[id*="property"]:before {
266332
content: "📋";
267333
}
268334

269-
/* Parameter and return tables - more subtle and compact */
335+
/* Parameter and Return tables - reduced size and padding */
270336
.md-typeset table:not([class]) {
271337
border-radius: 6px;
272338
overflow: hidden;
273339
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
274340
border: 1px solid rgba(var(--md-default-fg-color--rgb), 0.1);
275-
margin: 0.75rem 0;
276-
font-size: 0.85rem;
341+
margin: 0.5rem 0;
342+
font-size: 0.78rem;
277343
}
278344

279345
.md-typeset table:not([class]) th {
280346
background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
281347
color: white;
282348
font-weight: 600;
283-
font-size: 0.8rem;
284-
padding: 0.5rem 0.6rem;
349+
font-size: 0.72rem;
350+
padding: 0.35rem 0.5rem;
285351
text-transform: uppercase;
286-
letter-spacing: 0.5px;
352+
letter-spacing: 0.4px;
287353
}
288354

289355
.md-typeset table:not([class]) td {
290-
padding: 0.45rem 0.6rem;
356+
padding: 0.3rem 0.5rem;
291357
vertical-align: top;
292-
font-size: 0.85rem;
293-
line-height: 1.4;
358+
font-size: 0.78rem;
359+
line-height: 1.3;
294360
}
295361

296362
.md-typeset table:not([class]) tr:nth-child(even) {
@@ -302,9 +368,9 @@ h3[id*="property"]:before, h4[id*="property"]:before {
302368
background: rgba(var(--md-accent-fg-color--rgb), 0.08);
303369
color: var(--md-accent-fg-color);
304370
font-weight: 500;
305-
padding: 0.15rem 0.3rem;
371+
padding: 0.1rem 0.25rem;
306372
border-radius: 3px;
307-
font-size: 0.8rem;
373+
font-size: 0.72rem;
308374
}
309375

310376
/* Docstring sections - consistent with sidebar */
@@ -326,7 +392,44 @@ hr {
326392

327393
/* Footer enhancements */
328394
.md-footer {
329-
background: var(--gradient-primary);
395+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
396+
border-top: 1px solid rgba(255, 255, 255, 0.1);
397+
}
398+
399+
.md-footer-meta {
400+
background: rgba(0, 0, 0, 0.1) !important;
401+
}
402+
403+
.md-footer__inner {
404+
max-width: 1200px;
405+
margin: 0 auto;
406+
}
407+
408+
.md-footer-meta__inner {
409+
max-width: 1200px;
410+
margin: 0 auto;
411+
}
412+
413+
/* Fix oversized social media icons */
414+
.md-footer__social-link {
415+
width: 32px !important;
416+
height: 32px !important;
417+
display: inline-flex !important;
418+
align-items: center !important;
419+
justify-content: center !important;
420+
}
421+
422+
.md-footer__social-link svg {
423+
width: 20px !important;
424+
height: 20px !important;
425+
max-width: 20px !important;
426+
max-height: 20px !important;
427+
}
428+
429+
.md-footer__social {
430+
display: flex !important;
431+
gap: 0.5rem !important;
432+
align-items: center !important;
330433
}
331434

332435
/* Responsive adjustments */

0 commit comments

Comments
 (0)