Skip to content

Commit 16385bf

Browse files
yigitdotclaude
andcommitted
refactor(chrome): drop §0X numbers, solidify backdrop, taller bar
- Drop the §0X number prefix on nav items — the sliding whisper-green underline is a strong enough active affordance on its own, backed by a small label-opacity ramp (0.65 → 0.9 on hover → 1.0 active) so there's still a tonal cue alongside the underline. - Push the scrolled backdrop from 72% → 92% tone-match so content stops bleeding through, and collapse the @supports-not fallback to a fully opaque bar on browsers without backdrop-filter. - Replace the 1px dashed bottom rule with a 1px solid line — reads as a proper navbar edge instead of a decorative panel border. - Raise vertical padding (py-3 → py-5) so the frosted bar has more physical presence now that the backdrop is solid. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 243c02f commit 16385bf

2 files changed

Lines changed: 20 additions & 35 deletions

File tree

‎app/globals.css‎

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ a.underline-brutal:hover .arrow {
687687
background-color: transparent;
688688
backdrop-filter: blur(0) saturate(1);
689689
-webkit-backdrop-filter: blur(0) saturate(1);
690-
border-bottom: 1px dashed transparent;
690+
border-bottom: 1px solid transparent;
691691
transition:
692692
background-color 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
693693
backdrop-filter 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
@@ -699,25 +699,26 @@ a.underline-brutal:hover .arrow {
699699
.chrome-nav[data-scrolled="true"] {
700700
backdrop-filter: blur(14px) saturate(1.1);
701701
-webkit-backdrop-filter: blur(14px) saturate(1.1);
702-
background-color: color-mix(in srgb, var(--paper) 72%, transparent);
703-
border-bottom-color: color-mix(in srgb, var(--ink) 18%, transparent);
702+
background-color: color-mix(in srgb, var(--paper) 92%, transparent);
703+
border-bottom-color: color-mix(in srgb, var(--ink) 24%, transparent);
704704
}
705705

706706
.chrome-nav[data-scrolled="true"][data-tone="ink"] {
707-
background-color: color-mix(in srgb, var(--ink) 72%, transparent);
708-
border-bottom-color: color-mix(in srgb, var(--paper) 20%, transparent);
707+
background-color: color-mix(in srgb, var(--ink) 92%, transparent);
708+
border-bottom-color: color-mix(in srgb, var(--paper) 26%, transparent);
709709
}
710710

711-
/* Safari <17 etc.: if backdrop-filter isn't supported, raise the bg
712-
opacity so text stays legible instead of floating over content. */
711+
/* Safari <17 etc.: if backdrop-filter isn't supported, collapse to a
712+
fully opaque bar so text stays legible instead of floating over
713+
content. */
713714
@supports not (
714715
(backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
715716
) {
716717
.chrome-nav[data-scrolled="true"] {
717-
background-color: color-mix(in srgb, var(--paper) 92%, transparent);
718+
background-color: var(--paper);
718719
}
719720
.chrome-nav[data-scrolled="true"][data-tone="ink"] {
720-
background-color: color-mix(in srgb, var(--ink) 92%, transparent);
721+
background-color: var(--ink);
721722
}
722723
}
723724

@@ -727,30 +728,19 @@ a.underline-brutal:hover .arrow {
727728
position: relative;
728729
display: inline-flex;
729730
align-items: center;
730-
gap: 0.45rem;
731731
padding-bottom: 4px;
732732
color: inherit;
733733
text-decoration: none;
734734
line-height: 1;
735735
}
736736

737-
.nav-item .nav-num,
738737
.nav-item .nav-label {
739738
font-size: 11px;
740739
font-weight: 500;
741740
letter-spacing: 0.2em;
742741
text-transform: uppercase;
743742
line-height: 1;
744-
}
745-
746-
.nav-item .nav-num {
747-
opacity: 0.45;
748-
transition:
749-
opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
750-
color 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
751-
}
752-
753-
.nav-item .nav-label {
743+
opacity: 0.65;
754744
transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
755745
}
756746

@@ -770,21 +760,20 @@ a.underline-brutal:hover .arrow {
770760
}
771761

772762
.nav-item:hover:not([aria-current="true"]) {
773-
--u: 0.35;
763+
--u: 0.4;
774764
}
775765

776-
.nav-item:hover:not([aria-current="true"]) .nav-num {
777-
opacity: 0.75;
766+
.nav-item:hover:not([aria-current="true"]) .nav-label {
767+
opacity: 0.9;
778768
}
779769

780770
.nav-item[aria-current="true"] {
781771
--u: 1;
782772
--u-color: var(--whisper);
783773
}
784774

785-
.nav-item[aria-current="true"] .nav-num {
775+
.nav-item[aria-current="true"] .nav-label {
786776
opacity: 1;
787-
color: var(--whisper);
788777
}
789778

790779
.nav-item:focus-visible {
@@ -795,7 +784,6 @@ a.underline-brutal:hover .arrow {
795784

796785
@media (prefers-reduced-motion: reduce) {
797786
.chrome-nav,
798-
.nav-item .nav-num,
799787
.nav-item .nav-label,
800788
.nav-item .nav-underline {
801789
transition: none;

‎components/site/Chrome.tsx‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { links } from "@/lib/links";
55

66
const SECTION_IDS = ["s-01", "s-02", "s-03", "s-04", "s-05"] as const;
77
const NAV = [
8-
{ id: "s-02", num: "02", label: "compare" },
9-
{ id: "s-03", num: "03", label: "method" },
10-
{ id: "s-04", num: "04", label: "faq" },
11-
{ id: "s-05", num: "05", label: "contact" },
8+
{ id: "s-02", label: "compare" },
9+
{ id: "s-03", label: "method" },
10+
{ id: "s-04", label: "faq" },
11+
{ id: "s-05", label: "contact" },
1212
] as const;
1313

1414
// Ids of sections that paint on a dark background — used to flip the
@@ -80,7 +80,7 @@ export function Chrome() {
8080
aria-label="Primary"
8181
data-scrolled={scrolled ? "true" : undefined}
8282
data-tone={onDark ? "ink" : "paper"}
83-
className={`chrome-nav fixed inset-x-0 top-0 z-50 py-3 ${
83+
className={`chrome-nav fixed inset-x-0 top-0 z-50 py-5 ${
8484
onDark ? "text-[var(--paper)]" : "text-[var(--ink)]"
8585
}`}
8686
style={{ paddingInline: "var(--frame-gutter)" }}
@@ -108,9 +108,6 @@ export function Chrome() {
108108
aria-current={isActive ? "true" : undefined}
109109
className="nav-item"
110110
>
111-
<span className="nav-num" aria-hidden>
112-
§{item.num}
113-
</span>
114111
<span className="nav-label">{item.label}</span>
115112
<span aria-hidden className="nav-underline" />
116113
</a>

0 commit comments

Comments
 (0)