-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.css
179 lines (173 loc) · 3.26 KB
/
index.css
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
:root {
--gray-1: #0A0708;
--gray-2: #4E4D4D;
--gray-3: #B1B1B1;
--gray-4: #d3cfce;
--code: #de7436;
--link: #1e77dc;
}
html {
font-size: 18px;
/* 1.5rem - 24px */
line-height: 1.5;
font-family: "Open Sans", sans-serif;
font-optical-sizing: auto;
font-weight: 400;
font-style: normal;
font-variation-settings:
"wdth" 100;
}
/* Larger font-size on mobile */
@media (max-width: 1024px) {
html {
font-size: 22px;
}
}
body {
background-color: var(--gray-1);
color: var(--gray-3);
margin: 2rem;
padding-bottom: 24rem;
overflow-y: scroll;
}
::-webkit-scrollbar {
width: 0.6rem;
}
::-webkit-scrollbar-thumb {
background-color: var(--gray-2);
border: solid 2px var(--gray-1);
border-radius: 4px;
}
::-webkit-scrollbar-track {
background-color: var(--gray-1);
}
::-webkit-scrollbar-thumb:hover {
background-color: var(--gray-3);
}
.prose {
max-width: 80ch;
margin: 0 auto;
}
.prose * {
animation: fade-in 0.4s ease-in-out;
}
@keyframes fade-in {
from {
transform: translateY(0.5rem);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.prose *::before, .prose *::after {
color: var(--gray-2);
font-size: 18px;
font-weight: 400;
font-family: monospace;
}
.prose :is(p, pre, ul, ol) {
margin: 1rem 0;
}
.prose :is(h3, h4, h5, h6) {
margin: 1.5rem 0
1rem;
}
.prose :is(h1, h2) {
margin: 2rem 0
1rem;
color: var(--gray-4);
}
.prose :not(pre) > code {
border-radius: 3px;
color: var(--code);
}
.prose :not(pre) > code::before,
.prose :not(pre) > code::after {
content: "`";
}
.prose pre {
position: relative;
background-color: var(--gray-1);
border: 1px solid var(--gray-2);
border-radius: 4px;
padding: 1.5rem 1ch;
margin: 0 -1ch;
overflow-x: auto;
}
.prose pre > code::before,
.prose pre > code::after {
position: absolute;
left: 1ch;
display: block;
}
.prose pre > code::before {
content: "```" attr(class);
top: 0;
}
.prose pre > code::after {
content: "```";
bottom: 0;
}
.prose h1::before {
content: "# ";
}
.prose h2::before {
content: "## ";
}
.prose h3::before {
content: "### ";
}
.prose h4::before {
content: "#### ";
}
.prose h5::before {
content: "##### ";
}
.prose h6::before {
content: "###### ";
}
.prose em::after,
.prose em::before {
content: "*";
}
.prose strong::after,
.prose strong::before {
content: "**";
}
.prose a {
color: var(--link);
}
input[type="checkbox"] {
position: relative;
vertical-align: middle;
appearance: none;
border: 1px solid var(--gray-2);
box-sizing: content-box;
border-radius: 2px;
width: 0.8rem;
height: 0.8rem;
}
input[type="checkbox"]::after,
input[type="checkbox"]::before {
content: "";
position: absolute;
top: 0.35rem;
height: 0.1rem;
left: 0.05rem;
width: 0.7rem;
background-color: var(--gray-3);
border-radius: 2px;
opacity: 0;
}
input[type="checkbox"]::after {
transform: rotate(-45deg);
}
input[type="checkbox"]::before {
transform: rotate(45deg);
}
input[type="checkbox"]:checked::after,
input[type="checkbox"]:checked::before {
opacity: 1;
}