Skip to content

Commit bab45cf

Browse files
committed
fix: refine project section responsiveness
1 parent aa76bb3 commit bab45cf

3 files changed

Lines changed: 26 additions & 18 deletions

File tree

src/routes/+page.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@
213213
class="project-panel project-keyboard mt-[clamp(7rem,13vw,14rem)] grid grid-cols-[minmax(20rem,0.75fr)_minmax(25rem,1.25fr)] items-center gap-[clamp(3rem,7vw,8rem)] max-md:grid-cols-1"
214214
>
215215
<div class="project-console keyboard-console max-md:order-2">
216-
<h3 class="project-title">Keyboard²</h3>
216+
<h3 class="project-title project-title-keyboard" aria-label="Keyboard squared">
217+
Keyboard<span class="keyboard-square" aria-hidden="true">2</span>
218+
</h3>
217219
<p class="mt-7 mb-4 text-[clamp(1.15rem,1.7vw,1.45rem)] leading-snug font-semibold">
218220
A velocity-sensitive MIDI instrument disguised as a full-size beige computer keyboard.
219221
</p>

src/routes/layout.css

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@
4646

4747
html {
4848
scroll-behavior: smooth;
49+
overflow-x: clip;
4950
background: var(--void);
5051
}
5152

5253
body {
5354
margin: 0;
5455
min-width: 320px;
56+
overflow-x: clip;
5557
background:
5658
radial-gradient(circle at 13% 16%, rgba(110, 220, 242, 0.07) 0 1px, transparent 1.5px),
5759
radial-gradient(circle at 84% 29%, rgba(125, 204, 189, 0.08) 0 1px, transparent 1.5px),
@@ -131,10 +133,28 @@ a {
131133
font-weight: 800;
132134
line-height: 0.9;
133135
letter-spacing: -0.055em;
136+
white-space: nowrap;
134137
}
135138

136139
.project-title-long {
137-
font-size: clamp(2.5rem, 5vw, 5rem);
140+
font-size: clamp(2.1rem, 4vw, 4rem);
141+
}
142+
143+
.project-title-keyboard {
144+
font-size: clamp(2.5rem, 4.3vw, 4.5rem);
145+
}
146+
147+
.keyboard-square {
148+
display: inline-block;
149+
margin-left: 0.22em;
150+
color: var(--magenta);
151+
font-family: var(--font-display);
152+
font-size: 0.46em;
153+
font-style: normal;
154+
font-weight: 900;
155+
line-height: 1;
156+
transform: translateY(-0.95em);
157+
-webkit-text-fill-color: var(--magenta);
138158
}
139159

140160
.text-link,
@@ -315,21 +335,6 @@ a {
315335
clip-path: polygon(0 3rem, 100% 0, 100% calc(100% - 3rem), 0 100%);
316336
}
317337

318-
.projects-section::before {
319-
position: absolute;
320-
z-index: -2;
321-
inset: 0 -2rem;
322-
border-inline: 1px solid rgba(125, 204, 189, 0.12);
323-
background: linear-gradient(
324-
90deg,
325-
rgba(110, 220, 242, 0.025),
326-
transparent 38%,
327-
transparent 62%,
328-
rgba(197, 30, 138, 0.025)
329-
);
330-
content: '';
331-
}
332-
333338
.project-panel {
334339
position: relative;
335340
}

src/routes/projects/keyboard-keyboard/+page.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
class="mx-auto min-h-screen w-[calc(100%-2*var(--page-gutter))] max-w-[90rem] py-[clamp(4rem,10vw,10rem)]"
1111
>
1212
<h1
13+
aria-label="Keyboard squared"
1314
class="font-display text-[clamp(3rem,8vw,7rem)] leading-[0.9] font-extrabold tracking-[-0.05em] uppercase italic"
1415
>
15-
Keyboard²
16+
Keyboard<span class="keyboard-square" aria-hidden="true">2</span>
1617
</h1>
1718
<p class="mt-8 max-w-3xl text-[clamp(1.1rem,1.7vw,1.45rem)] leading-relaxed">
1819
A velocity-sensitive MIDI instrument disguised as a full-size beige computer keyboard.

0 commit comments

Comments
 (0)