From 02830b90aabedc9bd9958588b78142f99b042346 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 25 Sep 2024 11:48:26 -0400 Subject: [PATCH 1/6] use text color to highlight current section --- .../src/routes/docs/[...path]/OnThisPage.svelte | 13 +++---------- .../site-kit/src/lib/docs/DocsContents.svelte | 15 ++++++++++----- packages/site-kit/src/lib/styles/tokens.css | 4 ++-- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte b/apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte index 82099510aa..ca5cfac8bb 100644 --- a/apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte +++ b/apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte @@ -59,7 +59,7 @@ a { display: block; - color: inherit; + color: var(--sk-text-3); box-shadow: none; /* unfortunate hack to unset some other CSS */ /* Only show the title link if it's in the sidebar */ @@ -156,15 +156,8 @@ display: block; } - a.active::before { - content: ''; - position: absolute; - left: -2rem; - top: calc(50% - 0.6em); - height: 1em; - width: 1em; - background: url($lib/icons/arrow-left.svg); - background-size: contain; + a.active { + color: var(--sk-text-1); } } } diff --git a/packages/site-kit/src/lib/docs/DocsContents.svelte b/packages/site-kit/src/lib/docs/DocsContents.svelte index 2638b9619a..e8ad6481d5 100644 --- a/packages/site-kit/src/lib/docs/DocsContents.svelte +++ b/packages/site-kit/src/lib/docs/DocsContents.svelte @@ -21,7 +21,11 @@