Skip to content

Commit dfd4c35

Browse files
authored
use an svg for the pronunciation guide (sveltejs#505)
1 parent 59fa2e0 commit dfd4c35

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

apps/svelte.dev/src/routes/_home/Testimonials.svelte

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<div class="outer">
22
<p class="definition">
3-
<em>/ˈsvɛlt/</em>
3+
<enhanced:img
4+
class="pronunciation"
5+
alt="Svelte pronunciation guide"
6+
src="./svelte-pronunciation.svg"
7+
/>
8+
49
<span class="description">
510
<span class="adjective"></span> attractively thin, graceful and stylish
611
</span>
@@ -23,18 +28,23 @@
2328
<div class="screenshots">
2429
<a href="https://survey.stackoverflow.co/2024/technology#2-web-frameworks-and-technologies">
2530
<enhanced:img
31+
class="screenshot"
2632
alt="Stack Overflow 2024 Developer Survey"
2733
src="./stack-overflow.png?w=1200,1600"
2834
></enhanced:img>
2935
</a>
3036

3137
<a href="https://2023.stateofjs.com/en-US/libraries/front-end-frameworks/">
32-
<enhanced:img alt="State of JavaScript 2023" src="./state-of-js-chart.png?w=1000,1400"
38+
<enhanced:img
39+
class="screenshot"
40+
alt="State of JavaScript 2023"
41+
src="./state-of-js-chart.png?w=1000,1400"
3342
></enhanced:img>
3443
</a>
3544

3645
<a href="https://x.com/flaviocopes/status/1730895911864189299">
37-
<enhanced:img alt="Tweet from @flaviocopes" src="./flavio-light.png?w=800"></enhanced:img>
46+
<enhanced:img class="screenshot" alt="Tweet from @flaviocopes" src="./flavio-light.png?w=800"
47+
></enhanced:img>
3848
</a>
3949
</div>
4050
</div>
@@ -57,6 +67,13 @@
5767
grid-area: definition;
5868
}
5969
70+
.pronunciation {
71+
position: relative;
72+
aspect-ratio: 457.4 / 138.8;
73+
height: var(--sk-font-size-h1);
74+
bottom: -0.3em;
75+
}
76+
6077
.blurb {
6178
grid-area: blurb;
6279
}
@@ -104,7 +121,7 @@
104121
}
105122
}
106123
107-
img {
124+
.screenshot {
108125
width: 100%;
109126
height: auto;
110127
object-fit: contain;
@@ -128,14 +145,6 @@
128145
129146
width: 100%;
130147
131-
em {
132-
font-style: normal;
133-
font-size: var(--sk-font-size-h1);
134-
color: var(--sk-theme-1);
135-
text-wrap: nowrap;
136-
line-height: 1;
137-
}
138-
139148
.description {
140149
position: relative;
141150
font: var(--sk-font-ui-medium);
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)