Skip to content

Commit 71df23c

Browse files
committed
update styling for toc
1 parent b60d72b commit 71df23c

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

app.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ function docsData() {
5151

5252
const theme = defineTheme({
5353
componentsPath: import.meta.resolve("./src/solidbase-theme"),
54+
extends: defaultTheme,
5455
});
56+
5557
export default defineConfig(
5658
createWithSolidBase(theme)(
5759
{
@@ -148,6 +150,7 @@ export default defineConfig(
148150

149151
import { readFile } from "node:fs/promises";
150152
import { codeToHtml } from "shiki";
153+
import defaultTheme from "@kobalte/solidbase/default-theme";
151154

152155
function heroCodeSnippet() {
153156
const virtualModuleId = "solid:hero-code-snippet";

src/ui/layout/table-of-contents.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const TableOfContents = () => {
6565
href="#_top"
6666
classList={{
6767
"dark:text-slate-300": currentSection() !== undefined,
68-
"text-blue-800 dark:text-blue-300 font-bold hover:text-slate-700 dark:hover:text-slate-200":
68+
"text-blue-800 dark:text-blue-300 hover:text-slate-700 dark:hover:text-slate-200 hover:underline underline-offset-2":
6969
currentSection() === undefined,
7070
}}
7171
class="no-underline hover:text-slate-800"
@@ -81,32 +81,32 @@ export const TableOfContents = () => {
8181
<a
8282
href={section().href}
8383
classList={{
84-
"dark:text-slate-300": currentSection() !== section().href,
85-
"text-blue-800 dark:text-blue-200 hover:text-slate-700 dark:hover:text-slate-200 font-bold":
84+
"dark:text-slate-400": currentSection() !== section().href,
85+
"text-blue-800 dark:text-blue-200 hover:text-slate-700 dark:hover:text-slate-200 ":
8686
currentSection() === section().href,
8787
}}
88-
class="no-underline hover:text-slate-700 dark:hover:text-blue-300"
88+
class="no-underline underline-offset-2 hover:text-slate-700 hover:underline dark:hover:text-blue-300"
8989
>
9090
{section().title}
9191
</a>
9292
</span>
9393
<Show when={section().children.length !== 0}>
9494
<ol
9595
role="list"
96-
class="list-none space-y-2 pl-2.5 font-bold text-slate-500 hover:text-slate-700 active:font-bold active:text-blue-600 dark:text-slate-300 dark:hover:text-blue-200"
96+
class="list-none space-y-2 pl-2.5 text-slate-500 hover:text-slate-700 active:text-blue-600 dark:text-slate-300 dark:hover:text-blue-200"
9797
>
9898
<Index each={section().children}>
9999
{(subSection) => (
100100
<li>
101101
<a
102102
href={subSection().href}
103103
classList={{
104-
"dark:text-slate-300":
104+
"dark:text-slate-400":
105105
currentSection() !== subSection().href,
106-
"text-blue-800 dark:text-blue-200 hover:text-slate-700 dark:hover:text-slate-200 font-bold":
106+
"text-blue-800 dark:text-blue-200 hover:text-slate-700 dark:hover:text-slate-200":
107107
currentSection() === subSection().href,
108108
}}
109-
class="no-underline hover:text-blue-700 dark:hover:text-blue-300"
109+
class="no-underline underline-offset-2 hover:text-blue-700 hover:underline dark:hover:text-blue-300"
110110
>
111111
{subSection().title}
112112
</a>

0 commit comments

Comments
 (0)