Skip to content

Commit 24b2647

Browse files
committed
feat: customize koki cSS variables
1 parent ee42ab6 commit 24b2647

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

src/components/ApiExplorer.astro

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,41 @@ import { Aside } from '@astrojs/starlight/components'
1111
<link rel="stylesheet" href="/styles/koki.css">
1212
<script is:inline src="/js/koki.js"></script>
1313
14+
<style>
15+
:root {
16+
/* Header */
17+
--arbol-header-bg: var(--sl-color-bg-sidebar);
18+
--arbol-header-text-color: var(--sl-color-gray-1);
19+
20+
/* General */
21+
--arbol-bg-color: var(--sl-color-bg-inline-code);
22+
--arbol-text-color: var(--sl-color-white);
23+
--arbol--text-font: var(--__sl-font);
24+
--arbol--text-size: var(--sl-text-body);
25+
26+
/* Code */
27+
--arbol-code-text-font: var(--__sl-font-mono);
28+
--arbol-code-text-size: var(--sl-text-code);
29+
--arbol-code-text-color: var(--sl-color-gray-1);
30+
--arbol-code-variable: var(--sl-color-orange-high);
31+
--arbol-code-value: var(--sl-color-green-high);
32+
--arbol-code-numeric: var(--sl-color-purple-high);
33+
--arbol-code-bool: var(--sl-color-blue-high);
34+
--arbol-code-string: var(--sl-color-accent-high);
35+
--arbol-code-undefined: var(--sl-color-red-high);
36+
--arbol-code-misc: var(--sl-color-orange-high);
37+
}
38+
</style>
39+
1440
<section class="py-12">
15-
<h2 class="text-center">Try it now!</h2>
41+
<h2 class="text-center" style="margin-bottom: 32px">Try it now!</h2>
1642
1743
<Aside type="tip" title="Need a hint?">
1844
Try <code>pokemon/ditto</code>, <code>pokemon-species/aegislash</code>, <code>type/3</code>,
1945
<code>ability/battle-armor</code>, or <code>pokemon?limit=100000&offset=0</code>.
2046
</Aside>
2147
22-
<div class="py-8 flex items-baseline">
48+
<div class="flex items-baseline">
2349
<label
2450
class="
2551
font-bold
@@ -67,7 +93,7 @@ import { Aside } from '@astrojs/starlight/components'
6793
>https://pokemon.co/v2/pokemon/ditto</a>
6894
</p>
6995
70-
<article id="json-preview" data-ditto={dittoJson}>
96+
<article id="json-preview" data-ditto={dittoJson} class="not-content">
7197
<div id="json-container">hello</div>
7298
</article>
7399
</section>

0 commit comments

Comments
 (0)