Skip to content

Commit c79c8dc

Browse files
author
Zhuoming Chen
committed
comments and docs
1 parent b9b1fdb commit c79c8dc

1 file changed

Lines changed: 76 additions & 10 deletions

File tree

docs/_static/custom.css

Lines changed: 76 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,86 @@
1-
/* Class signature: compact (smaller, not oversized). */
1+
/* ===========================================================================
2+
Vortex docs theme — light pink-purple background + structured op blocks.
3+
=========================================================================== */
4+
5+
/* ---- 1. Light pink-purple page background (furo CSS variables) ----------
6+
Set on both ``body`` and the more-specific light selector furo uses, so the
7+
override reliably wins in light / auto modes. */
8+
body,
9+
body:not([data-theme="dark"]) {
10+
--color-background-primary: #fdf7fe; /* main content surface */
11+
--color-background-secondary: #f6ecfb; /* sidebars / secondary surface */
12+
--color-sidebar-background: #f4e9fb;
13+
--color-code-background: #f3e8fb; /* inline / block code */
14+
--color-api-background: #f6ecfb;
15+
}
16+
17+
/* Dark mode: keep it readable with a deep plum instead of pink. */
18+
@media (prefers-color-scheme: dark) {
19+
body:not([data-theme="light"]) {
20+
--color-background-primary: #17111e;
21+
--color-background-secondary: #20172a;
22+
--color-sidebar-background: #20172a;
23+
--color-code-background: #241a30;
24+
--color-api-background: #20172a;
25+
}
26+
}
27+
body[data-theme="dark"] {
28+
--color-background-primary: #17111e;
29+
--color-background-secondary: #20172a;
30+
--color-sidebar-background: #20172a;
31+
--color-code-background: #241a30;
32+
--color-api-background: #20172a;
33+
}
34+
35+
/* ---- 2. Class / method signatures: compact (not oversized) -------------- */
236
dl.py.class > dt.sig {
337
font-size: 0.9em;
438
padding: 0.3rem 0.6rem;
539
border-radius: 0.4rem;
640
}
41+
dl.py.class .sig-name { font-weight: 700; font-size: 1em; }
42+
dl.py.method > dt.sig { font-size: 0.85em; }
43+
dl.py.method > dt.sig .sig-name { font-weight: 600; }
744

8-
dl.py.class .sig-name {
45+
/* ---- 3. Structured colored blocks for the op field lists ----------------
46+
Each op docstring is a field list (:Math: / :__init__: / :__call__: / :Note:).
47+
Render every field as a stacked block: a colored label "pill" above a
48+
tinted card with a matching accent border. The region order is always
49+
Math, __init__, __call__, Note, so :nth-of-type gives a stable accent. */
50+
dl.field-list {
51+
display: block;
52+
margin: 0.6rem 0 0.4rem 0;
53+
}
54+
dl.field-list > dt { /* the region label (Math / __init__ / …) */
55+
display: inline-block;
56+
font-family: var(--font-stack--monospace, monospace);
957
font-weight: 700;
10-
font-size: 1em;
58+
font-size: 0.82em;
59+
letter-spacing: 0.02em;
60+
color: #ffffff;
61+
background: #7c3aed;
62+
padding: 0.08rem 0.55rem;
63+
border-radius: 0.4rem;
64+
margin: 0.55rem 0 0 0;
1165
}
12-
13-
/* Method signatures: a touch smaller than body text. */
14-
dl.py.method > dt.sig {
15-
font-size: 0.85em;
66+
dl.field-list > dt .colon { display: none; } /* drop the trailing colon */
67+
dl.field-list > dd { /* the region body card */
68+
display: block;
69+
margin: 0.2rem 0 0.1rem 0;
70+
padding: 0.4rem 0.75rem;
71+
border-left: 3px solid #7c3aed;
72+
background: rgba(124, 58, 237, 0.07);
73+
border-radius: 0 0.45rem 0.45rem 0;
1674
}
75+
dl.field-list > dd > p { margin: 0; }
1776

18-
dl.py.method > dt.sig .sig-name {
19-
font-weight: 600;
20-
}
77+
/* per-region accents (Math → violet, __init__ → pink, __call__ → indigo,
78+
Note → amber) */
79+
dl.field-list > dt:nth-of-type(1) { background: #7c3aed; }
80+
dl.field-list > dd:nth-of-type(1) { border-left-color: #7c3aed; background: rgba(124, 58, 237, 0.07); }
81+
dl.field-list > dt:nth-of-type(2) { background: #db2777; }
82+
dl.field-list > dd:nth-of-type(2) { border-left-color: #db2777; background: rgba(219, 39, 119, 0.07); }
83+
dl.field-list > dt:nth-of-type(3) { background: #4f46e5; }
84+
dl.field-list > dd:nth-of-type(3) { border-left-color: #4f46e5; background: rgba(79, 70, 229, 0.07); }
85+
dl.field-list > dt:nth-of-type(4) { background: #b45309; }
86+
dl.field-list > dd:nth-of-type(4) { border-left-color: #b45309; background: rgba(180, 83, 9, 0.08); }

0 commit comments

Comments
 (0)