Skip to content

Commit 2614cd9

Browse files
authored
Tidy up a few CSS details (#222)
* remove playfair display * only load yantramanav 400 * tweak * tweaks * smart quotes everywhere * tidy up blog pages a little bit * more * banish --sk-theme-3 * tidy up
1 parent 12ea1d6 commit 2614cd9

File tree

20 files changed

+91
-120
lines changed

20 files changed

+91
-120
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,5 @@
246246
.video-player input:focus-visible ~ img {
247247
outline: 2px solid var(--sk-theme-1);
248248
outline-offset: 2px;
249-
border-radius: var(--sk-border-radius);
250249
}
251250
</style>

apps/svelte.dev/src/routes/blog/+page.svelte

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{#each data.posts as post}
2222
{#if !post.metadata.draft}
2323
<article class="post" data-pubdate={post.date}>
24-
<a class="no-underline" href="/{post.slug}" title="Read the article »">
24+
<a href="/{post.slug}" title="Read the article »">
2525
<h2>{post.metadata.title}</h2>
2626
<p>{post.metadata.description}</p>
2727
</a>
@@ -42,51 +42,53 @@
4242
4343
h2 {
4444
display: inline-block;
45-
margin: 3.2rem 0 0.4rem 0;
45+
/* margin: 3.2rem 0 0.4rem 0; */
4646
color: var(--sk-text-2);
4747
max-width: 18em;
4848
font-size: var(--sk-text-m);
4949
font-weight: 400;
5050
}
5151
52-
.post:first-child {
53-
margin: 0 0 2rem 0;
54-
padding: 0 0 4rem 0;
55-
border-bottom: var(--sk-thick-border-width) solid #6767785b; /* based on --second */
56-
}
52+
.post {
53+
margin: 2em 0;
5754
58-
.post:first-child h2 {
59-
font-size: 4rem;
60-
font-weight: 400;
61-
color: var(--sk-text-2);
62-
}
55+
&:where(:first-child, :nth-child(2))::before {
56+
content: 'Latest post • ' attr(data-pubdate);
57+
color: var(--sk-text-4);
58+
font-family: var(--sk-font-ui);
59+
font-size: var(--sk-text-xs);
60+
font-weight: 400;
61+
text-transform: uppercase;
62+
}
6363
64-
.post:where(:first-child, :nth-child(2))::before {
65-
content: 'Latest post • ' attr(data-pubdate);
66-
color: var(--sk-theme-3);
67-
font-family: var(--sk-font-heading);
68-
font-size: var(--sk-text-xs);
69-
font-weight: 400;
70-
letter-spacing: 0.05em;
71-
text-transform: uppercase;
72-
}
64+
&:nth-child(2)::before {
65+
content: 'Older posts';
66+
}
7367
74-
.post:nth-child(2)::before {
75-
content: 'Older posts';
76-
}
68+
&:first-child {
69+
margin: 0 0 2rem 0;
70+
padding: 0 0 4rem 0;
7771
78-
.post p {
79-
font-size: var(--sk-text-s);
80-
max-width: 30em;
81-
color: var(--sk-text-3);
82-
}
72+
h2 {
73+
font-size: 4rem;
74+
font-weight: 400;
75+
color: var(--sk-text-2);
76+
}
77+
}
8378
84-
.post > a {
85-
display: block;
86-
}
79+
a {
80+
display: block;
81+
text-decoration: none;
82+
83+
&:hover h2 {
84+
text-decoration: underline;
85+
}
86+
}
8787
88-
.posts a:hover,
89-
.posts a:hover > h2 {
90-
color: var(--sk-theme-3);
88+
p {
89+
font-size: var(--sk-text-s);
90+
color: var(--sk-text-3);
91+
margin: 0;
92+
}
9193
}
9294
</style>

apps/svelte.dev/src/routes/blog/[slug]/+page.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@
6262
}
6363
6464
.byline {
65-
margin: 0 0 1rem 0;
66-
padding: 1.6rem 0 0 0;
67-
border-top: var(--sk-thick-border-width) solid #6767785b;
65+
margin: 0 0 4rem 0;
66+
padding: 1rem 0 0 0;
67+
font-family: var(--sk-font-ui);
6868
font-size: var(--sk-text-xs);
6969
text-transform: uppercase;
7070
}
@@ -78,7 +78,7 @@
7878
}
7979
8080
.post :global(figcaption) {
81-
color: var(--sk-theme-2);
81+
color: var(--sk-text-4);
8282
text-align: left;
8383
}
8484
@@ -90,7 +90,7 @@
9090
float: right;
9191
margin: 0 0 1em 1em;
9292
width: 16rem;
93-
color: var(--sk-theme-2);
93+
color: var(--sk-text-4);
9494
z-index: 2;
9595
}
9696
@@ -103,7 +103,7 @@
103103
height: 420px;
104104
margin: 2em 0;
105105
border-radius: var(--sk-border-radius);
106-
border: 0.8rem solid var(--sk-theme-2);
106+
border: 0.8rem solid var(--sk-theme-4);
107107
}
108108
109109
@media (min-width: 910px) {

apps/svelte.dev/src/routes/tutorial/[slug]/Chrome.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777
a:focus-visible,
7878
button:focus-visible,
7979
input:focus-visible {
80-
outline: none;
81-
border: 2px solid var(--sk-theme-3);
80+
outline-offset: -2px;
8281
}
8382
8483
.icon,

apps/svelte.dev/src/routes/tutorial/[slug]/Menu.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@
378378
379379
li button {
380380
position: relative;
381-
382381
display: flex;
382+
width: 100%;
383383
gap: 0.5rem;
384384
}
385385
@@ -403,8 +403,7 @@
403403
404404
a:focus-visible,
405405
.exercises button:focus-visible {
406-
outline: none;
407-
border: 2px solid var(--sk-theme-3);
406+
outline-offset: -2px;
408407
}
409408
410409
@media screen and (max-width: 800px) {

apps/svelte.dev/src/routes/tutorial/[slug]/ToggleButton.svelte

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939
border: transparent;
4040
}
4141
42-
button:focus-visible {
43-
outline: 2px solid var(--sk-theme-3);
44-
}
45-
4642
button::before {
4743
content: '';
4844
position: absolute;

apps/svelte.dev/src/routes/tutorial/[slug]/codemirror.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@
5757
color: var(--sk-text-2);
5858
}
5959

60-
.cm-editor.cm-focused .cm-selectionBackground,
61-
.cm-editor .cm-selectionBackground,
62-
.cm-editor .cm-content ::selection {
63-
background: var(--sk-theme-3);
64-
opacity: 0.3;
65-
}
66-
6760
.cm-editor .cm-tooltip {
6861
background: var(--sk-back-2);
6962
color: var(--sk-text-1);

apps/svelte.dev/src/routes/tutorial/[slug]/filetree/Item.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,7 @@
124124
}
125125
126126
:focus-visible {
127-
outline: none;
128-
border: 2px solid var(--sk-theme-3) !important;
129-
border-radius: 2px;
127+
outline-offset: -2px;
130128
}
131129
132130
input {

packages/site-kit/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"@fontsource/dm-serif-display": "^5.1.0",
2626
"@fontsource/eb-garamond": "^5.1.0",
2727
"@fontsource/fira-mono": "^5.1.0",
28-
"@fontsource/playfair-display": "^5.1.0",
2928
"@fontsource/yantramanav": "^5.1.0",
3029
"esm-env": "^1.0.0",
3130
"json5": "^2.2.3",

packages/site-kit/src/lib/components/Text.svelte

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
align-items: center;
145145
height: calc(var(--height) - 0.6rem);
146146
outline-offset: 0;
147-
border-radius: var(--sk-border-radius);
148147
padding: 0 0.4rem;
149148
150149
&::before,
@@ -343,12 +342,12 @@
343342
li::before {
344343
content: '';
345344
position: absolute;
346-
margin-top: 0.8rem;
347-
margin-left: -1.8rem;
345+
top: 1.4rem;
346+
left: -1.8rem;
348347
background-color: var(--sk-back-5);
349348
width: 0.6rem;
350349
height: 0.6rem;
351-
border-radius: 2px;
350+
border-radius: 50%;
352351
opacity: 0.7;
353352
}
354353
@@ -364,7 +363,6 @@
364363
li {
365364
position: relative;
366365
max-width: calc(var(--sk-line-max-width) - var(--list-padding));
367-
line-height: 1.5;
368366
margin: 0 0 0.5em 0;
369367
}
370368

0 commit comments

Comments
 (0)