Skip to content

Commit c58d168

Browse files
committed
fix(nav): add hover-follow pill and keep active item semibold
Move the main nav active pill with cursor hover via :has() selectors. Hover previews use normal weight while route-active items stay semibold. Align dark hero nav, remove stale hero underline rules, and promote Locations in the Product dropdown card.
1 parent 7645445 commit c58d168

5 files changed

Lines changed: 34 additions & 16 deletions

File tree

public/images/nav/world-map.png

14.9 KB
Loading

src/data/navigation.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"href": "/essentials"
2121
},
2222
{
23-
"text": "Pricing",
24-
"image": "/images/nav/pricing.png",
25-
"desc": "Pssssssst... It's free",
26-
"href": "/pricing"
23+
"text": "Locations",
24+
"image": "/images/nav/world-map.png",
25+
"desc": "Deploy at the global edge",
26+
"href": "/locations"
2727
}
2828
]
2929
}
@@ -37,7 +37,6 @@
3737
{
3838
"title": "Get started:",
3939
"items": [
40-
{ "text": "Locations", "href": "/locations" },
4140
{ "text": "Blog", "href": "/blog" },
4241
{
4342
"text": "Videos",

src/v1/styles/components-dark.css

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,22 @@
3030

3131
.nav--main {
3232
.nav-menu-link {
33-
@apply text-glacier-mist-700 opacity-100 hover:opacity-80;
33+
@apply text-glacier-mist-700 opacity-100;
34+
35+
&.link--active {
36+
@apply font-semibold;
37+
}
38+
}
39+
40+
.nav-menu-item:hover > .nav-menu-link:not(.link--active),
41+
.nav-dropdown:focus-within > .nav-menu-link:not(.link--active) {
42+
@apply text-canyon-clay---links bg-white font-normal opacity-100;
43+
}
44+
45+
.nav-menu:not(:has(.nav-menu-item:hover)) .nav-menu-link.link--active,
46+
.nav-menu-item:hover > .nav-menu-link.link--active,
47+
.nav-dropdown:focus-within > .nav-menu-link.link--active {
48+
@apply text-canyon-clay---links bg-white font-semibold opacity-100;
3449
}
3550
}
3651
}

src/v1/styles/components-hero.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
2626
}
2727
}
2828
}
29-
30-
.link--active {
31-
@apply [&>span]:border-white/70;
32-
}
3329
}
3430
}
3531
&.light {
@@ -52,10 +48,6 @@
5248
}
5349
}
5450
}
55-
56-
.link--active {
57-
@apply [&>span]:border-midnight-fjord/70;
58-
}
5951
}
6052

6153
.nav-logo {

src/v1/styles/components-nav.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,24 @@
5757
}
5858

5959
.nav-menu-link {
60-
@apply flex items-center gap-2 px-3 py-1.5 font-normal opacity-60 hover:opacity-80;
60+
@apply flex items-center gap-2 px-3 py-1.5 font-normal opacity-60 transition-colors duration-150;
6161

6262
&.link--active {
63-
@apply text-canyon-clay---links rounded-md bg-white font-semibold opacity-100 hover:opacity-80;
63+
@apply font-semibold;
6464
}
6565
}
66+
67+
/* Pill: hover preview (normal weight) vs route-active pill (semibold) */
68+
.nav-menu-item:hover > .nav-menu-link:not(.link--active),
69+
.nav-dropdown:focus-within > .nav-menu-link:not(.link--active) {
70+
@apply text-canyon-clay---links rounded-md bg-white font-normal opacity-100;
71+
}
72+
73+
.nav-menu:not(:has(.nav-menu-item:hover)) .nav-menu-link.link--active,
74+
.nav-menu-item:hover > .nav-menu-link.link--active,
75+
.nav-dropdown:focus-within > .nav-menu-link.link--active {
76+
@apply text-canyon-clay---links rounded-md bg-white font-semibold opacity-100;
77+
}
6678
}
6779

6880
/* Dropdown Styles */

0 commit comments

Comments
 (0)