Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/astro/Sidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ function isActive(href: string): boolean {
aria-current={isActive(item.href) ? 'page' : undefined}
class:list={[
'min-h-0 justify-start py-1.5 text-start',
isActive(item.href) && 'menu-active bg-base-100 font-medium',
// daisyUI `menu-active` sets the foreground to
// `neutral-content`, which can be unreadable on the
// `base-100` pill we pair it with (e.g. kolektiv-dark).
// `text-base-content` supplies the matching foreground.
isActive(item.href) && 'menu-active bg-base-100 text-base-content font-medium',
]}
>
{item.icon && (
Expand Down
11 changes: 11 additions & 0 deletions src/styles/chrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ html {
border-color: var(--color-base-content);
}

/* ---- Sidebar active link ---- */

/* daisyUI's `.menu-active` colours the label with `neutral-content`, which is
* unreadable on the `base-100` pill Sidebar pairs it with in some themes (for
* example kolektiv-dark). Force the base foreground/background pair. Scoped to
* `aria-current`, which search-dialog hits do not set, so they keep daisyUI's
* readable `neutral` / `neutral-content` pair. */
.menu a[aria-current='page'] {
color: var(--color-base-content);
}

/* ---- Segmented toggles (language / framework) ---- */

.kdc-toggle:has(input:checked) {
Expand Down
Loading