Skip to content

Commit fff38d5

Browse files
HiDeoodelucis
andauthored
Tweak header hover effects (#3598)
Co-authored-by: Chris Swithinbank <[email protected]>
1 parent 375edcc commit fff38d5

3 files changed

Lines changed: 31 additions & 3 deletions

File tree

.changeset/modern-hats-confess.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
'@astrojs/starlight': minor
3+
---
4+
5+
Makes hover styles consistent in Starlight’s navigation bar
6+
7+
Previously, the social icon links and language/theme switchers in Starlight’s navigation bar, dimmed on hover.
8+
After this change, they now increase in contrast on hover instead.
9+
This matches hover behavior elsewhere, for example in the sidebar, table of contents, or search button.
10+
11+
⚠️ **Potentially breaking change:** this is a subtle change to the hover style colors.
12+
If you want to preserve the previous styling, you can add the following [custom CSS](https://starlight.astro.build/guides/css-and-tailwind/#custom-css-styles) to your site:
13+
14+
```css
15+
starlight-theme-select label,
16+
starlight-lang-select label {
17+
color: var(--sl-color-gray-1);
18+
19+
&:hover {
20+
color: var(--sl-color-white);
21+
}
22+
}
23+
24+
.social-icons a:hover {
25+
color: var(--sl-color-text-accent);
26+
opacity: 0.66;
27+
}
28+
```

packages/starlight/components/Select.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ interface Props {
4545
display: flex;
4646
align-items: center;
4747
gap: 0.25rem;
48-
color: var(--sl-color-gray-1);
48+
color: var(--sl-color-gray-2);
4949
}
5050

5151
label:hover {
52-
color: var(--sl-color-gray-2);
52+
color: var(--sl-color-white);
5353
}
5454

5555
.icon {

packages/starlight/components/SocialIcons.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const links = config.social || [];
2626
margin: -0.5em;
2727
}
2828
a:hover {
29-
opacity: 0.66;
29+
color: var(--sl-color-white);
3030
}
3131
}
3232
</style>

0 commit comments

Comments
 (0)