Skip to content

Commit def667e

Browse files
authored
fix: improve CSS styling for api-reference section (#509)
1 parent 6aab2ff commit def667e

1 file changed

Lines changed: 188 additions & 0 deletions

File tree

docs/src/css/custom.css

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,191 @@ body {
162162
.plugin-blog.plugin-id-default.docs-version-current.docs-blog-page {
163163
background: #0b0b13 !important;
164164
}
165+
166+
.plugin-docs .plugin-id-default [data-path*="api-reference"] blockquote,
167+
blockquote {
168+
background: #2b2d42;
169+
border-left: 4px solid var(--graph-purple);
170+
border-radius: 0.5rem;
171+
margin: 1rem 0;
172+
padding: 1rem 1.5rem;
173+
font-size: 0.95rem;
174+
line-height: 1.6;
175+
font-family: "Fira Code", "Monaco", "Consolas", monospace;
176+
}
177+
178+
.plugin-docs .plugin-id-default [data-path*="api-reference"] blockquote code,
179+
.plugin-docs .plugin-id-default [data-path*="api-reference"] code,
180+
.markdown blockquote code {
181+
background: transparent;
182+
color: #e6e6e6;
183+
padding: 0;
184+
border-radius: 0;
185+
font-size: 0.9em;
186+
font-family: "Fira Code", "Monaco", "Consolas", monospace;
187+
font-weight: 400;
188+
}
189+
190+
.plugin-docs
191+
.plugin-id-default
192+
[data-path*="api-reference"]
193+
blockquote
194+
code
195+
.token.keyword,
196+
.plugin-docs .plugin-id-default [data-path*="api-reference"] .token.keyword {
197+
color: #c792ea;
198+
}
199+
200+
.plugin-docs
201+
.plugin-id-default
202+
[data-path*="api-reference"]
203+
blockquote
204+
code
205+
.token.type,
206+
.plugin-docs .plugin-id-default [data-path*="api-reference"] .token.type {
207+
color: #82aaff;
208+
}
209+
210+
.plugin-docs
211+
.plugin-id-default
212+
[data-path*="api-reference"]
213+
blockquote
214+
code
215+
.token.string,
216+
.plugin-docs .plugin-id-default [data-path*="api-reference"] .token.string {
217+
color: #c3e88d;
218+
}
219+
220+
.plugin-docs
221+
.plugin-id-default
222+
[data-path*="api-reference"]
223+
blockquote
224+
code
225+
.token.property,
226+
.plugin-docs .plugin-id-default [data-path*="api-reference"] .token.property {
227+
color: #ff9cac;
228+
}
229+
230+
.plugin-docs
231+
.plugin-id-default
232+
[data-path*="api-reference"]
233+
code:not(.token):not([class*="language-"]) {
234+
background: #2b2d42;
235+
color: #e6e6e6;
236+
padding: 0.2rem 0.4rem;
237+
border-radius: 0.25rem;
238+
font-size: 0.9em;
239+
font-weight: 400;
240+
border: 1px solid rgba(255, 255, 255, 0.1);
241+
font-family: "Fira Code", "Monaco", "Consolas", monospace;
242+
}
243+
244+
.plugin-docs .plugin-id-default [data-path*="api-reference"] blockquote {
245+
color: #e6e6e6;
246+
}
247+
248+
.plugin-docs .plugin-id-default [data-path*="api-reference"] blockquote code {
249+
background: transparent;
250+
padding: 0;
251+
border: none;
252+
color: inherit;
253+
}
254+
255+
.plugin-docs .plugin-id-default [data-path*="api-reference"] blockquote {
256+
white-space: pre-wrap;
257+
}
258+
259+
.plugin-docs .plugin-id-default [data-path*="api-reference"] .tsd-signature,
260+
.plugin-docs .plugin-id-default [data-path*="api-reference"] blockquote {
261+
background: #1e1e2e !important;
262+
border: 1px solid #313244;
263+
color: #cdd6f4;
264+
font-family: "Fira Code", "JetBrains Mono", "Monaco", "Consolas", monospace;
265+
font-size: 14px;
266+
line-height: 1.5;
267+
padding: 1rem;
268+
border-radius: 0.5rem;
269+
border-left: 4px solid var(--graph-purple);
270+
}
271+
272+
.plugin-docs
273+
.plugin-id-default
274+
[data-path*="api-reference"]
275+
.tsd-signature
276+
code,
277+
.plugin-docs .plugin-id-default [data-path*="api-reference"] blockquote code {
278+
background: transparent !important;
279+
color: inherit !important;
280+
padding: 0 !important;
281+
border: none !important;
282+
font-size: inherit !important;
283+
}
284+
285+
.plugin-docs
286+
.plugin-id-default
287+
[data-path*="api-reference"]
288+
blockquote::before {
289+
content: "";
290+
display: block;
291+
font-family: inherit;
292+
white-space: pre-wrap;
293+
color: inherit;
294+
}
295+
296+
.plugin-docs .plugin-id-default [data-path*="api-reference"] .tsd-signature {
297+
background: rgba(255, 255, 255, 0.04);
298+
border: 1px solid rgba(255, 255, 255, 0.08);
299+
border-radius: 0.5rem;
300+
padding: 1rem;
301+
font-family: "Fira Code", "Monaco", "Consolas", monospace;
302+
font-size: 0.9rem;
303+
line-height: 1.5;
304+
overflow-x: auto;
305+
}
306+
307+
.plugin-docs
308+
.plugin-id-default
309+
[data-path*="api-reference"]
310+
.tsd-signature-type {
311+
color: var(--starfield-green);
312+
font-weight: 500;
313+
}
314+
315+
.plugin-docs
316+
.plugin-id-default
317+
[data-path*="api-reference"]
318+
.tsd-signature-parameter {
319+
color: var(--nebula-pink);
320+
}
321+
322+
.plugin-docs
323+
.plugin-id-default
324+
[data-path*="api-reference"]
325+
.tsd-signature-keyword {
326+
color: var(--astro-blue);
327+
font-weight: 600;
328+
}
329+
330+
.plugin-docs .plugin-id-default [data-path*="api-reference"] .tsd-table {
331+
margin: 1rem 0;
332+
border-radius: 0.5rem;
333+
overflow: hidden;
334+
border: 1px solid rgba(255, 255, 255, 0.08);
335+
}
336+
337+
.plugin-docs .plugin-id-default [data-path*="api-reference"] .tsd-table th {
338+
background: rgba(255, 255, 255, 0.05);
339+
font-weight: 600;
340+
color: var(--galactic-aqua);
341+
}
342+
343+
.plugin-docs
344+
.plugin-id-default
345+
[data-path*="api-reference"]
346+
.tsd-table
347+
td
348+
code {
349+
background: rgba(255, 255, 255, 0.06);
350+
padding: 0.1rem 0.3rem;
351+
border-radius: 0.2rem;
352+
}

0 commit comments

Comments
 (0)