Skip to content

Commit 13e3440

Browse files
Make targeting sidebar links with CSS a little easier (#3281)
Co-authored-by: Chris Swithinbank <[email protected]>
1 parent e32ca80 commit 13e3440

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/breezy-months-kneel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@astrojs/starlight": patch
3+
---
4+
5+
Adds a `sl-sidebar-link` class to sidebar links

packages/starlight/components/SidebarSublist.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const { sublist, nested } = Astro.props;
2121
<a
2222
href={entry.href}
2323
aria-current={entry.isCurrent && 'page'}
24-
class:list={[{ large: !nested }, entry.attrs.class]}
24+
class:list={['sl-sidebar-link', { large: !nested }, entry.attrs.class]}
2525
{...entry.attrs}
2626
>
2727
<span>{entry.label}</span>

0 commit comments

Comments
 (0)