Skip to content

Commit 4d4f4f9

Browse files
committed
style: use Tailwind v4 CSS-variable shorthand
- Replace [var(--x)] arbitrary values with the v4 (--x) shorthand across all components, resolving the linter suggestions. - Literal arbitrary values (hex colors, rem sizes) and the raw CSS variables in globals.css are unchanged.
1 parent 72ebc3c commit 4d4f4f9

9 files changed

Lines changed: 95 additions & 106 deletions

File tree

web/app/docs/page.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ export default function DocsIndex() {
1818
<main>
1919
<p className="eyebrow mb-3">documentation</p>
2020
<h1 className="mb-4 text-4xl">Concepts &amp; guides</h1>
21-
<p className="mb-8 max-w-2xl leading-relaxed text-[var(--muted)]">
21+
<p className="mb-8 max-w-2xl leading-relaxed text-(--muted)">
2222
Everything you need to run siphon in anger — from your first backup to continuous
2323
cross-engine replication. These pages render the same Markdown that ships in the repository,
2424
so they track the latest source.
2525
</p>
2626

2727
{/* Quick start: get someone to a working install without leaving the
2828
Overview, then point them at the first guide. */}
29-
<div className="mb-12 rounded-xl border border-[var(--line)] bg-[var(--ink-2)] p-6">
29+
<div className="mb-12 rounded-xl border border-(--line) bg-(--ink-2) p-6">
3030
<p className="eyebrow mb-3">quick start</p>
31-
<p className="mb-4 max-w-xl text-sm leading-relaxed text-[var(--muted)]">
31+
<p className="mb-4 max-w-xl text-sm leading-relaxed text-(--muted)">
3232
Install the binary, then head to{" "}
33-
<Link href="/docs/getting-started" className="text-[var(--flow)]">
33+
<Link href="/docs/getting-started" className="text-(--flow)">
3434
Getting started
3535
</Link>{" "}
3636
for your first backup and sync.
@@ -53,31 +53,31 @@ export default function DocsIndex() {
5353
<Link
5454
key={d.slug}
5555
href={`/docs/${d.slug}`}
56-
className="group block rounded-xl border border-[var(--line)] bg-[var(--ink-2)]/40 p-5 no-underline transition-colors hover:border-[var(--flow)] hover:bg-[var(--ink-2)] hover:no-underline"
56+
className="group block rounded-xl border border-(--line) bg-(--ink-2)/40 p-5 no-underline transition-colors hover:border-(--flow) hover:bg-(--ink-2) hover:no-underline"
5757
>
58-
<span className="flex items-center gap-2 text-lg font-semibold text-[var(--paper)]">
58+
<span className="flex items-center gap-2 text-lg font-semibold text-(--paper)">
5959
{d.title}
60-
<span className="text-[var(--flow)] opacity-0 transition-all group-hover:translate-x-0.5 group-hover:opacity-100">
60+
<span className="text-(--flow) opacity-0 transition-all group-hover:translate-x-0.5 group-hover:opacity-100">
6161
6262
</span>
6363
</span>
64-
<p className="mt-1.5 text-sm leading-relaxed text-[var(--muted)]">{d.blurb}</p>
64+
<p className="mt-1.5 text-sm leading-relaxed text-(--muted)">{d.blurb}</p>
6565
</Link>
6666
))}
6767
</div>
6868
</section>
6969
);
7070
})}
7171

72-
<div className="mt-12 flex flex-col gap-3 border-t border-[var(--line)] pt-8 text-sm text-[var(--muted)] sm:flex-row sm:items-center sm:justify-between">
72+
<div className="mt-12 flex flex-col gap-3 border-t border-(--line) pt-8 text-sm text-(--muted) sm:flex-row sm:items-center sm:justify-between">
7373
<span>
7474
Found a gap or a bug?{" "}
75-
<ExtLink href={`${REPO_URL}/issues`} className="text-[var(--flow)]">
75+
<ExtLink href={`${REPO_URL}/issues`} className="text-(--flow)">
7676
Open an issue
7777
</ExtLink>
7878
.
7979
</span>
80-
<ExtLink href={REPO_URL} className="text-[var(--flow)]">
80+
<ExtLink href={REPO_URL} className="text-(--flow)">
8181
Browse the source ↗
8282
</ExtLink>
8383
</div>

web/app/page.tsx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default function Home() {
8585
>
8686
Sync any database,
8787
<br />
88-
<span className="bg-gradient-to-r from-[var(--flow)] to-[var(--flow-2)] bg-clip-text text-transparent">
88+
<span className="bg-gradient-to-r from-(--flow) to-(--flow-2) bg-clip-text text-transparent">
8989
anywhere.
9090
</span>
9191
</h1>
@@ -94,8 +94,8 @@ export default function Home() {
9494
style={{ "--rise-delay": "160ms" } as React.CSSProperties}
9595
>
9696
One binary that turns the painful sprawl of{" "}
97-
<code className="mono text-sm text-[var(--flow)]">pg_dump → pg_restore</code> shell
98-
scripts into a guided, observable workflow — across PostgreSQL, MySQL, and MariaDB.
97+
<code className="mono text-sm text-(--flow)">pg_dump → pg_restore</code> shell scripts
98+
into a guided, observable workflow — across PostgreSQL, MySQL, and MariaDB.
9999
</p>
100100
<div className="rise mt-8" style={{ "--rise-delay": "240ms" } as React.CSSProperties}>
101101
<HeroInstall />
@@ -106,13 +106,13 @@ export default function Home() {
106106
>
107107
<Link
108108
href="/docs"
109-
className="rounded-lg bg-[var(--flow)] px-5 py-3 font-medium text-[var(--ink)] no-underline transition-opacity hover:no-underline hover:opacity-90"
109+
className="rounded-lg bg-(--flow) px-5 py-3 font-medium text-(--ink) no-underline transition-opacity hover:no-underline hover:opacity-90"
110110
>
111111
Read the docs
112112
</Link>
113113
<ExtLink
114114
href={REPO_URL}
115-
className="rounded-lg border border-[var(--line)] px-5 py-3 font-medium text-[var(--paper)] no-underline transition-colors hover:border-[var(--flow)] hover:no-underline"
115+
className="rounded-lg border border-(--line) px-5 py-3 font-medium text-(--paper) no-underline transition-colors hover:border-(--flow) hover:no-underline"
116116
>
117117
View source ↗
118118
</ExtLink>
@@ -128,15 +128,15 @@ export default function Home() {
128128
<section className="mx-auto max-w-6xl px-6 py-12">
129129
<p className="eyebrow mb-3">how it flows</p>
130130
<h2 className="mb-10 max-w-2xl text-3xl">Three verbs, one conduit</h2>
131-
<div className="grid gap-px overflow-hidden rounded-xl border border-[var(--line)] bg-[var(--line)] md:grid-cols-3">
131+
<div className="grid gap-px overflow-hidden rounded-xl border border-(--line) bg-(--line) md:grid-cols-3">
132132
{FLOW.map((s, i) => (
133-
<Reveal key={s.n} delay={i * 90} className="bg-[var(--ink)]">
133+
<Reveal key={s.n} delay={i * 90} className="bg-(--ink)">
134134
<article className="flex h-full flex-col p-6">
135-
<span className="mono text-3xl font-bold text-[var(--flow)]">{s.n}</span>
135+
<span className="mono text-3xl font-bold text-(--flow)">{s.n}</span>
136136
<h3 className="mt-4 text-xl">{s.title}</h3>
137-
<p className="mt-2 flex-1 text-sm leading-relaxed text-[var(--muted)]">{s.body}</p>
138-
<code className="mt-4 block rounded-md border border-[var(--line)] bg-[#0a111e] px-3 py-2 font-mono text-xs text-[var(--paper)]">
139-
<span className="text-[var(--amber)]">$ </span>
137+
<p className="mt-2 flex-1 text-sm leading-relaxed text-(--muted)">{s.body}</p>
138+
<code className="mt-4 block rounded-md border border-(--line) bg-[#0a111e] px-3 py-2 font-mono text-xs text-(--paper)">
139+
<span className="text-(--amber)">$ </span>
140140
{s.cmd}
141141
</code>
142142
</article>
@@ -151,13 +151,13 @@ export default function Home() {
151151
<p className="eyebrow mb-10">what it does</p>
152152
<div className="flex gap-8">
153153
<div className="flowline hidden shrink-0 sm:block" aria-hidden />
154-
<div className="grid gap-px overflow-hidden rounded-xl border border-[var(--line)] bg-[var(--line)] sm:grid-cols-2">
154+
<div className="grid gap-px overflow-hidden rounded-xl border border-(--line) bg-(--line) sm:grid-cols-2">
155155
{FEATURES.map((f, i) => (
156-
<Reveal key={f.label} delay={(i % 2) * 90} className="bg-[var(--ink)]">
156+
<Reveal key={f.label} delay={(i % 2) * 90} className="bg-(--ink)">
157157
<article className="p-6">
158158
<p className="eyebrow mb-3">{f.label}</p>
159159
<h3 className="mb-2 text-xl">{f.title}</h3>
160-
<p className="text-sm leading-relaxed text-[var(--muted)]">{f.body}</p>
160+
<p className="text-sm leading-relaxed text-(--muted)">{f.body}</p>
161161
</article>
162162
</Reveal>
163163
))}
@@ -167,10 +167,10 @@ export default function Home() {
167167

168168
{/* Engines strip: the three databases siphon speaks, stated once. */}
169169
<section className="mx-auto max-w-6xl px-6 py-12">
170-
<div className="flex flex-col items-start justify-between gap-6 rounded-xl border border-[var(--line)] bg-[var(--ink-2)] p-8 sm:flex-row sm:items-center">
170+
<div className="flex flex-col items-start justify-between gap-6 rounded-xl border border-(--line) bg-(--ink-2) p-8 sm:flex-row sm:items-center">
171171
<div>
172172
<p className="eyebrow mb-2">speaks natively</p>
173-
<p className="max-w-md text-sm leading-relaxed text-[var(--muted)]">
173+
<p className="max-w-md text-sm leading-relaxed text-(--muted)">
174174
First-class drivers for each engine — same commands, engine-aware quoting, types, and
175175
change capture under the hood.
176176
</p>
@@ -179,7 +179,7 @@ export default function Home() {
179179
{ENGINES.map((e) => (
180180
<span
181181
key={e}
182-
className="rounded-full border border-[var(--line)] bg-[var(--ink)] px-4 py-2 font-mono text-sm text-[var(--flow)]"
182+
className="rounded-full border border-(--line) bg-(--ink) px-4 py-2 font-mono text-sm text-(--flow)"
183183
>
184184
{e}
185185
</span>
@@ -194,29 +194,29 @@ export default function Home() {
194194
<h2 className="mb-8 text-3xl">Up and running in one line</h2>
195195
<div className="space-y-6">
196196
<div>
197-
<p className="mb-2 font-mono text-xs tracking-widest text-[var(--muted)] uppercase">
197+
<p className="mb-2 font-mono text-xs tracking-widest text-(--muted) uppercase">
198198
Linux · macOS
199199
</p>
200200
<InstallCommand command={INSTALL_CMD} />
201201
</div>
202202
<div className="grid gap-6 sm:grid-cols-2">
203203
<div>
204-
<p className="mb-2 font-mono text-xs tracking-widest text-[var(--muted)] uppercase">
204+
<p className="mb-2 font-mono text-xs tracking-widest text-(--muted) uppercase">
205205
Homebrew
206206
</p>
207207
<InstallCommand command="brew install nixrajput/siphon/siphon" />
208208
</div>
209209
<div>
210-
<p className="mb-2 font-mono text-xs tracking-widest text-[var(--muted)] uppercase">
210+
<p className="mb-2 font-mono text-xs tracking-widest text-(--muted) uppercase">
211211
Scoop (Windows)
212212
</p>
213213
<InstallCommand command="scoop install siphon" />
214214
</div>
215215
</div>
216-
<p className="text-sm text-[var(--muted)]">
217-
Prefer source? <code className="mono text-[var(--flow)]">go install</code> the module,
218-
or grab a prebuilt binary from <ExtLink href={`${REPO_URL}/releases`}>Releases</ExtLink>
219-
. Every archive has a SHA-256 checksum, and the checksum file is cosign-signed.
216+
<p className="text-sm text-(--muted)">
217+
Prefer source? <code className="mono text-(--flow)">go install</code> the module, or
218+
grab a prebuilt binary from <ExtLink href={`${REPO_URL}/releases`}>Releases</ExtLink>.
219+
Every archive has a SHA-256 checksum, and the checksum file is cosign-signed.
220220
</p>
221221
</div>
222222
</section>

web/components/DeveloperSection.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ export function DeveloperSection() {
3131
Made by{" "}
3232
<ExtLink
3333
href={DEVELOPER.portfolio}
34-
className="bg-gradient-to-r from-[var(--flow)] to-[var(--flow-2)] bg-clip-text text-transparent hover:no-underline"
34+
className="bg-gradient-to-r from-(--flow) to-(--flow-2) bg-clip-text text-transparent hover:no-underline"
3535
>
3636
{DEVELOPER.name}
3737
</ExtLink>
3838
</h2>
39-
<p className="mt-4 max-w-md leading-relaxed text-[var(--muted)]">
39+
<p className="mt-4 max-w-md leading-relaxed text-(--muted)">
4040
Open-source engineer working across databases, CLIs, and developer tooling. siphon is
4141
one of several projects — the rest live on GitHub.
4242
</p>
4343
<div className="mt-6">
4444
<ExtLink
4545
href={DEVELOPER.github}
46-
className="inline-flex rounded-lg border border-[var(--line)] px-4 py-2 text-sm text-[var(--paper)] no-underline transition-colors hover:border-[var(--flow)] hover:no-underline"
46+
className="inline-flex rounded-lg border border-(--line) px-4 py-2 text-sm text-(--paper) no-underline transition-colors hover:border-(--flow) hover:no-underline"
4747
>
4848
View @{DEVELOPER.handle} on GitHub ↗
4949
</ExtLink>
@@ -56,7 +56,7 @@ export function DeveloperSection() {
5656
{STAT_LABELS.map((label) => (
5757
<div key={label}>
5858
<Skeleton className="h-7 w-14" />
59-
<div className="mt-1 text-xs tracking-widest text-[var(--muted)] uppercase">
59+
<div className="mt-1 text-xs tracking-widest text-(--muted) uppercase">
6060
{label}
6161
</div>
6262
</div>
@@ -67,10 +67,10 @@ export function DeveloperSection() {
6767
<div className="mt-8 flex gap-8">
6868
{tiles.map((t) => (
6969
<div key={t.label}>
70-
<div className="font-mono text-2xl font-bold text-[var(--paper)] tabular-nums">
70+
<div className="font-mono text-2xl font-bold text-(--paper) tabular-nums">
7171
{t.value.toLocaleString()}
7272
</div>
73-
<div className="mt-1 text-xs tracking-widest text-[var(--muted)] uppercase">
73+
<div className="mt-1 text-xs tracking-widest text-(--muted) uppercase">
7474
{t.label}
7575
</div>
7676
</div>
@@ -85,12 +85,12 @@ export function DeveloperSection() {
8585
alone. */}
8686
{loading ? (
8787
<div>
88-
<p className="mb-3 font-mono text-xs tracking-widest text-[var(--muted)] uppercase">
88+
<p className="mb-3 font-mono text-xs tracking-widest text-(--muted) uppercase">
8989
Top repositories
9090
</p>
91-
<div className="grid gap-px overflow-hidden rounded-xl border border-[var(--line)] bg-[var(--line)] sm:grid-cols-2">
91+
<div className="grid gap-px overflow-hidden rounded-xl border border-(--line) bg-(--line) sm:grid-cols-2">
9292
{[0, 1, 2, 3].map((i) => (
93-
<div key={i} className="bg-[var(--ink)] p-4">
93+
<div key={i} className="bg-(--ink) p-4">
9494
<div className="flex items-center justify-between gap-2">
9595
<Skeleton className="h-4 w-32" />
9696
<Skeleton className="h-3 w-8" />
@@ -104,26 +104,26 @@ export function DeveloperSection() {
104104
) : (
105105
topRepos.length > 0 && (
106106
<div>
107-
<p className="mb-3 font-mono text-xs tracking-widest text-[var(--muted)] uppercase">
107+
<p className="mb-3 font-mono text-xs tracking-widest text-(--muted) uppercase">
108108
Top repositories
109109
</p>
110-
<div className="grid gap-px overflow-hidden rounded-xl border border-[var(--line)] bg-[var(--line)] sm:grid-cols-2">
110+
<div className="grid gap-px overflow-hidden rounded-xl border border-(--line) bg-(--line) sm:grid-cols-2">
111111
{topRepos.map((r) => (
112112
<ExtLink
113113
key={r.name}
114114
href={r.url}
115-
className="block bg-[var(--ink)] p-4 no-underline transition-colors hover:bg-[var(--ink-2)] hover:no-underline"
115+
className="block bg-(--ink) p-4 no-underline transition-colors hover:bg-(--ink-2) hover:no-underline"
116116
>
117117
<div className="flex items-center justify-between gap-2">
118-
<span className="truncate font-mono text-sm font-semibold text-[var(--paper)]">
118+
<span className="truncate font-mono text-sm font-semibold text-(--paper)">
119119
{GH_OWNER}/{r.name}
120120
</span>
121-
<span className="shrink-0 font-mono text-xs text-[var(--amber)]">
121+
<span className="shrink-0 font-mono text-xs text-(--amber)">
122122
{r.stars.toLocaleString()}
123123
</span>
124124
</div>
125125
{r.description && (
126-
<p className="mt-2 line-clamp-2 text-xs leading-relaxed text-[var(--muted)]">
126+
<p className="mt-2 line-clamp-2 text-xs leading-relaxed text-(--muted)">
127127
{r.description}
128128
</p>
129129
)}

web/components/DocsNavLink.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export function DocsNavLink({
2323
<Link
2424
href={href}
2525
aria-current={active ? "page" : undefined}
26-
className={`block rounded px-2 py-1 text-sm no-underline transition-colors hover:bg-[var(--ink-2)] hover:text-[var(--paper)] hover:no-underline ${
26+
className={`block rounded px-2 py-1 text-sm no-underline transition-colors hover:bg-(--ink-2) hover:text-(--paper) hover:no-underline ${
2727
active
28-
? "border-l-2 border-[var(--flow)] bg-[var(--ink-2)] pl-2.5 font-medium text-[var(--paper)]"
29-
: "text-[var(--muted)]"
28+
? "border-l-2 border-(--flow) bg-(--ink-2) pl-2.5 font-medium text-(--paper)"
29+
: "text-(--muted)"
3030
}`}
3131
>
3232
{children}

web/components/HeroInstall.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ export function HeroInstall() {
1515

1616
return (
1717
<div>
18-
<div className="mb-3 flex flex-wrap items-center gap-x-4 gap-y-1 font-mono text-xs text-[var(--muted)]">
18+
<div className="mb-3 flex flex-wrap items-center gap-x-4 gap-y-1 font-mono text-xs text-(--muted)">
1919
<ExtLink
2020
href={`${REPO_URL}/releases`}
21-
className="inline-flex items-center gap-2 no-underline hover:text-[var(--paper)]"
21+
className="inline-flex items-center gap-2 no-underline hover:text-(--paper)"
2222
>
23-
<span className="pulse-dot h-1.5 w-1.5 rounded-full bg-[var(--flow)]" aria-hidden />
23+
<span className="pulse-dot h-1.5 w-1.5 rounded-full bg-(--flow)" aria-hidden />
2424
{/* Show the real tag + "latest release" once one exists; until then show
2525
neutral "unreleased" rather than claiming a version that isn't out. */}
26-
<span className="text-[var(--flow)]">{version ?? "unreleased"}</span>
26+
<span className="text-(--flow)">{version ?? "unreleased"}</span>
2727
{version && <span>latest release</span>}
2828
</ExtLink>
2929
{/* Star count is genuinely unknown until the fetch lands: shimmer while
@@ -33,7 +33,7 @@ export function HeroInstall() {
3333
) : (
3434
stars !== null &&
3535
stars > 0 && (
36-
<ExtLink href={REPO_URL} className="no-underline hover:text-[var(--paper)]">
36+
<ExtLink href={REPO_URL} className="no-underline hover:text-(--paper)">
3737
{stars.toLocaleString()} on GitHub
3838
</ExtLink>
3939
)

0 commit comments

Comments
 (0)