Skip to content

Commit 842da22

Browse files
authored
Color redesign (#11)
Before: ![image](https://github.com/user-attachments/assets/6ed01dc0-a146-4dfb-9bb9-d728ea440324) After: ![image](https://github.com/user-attachments/assets/615713c9-2fbb-4092-a8c7-f16b3cbb7aa8) Mobile support is still iffy, but it has improved somewhat!
1 parent e7732cc commit 842da22

5 files changed

Lines changed: 71 additions & 27 deletions

File tree

src/lib/Callout.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@
1919
</div>
2020

2121
<style>
22-
/* TODO */
22+
.callout {
23+
background-color: var(--sand-darker);
24+
box-shadow: 0.5em 0.5em 0 var(--turquoise-darker);
25+
padding: 1em 1em;
26+
}
2327
</style>

src/routes/+layout.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,9 @@
4242
grid-template-columns: 1fr !important;
4343
}
4444
}
45+
46+
/* Prevent elements that cannot wrap from stealing screen space from the nav bar. */
47+
.container main {
48+
max-width: 40em;
49+
}
4550
</style>

src/styles/main.css

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,43 @@
11
/* Site-wide styles. */
22
:global {
33
body {
4-
background-color: var(--background-color);
5-
color: var(--text-color);
4+
/* Fallback color for parts that the gradient does not cover. */
5+
background-color: var(--turquoise-dark);
6+
7+
/* Background gradient */
8+
background-image: var(--background);
9+
background-repeat: no-repeat;
10+
background-attachment: fixed;
11+
12+
/* Text */
13+
color: var(--floral-lighter);
14+
font-size: 13pt;
615
font-family: var(--font-family);
716
line-height: var(--line-height);
817
}
918

1019
h1,
1120
h2,
1221
strong {
13-
color: var(--text-color-strong);
22+
color: var(--sand-light);
23+
font-weight: bold;
24+
}
25+
26+
h1, h2, h3 {
27+
text-shadow: 0.1em 0.1em 0 var(--turquoise-darker);
1428
}
1529

1630
a {
17-
color: var(--primary);
18-
transition: color var(--transition-delay);
31+
color: var(--sand-lighter);
32+
transition: color 200ms;
1933
}
2034

2135
a:hover {
22-
color: var(--primary-hover);
36+
color: var(--turquoise-light);
37+
}
38+
39+
pre {
40+
max-width: 40em;
41+
overflow-x: scroll;
2342
}
2443
}

src/styles/syntax.css

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
1-
/* Prism syntax highlighting theme. */
1+
/*
2+
Prism syntax highlighting theme.
3+
4+
Based on <https://prismjs.com/tokens>.
5+
*/
26
:global {
3-
.token.comment {
4-
color: #a7a7a7;
5-
}
7+
.token {
8+
&.keyword {
9+
color: var(--sand-light);
10+
}
611

7-
.token.constant {
8-
color: #80f880;
9-
}
12+
&.string,
13+
&.char,
14+
&.number,
15+
&.boolean {
16+
color: var(--sand-lighter);
17+
}
18+
19+
&.comment,
20+
&.punctuation {
21+
color: var(--floral-light);
22+
}
1023

11-
.token.keyword {
12-
color: #0c5;
24+
&.attribute {
25+
color: var(--turquoise-light);
26+
}
1327
}
1428
}

src/styles/vars.css

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
/* Global site variables. */
22
:global {
33
:root {
4-
--primary: #0c5;
5-
--primary-hover: #00a344;
4+
/* Colors */
5+
--sand-lighter: lab(90 21 35);
6+
--sand-light: lab(80 21 35);
7+
--sand-dark: lab(60 26 43);
8+
--sand-darker: lab(40 26 43);
69

7-
--background-color: #383a39;
10+
--turquoise-light: lab(80 -25 10);
11+
--turquoise-dark: lab(29 -16 1);
12+
--turquoise-darker: lab(15 -16 1);
813

9-
--text-color: #e7e7e7;
10-
--text-color-strong: #fff;
11-
--text-color-weak: #b1b1b1;
14+
--floral-lighter: lab(90 10 10);
15+
--floral-light: lab(70 10 10);
1216

17+
/* Text */
1318
--font-family: "DM Serif Display", Georgia, serif;
14-
1519
--line-height: 1.5;
1620

17-
--border-radius: 30px;
18-
--border-color: black;
19-
20-
--transition-delay: 200ms;
21+
/* Background */
22+
--background: linear-gradient(to bottom right, var(--turquoise-dark), var(--turquoise-darker));
2123
}
2224
}

0 commit comments

Comments
 (0)