|
1 | | -:root { |
2 | | - --content-max-width: 72rem; |
3 | | - --sidebar-width: 18rem; |
4 | | - --color-background-primary: #f7f6f2; |
5 | | - --color-background-secondary: #f0efe9; |
6 | | - --color-sidebar-background: #f0efe9; |
7 | | - --color-background-hover: #e9ecf2; |
8 | | - --color-background-border: #e1e4ee; |
9 | | - --color-brand-primary: #1f5eff; |
10 | | - --color-brand-content: #1a55e6; |
11 | | - --color-foreground-primary: #16181d; |
12 | | - --color-foreground-secondary: #4b5563; |
13 | | - --accent-warm: #ff7a59; |
14 | | - --accent-mint: #22c997; |
15 | | - --accent-sky: #4cc9f0; |
16 | | - --accent-violet: #9b5de5; |
| 1 | +/* |
| 2 | + * WfCommons documentation — light-only design. |
| 3 | + * |
| 4 | + * The furo color palettes are pinned to identical light values in conf.py |
| 5 | + * (light_css_variables == dark_css_variables), so the page never renders |
| 6 | + * dark. This stylesheet enforces a light color scheme at the browser level, |
| 7 | + * hides the theme toggle, and applies layout/typography polish. |
| 8 | + */ |
| 9 | + |
| 10 | +:root, |
| 11 | +html[data-theme="light"], |
| 12 | +html[data-theme="dark"], |
| 13 | +html[data-theme="auto"] { |
17 | 14 | color-scheme: light; |
18 | 15 | } |
19 | 16 |
|
20 | | -article h1 { |
21 | | - letter-spacing: -0.01em; |
22 | | -} |
23 | | - |
24 | | -article h2 { |
25 | | - letter-spacing: -0.005em; |
| 17 | +:root { |
| 18 | + --content-max-width: 54em; |
| 19 | + --sidebar-width: 17em; |
26 | 20 | } |
27 | 21 |
|
| 22 | +/* Furo hardcodes a white code foreground for dark mode; since the code |
| 23 | + * background is always light here, pin the foreground to dark as well. */ |
28 | 24 | body { |
29 | | - background: |
30 | | - radial-gradient(1200px 600px at 10% -10%, rgba(155, 93, 229, 0.12), transparent 60%), |
31 | | - radial-gradient(900px 500px at 90% -15%, rgba(76, 201, 240, 0.15), transparent 55%), |
32 | | - radial-gradient(700px 400px at 50% 110%, rgba(34, 201, 151, 0.12), transparent 60%), |
33 | | - var(--color-background-primary); |
34 | | -} |
35 | | - |
36 | | -.sidebar-drawer, |
37 | | -.sidebar-container, |
38 | | -.toc-drawer, |
39 | | -.page-sidebar, |
40 | | -.sidebar-tree { |
41 | | - background: var(--color-sidebar-background); |
42 | | -} |
43 | | - |
44 | | -.content { |
45 | | - background: transparent; |
46 | | -} |
47 | | - |
48 | | -/* Ensure any theme variant still uses the light palette. */ |
49 | | -html[data-theme="dark"], |
50 | | -html[data-theme="auto"], |
51 | | -body[data-theme="dark"], |
52 | | -body[data-theme="auto"] { |
53 | | - color-scheme: light; |
| 25 | + --color-code-foreground: black !important; |
54 | 26 | } |
55 | 27 |
|
56 | | -html[data-theme="dark"], |
57 | | -html[data-theme="auto"], |
58 | | -body[data-theme="dark"], |
59 | | -body[data-theme="auto"] { |
60 | | - --color-background-primary: #f7f6f2; |
61 | | - --color-background-secondary: #f0efe9; |
62 | | - --color-sidebar-background: #f0efe9; |
63 | | - --color-background-hover: #e9ecf2; |
64 | | - --color-background-border: #e1e4ee; |
65 | | - --color-brand-primary: #1f5eff; |
66 | | - --color-brand-content: #1a55e6; |
67 | | - --color-foreground-primary: #16181d; |
68 | | - --color-foreground-secondary: #4b5563; |
69 | | - --accent-warm: #ff7a59; |
70 | | - --accent-mint: #22c997; |
71 | | - --accent-sky: #4cc9f0; |
72 | | - --accent-violet: #9b5de5; |
73 | | -} |
74 | | - |
75 | | -body[data-theme="dark"], |
76 | | -body[data-theme="auto"] { |
77 | | - background: |
78 | | - radial-gradient(1200px 600px at 10% -10%, rgba(155, 93, 229, 0.12), transparent 60%), |
79 | | - radial-gradient(900px 500px at 90% -15%, rgba(76, 201, 240, 0.15), transparent 55%), |
80 | | - radial-gradient(700px 400px at 50% 110%, rgba(34, 201, 151, 0.12), transparent 60%), |
81 | | - var(--color-background-primary); |
82 | | -} |
83 | | - |
84 | | -body[data-theme="dark"] .sidebar-drawer, |
85 | | -body[data-theme="auto"] .sidebar-drawer, |
86 | | -body[data-theme="dark"] .sidebar-container, |
87 | | -body[data-theme="auto"] .sidebar-container, |
88 | | -body[data-theme="dark"] .toc-drawer, |
89 | | -body[data-theme="auto"] .toc-drawer, |
90 | | -body[data-theme="dark"] .page-sidebar, |
91 | | -body[data-theme="auto"] .page-sidebar, |
92 | | -body[data-theme="dark"] .sidebar-tree, |
93 | | -body[data-theme="auto"] .sidebar-tree, |
94 | | -body[data-theme="dark"] .mobile-header, |
95 | | -body[data-theme="auto"] .mobile-header { |
96 | | - background: var(--color-sidebar-background); |
| 28 | +/* Hide the light/dark toggle: the docs are light-only by design. */ |
| 29 | +.theme-toggle, |
| 30 | +.theme-toggle-container { |
| 31 | + display: none !important; |
97 | 32 | } |
98 | 33 |
|
99 | 34 | /* Never show dark-only elements. */ |
100 | 35 | .only-dark { |
101 | 36 | display: none !important; |
102 | 37 | } |
103 | 38 |
|
104 | | -article { |
105 | | - background: |
106 | | - linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.92)); |
107 | | - border: 1px solid var(--color-background-border); |
108 | | - border-radius: 20px; |
109 | | - box-shadow: 0 24px 48px rgba(19, 25, 39, 0.08); |
110 | | - padding: 2.25rem 2.5rem; |
111 | | -} |
| 39 | +/* ---- Typography ---------------------------------------------------------- */ |
112 | 40 |
|
113 | 41 | article h1 { |
114 | | - color: #0f172a; |
| 42 | + font-weight: 700; |
| 43 | + letter-spacing: -0.01em; |
115 | 44 | } |
116 | 45 |
|
117 | 46 | article h1::after { |
118 | 47 | content: ""; |
119 | 48 | display: block; |
120 | | - width: 72px; |
121 | | - height: 6px; |
122 | | - margin-top: 0.5rem; |
| 49 | + width: 64px; |
| 50 | + height: 4px; |
| 51 | + margin-top: 0.4rem; |
123 | 52 | border-radius: 999px; |
124 | | - background: linear-gradient(90deg, var(--accent-warm), var(--accent-sky), var(--accent-mint)); |
| 53 | + background: var(--color-brand-primary); |
125 | 54 | } |
126 | 55 |
|
127 | 56 | article h2 { |
128 | | - color: #1e293b; |
| 57 | + font-weight: 650; |
| 58 | + letter-spacing: -0.005em; |
| 59 | + border-bottom: 1px solid var(--color-background-border); |
| 60 | + padding-bottom: 0.3rem; |
129 | 61 | } |
130 | 62 |
|
131 | | -article h3 { |
132 | | - color: #1f2937; |
| 63 | +/* The index logo uses :align: left; keep it in the flow instead of floating. */ |
| 64 | +article .align-left { |
| 65 | + float: none !important; |
133 | 66 | } |
134 | 67 |
|
135 | | -article a { |
136 | | - color: var(--color-brand-primary); |
137 | | - font-weight: 600; |
138 | | -} |
| 68 | +/* ---- Code blocks and inline code ---------------------------------------- */ |
139 | 69 |
|
140 | | -article a:hover { |
141 | | - color: var(--accent-violet); |
142 | | -} |
143 | | - |
144 | | -code, |
145 | 70 | pre { |
146 | | - background: #eef2ff; |
147 | | - border-color: #d8def2; |
| 71 | + border: 1px solid var(--color-background-border); |
| 72 | + border-radius: 8px; |
148 | 73 | } |
149 | 74 |
|
150 | | -pre { |
151 | | - box-shadow: inset 0 0 0 1px rgba(26, 85, 230, 0.08); |
| 75 | +code.literal { |
| 76 | + border: 1px solid var(--color-background-border); |
| 77 | + border-radius: 4px; |
| 78 | + padding: 0.1em 0.3em; |
152 | 79 | } |
153 | 80 |
|
154 | | -.sidebar-tree .current > a { |
155 | | - background: rgba(26, 85, 230, 0.08); |
156 | | - border-radius: 8px; |
157 | | -} |
| 81 | +/* ---- Tables -------------------------------------------------------------- */ |
158 | 82 |
|
159 | | -.sidebar-tree a:hover { |
160 | | - background: rgba(34, 201, 151, 0.12); |
| 83 | +article table.docutils { |
| 84 | + border: 1px solid var(--color-background-border); |
161 | 85 | border-radius: 8px; |
| 86 | + border-collapse: separate; |
| 87 | + border-spacing: 0; |
| 88 | + overflow: hidden; |
| 89 | + width: 100%; |
162 | 90 | } |
163 | 91 |
|
164 | | -.toc-drawer .toc-tree li > a, |
165 | | -.toc-tree li > a { |
166 | | - border-radius: 8px; |
| 92 | +article table.docutils th { |
| 93 | + background: var(--color-background-secondary); |
| 94 | + text-align: left; |
167 | 95 | } |
168 | 96 |
|
169 | | -.toc-tree li > a:hover { |
170 | | - background: rgba(76, 201, 240, 0.14); |
| 97 | +article table.docutils th, |
| 98 | +article table.docutils td { |
| 99 | + border: none; |
| 100 | + border-bottom: 1px solid var(--color-background-border); |
| 101 | + padding: 0.5em 0.75em; |
171 | 102 | } |
172 | 103 |
|
173 | | -table { |
174 | | - border-radius: 12px; |
175 | | - overflow: hidden; |
176 | | - box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08); |
| 104 | +article table.docutils tr:last-child td { |
| 105 | + border-bottom: none; |
177 | 106 | } |
178 | 107 |
|
179 | | -th { |
180 | | - background: rgba(31, 94, 255, 0.08); |
181 | | -} |
| 108 | +/* ---- Landing-page cards (sphinx-design) ---------------------------------- */ |
182 | 109 |
|
183 | | -hr { |
184 | | - border: none; |
185 | | - height: 1px; |
186 | | - background: linear-gradient(90deg, transparent, rgba(31, 94, 255, 0.3), transparent); |
| 110 | +.sd-card { |
| 111 | + border: 1px solid var(--color-background-border); |
| 112 | + border-radius: 10px; |
| 113 | + box-shadow: 0 1px 3px rgba(26, 34, 51, 0.06); |
| 114 | + transition: box-shadow 0.15s ease, transform 0.15s ease; |
| 115 | + height: 100%; |
187 | 116 | } |
188 | 117 |
|
189 | | -/* Hide heading link glyphs while keeping the anchor element. */ |
190 | | -.headerlink { |
191 | | - color: transparent !important; |
192 | | - text-decoration: none !important; |
193 | | - font-size: 0 !important; |
194 | | - width: 0; |
195 | | - margin-left: 0; |
| 118 | +.sd-card:hover { |
| 119 | + box-shadow: 0 4px 12px rgba(26, 34, 51, 0.12); |
| 120 | + transform: translateY(-2px); |
196 | 121 | } |
197 | 122 |
|
198 | | -.headerlink::before { |
199 | | - content: ""; |
| 123 | +.sd-card .sd-card-title { |
| 124 | + color: var(--color-brand-primary); |
| 125 | + font-weight: 650; |
200 | 126 | } |
201 | 127 |
|
202 | | -/* Force light palette even if the theme requests dark mode. */ |
203 | | -html[data-theme="dark"], |
204 | | -html[data-theme="dark"] body, |
205 | | -html[data-theme="auto"], |
206 | | -html[data-theme="auto"] body { |
207 | | - --color-background-primary: #f7f6f2; |
208 | | - --color-background-secondary: #f0efe9; |
209 | | - --color-sidebar-background: #f0efe9; |
210 | | - --color-background-hover: #e9ecf2; |
211 | | - --color-background-border: #e1e4ee; |
212 | | - --color-brand-primary: #1f5eff; |
213 | | - --color-brand-content: #1a55e6; |
214 | | - --color-foreground-primary: #16181d; |
215 | | - --color-foreground-secondary: #4b5563; |
216 | | - --accent-warm: #ff7a59; |
217 | | - --accent-mint: #22c997; |
218 | | - --accent-sky: #4cc9f0; |
219 | | - --accent-violet: #9b5de5; |
220 | | - color-scheme: light; |
221 | | -} |
| 128 | +/* ---- Sidebar and navigation ---------------------------------------------- */ |
222 | 129 |
|
223 | | -html[data-theme="dark"] body, |
224 | | -html[data-theme="auto"] body { |
225 | | - background: |
226 | | - radial-gradient(1200px 600px at 10% -10%, rgba(155, 93, 229, 0.12), transparent 60%), |
227 | | - radial-gradient(900px 500px at 90% -15%, rgba(76, 201, 240, 0.15), transparent 55%), |
228 | | - radial-gradient(700px 400px at 50% 110%, rgba(34, 201, 151, 0.12), transparent 60%), |
229 | | - var(--color-background-primary); |
| 130 | +.sidebar-tree .current-page > .reference { |
| 131 | + font-weight: 650; |
230 | 132 | } |
231 | 133 |
|
232 | | -/* Hide the theme toggle UI entirely. */ |
233 | | -.theme-toggle, |
234 | | -.theme-toggle-container, |
235 | | -.theme-toggle-container button { |
236 | | - display: none !important; |
| 134 | +.sidebar-tree .reference:hover, |
| 135 | +.toc-tree .reference:hover { |
| 136 | + background: var(--color-background-hover); |
| 137 | + border-radius: 6px; |
237 | 138 | } |
238 | 139 |
|
239 | | -/* Hide project title text in the sidebar, keep the logo visible. */ |
240 | | -.sidebar-brand-text, |
241 | | -.sidebar-brand .brand-text, |
242 | | -.sidebar-brand .title { |
243 | | - display: none !important; |
244 | | -} |
| 140 | +/* ---- Admonitions ---------------------------------------------------------- */ |
245 | 141 |
|
246 | | -article .align-left { |
247 | | - float: none !important |
| 142 | +.admonition { |
| 143 | + border-radius: 8px; |
| 144 | + box-shadow: none; |
| 145 | + border: 1px solid var(--color-background-border); |
248 | 146 | } |
0 commit comments