-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
139 lines (117 loc) · 2.45 KB
/
style.css
File metadata and controls
139 lines (117 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
:root {
/* The 3 colors used on the page */
--col-primary: rgb(57, 62, 65);
--col-pop: rgb(233, 79, 55);
--col-background: rgb(246, 247, 235);
color: var(--col-primary);
font-family: "Hind", system-ui, sans-serif;
line-height: 1.5;
font-weight: 400;
font-style: normal;
--pad: 1em;
--pad-big: 1.7em;
}
/* Basic dark mode, with primary & background swapped */
@media (prefers-color-scheme: dark) {
:root {
--col-pop: rgb(233, 79, 55);
--col-background: rgb(57, 62, 65);
--col-primary: rgb(246, 247, 235);
}
}
h1 {
font-size: 2.1em;
font-family: "Montserrat", system-ui, sans-serif;
font-optical-sizing: auto;
font-weight: 700;
font-style: normal;
padding-top: var(--pad);
padding-bottom: var(--pad);
}
h2 {
margin-top: calc(2 * var(--pad));
}
p {
padding-bottom: var(--pad);
}
body {
background-color: var(--col-background);
margin: 0 auto;
}
/* In general, the width is at most 620px.
* On mobile (< 621px) we limit the content to 600px
* and set 10px of padding on either side.
*
* On bigger screens, no padding, but we limit the content to
* 600px (as well) and scale up the canvas to 620px.
* */
@media (width < 621px) {
body {
max-width: 600px;
padding-left: 10px;
padding-right: 10px;
}
}
canvas {
width: 100%;
}
@media (width > 620px) {
body {
max-width: 600px;
}
canvas {
width: 620px;
/* 10px = (620 - 600) / 2 */
transform: translateX(-10px);
}
pre.shiki {
border-radius: 0.5em;
margin-left: -2em;
margin-right: -2em;
}
}
pre.shiki {
padding: 2em;
overflow-x: auto;
}
.canvas-container {
padding: var(--pad-big) 0;
/* ensure examples don't break the page */
overflow: hidden;
}
canvas {
--transition-duration: 0.6s;
aspect-ratio: 1;
accent-color: var(--col-pop);
color: var(--col-primary);
transition:
color var(--transition-duration) cubic-bezier(0.3, 0.7, 0, 1),
accent-color var(--transition-duration) cubic-bezier(0.3, 0.7, 0, 1);
}
footer {
text-align: center;
padding-top: var(--pad-big);
padding-bottom: var(--pad-big);
color: #6f7a80;
font-size: 0.8em;
}
a:link,
a:visited {
text-decoration: underline;
color: #6f7a80;
}
a:hover {
color: var(--col-pop);
}
footer a:link,
footer a:visited {
text-decoration: none;
font-weight: bold;
}
footer a:hover {
text-decoration: underline;
}
canvas#glcanvas-sphere {
/* scaled down because it's a bit overwhelmin otherwise */
transform: scale(0.8);
}