-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle_screen.css
More file actions
295 lines (286 loc) · 7.38 KB
/
style_screen.css
File metadata and controls
295 lines (286 loc) · 7.38 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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
@media screen {
:root {
--p1: 2.5px;
--p2: calc(2 * var(--p1));
--p4: calc(4 * var(--p1));
--p5: calc(5 * var(--p1));
--p6: calc(6 * var(--p1));
--p8: calc(8 * var(--p1));
--p16: calc(16 * var(--p1));
--sb-color: #262626;
--bg-color: rgb(219, 219, 219);
--bullet-color: rgb(143, 143, 143);
--scroll-bar-width: 30px;
--content-width: 65vw;
/* hack to cover scrollbar gap Chrome.... */
--sidebar-width: calc(35vw - var(--scroll-bar-width));
--sidebar-max-width: 40ch;
--content-max-width: 100ch;
--sidebar-max-width: 60ch;
--html-width: calc(var(--content-width) + var(--sidebar-width) + var(--scroll-bar-width));
--html-max-width: calc(var(--content-max-width) + var(--sidebar-max-width));
--gutter: 15px;
--sb-gutter: 5px;
--sidebar-height: 200vh;
font-size: 15px;
}
}
@supports (scrollbar-width: none) {
:root {
--scroll-bar-width: 15px;
}
}
/* Our "natural" breakpoints, as per resizing in developer tools, are:
*
* - less than 800px and sidebar is too wide, content stops fitting at current
* font size
* -
*/
@media only screen and (min-width: 800px) and (max-width: 1024px) {
/* */
}
/* NOTE: Remove .front-page class. It is not needed, you can get the front page
* with just e.g. page(:first-of-type) and the .front-page div causes problems
* for making flex containers.
*/
/* @media only screen and (min-width: 1024px) { */
@media only screen {
html {
background-color: var(--sb-color);
width: 100vw;
position: relative;
right: 65vw;
}
.backdrop {
width: var(--html-width);
max-width: var(--html-max-width);
height: 100vh;
margin: 0 auto;
background-color: var(--bg-color);
position: fixed;
z-index: -1;
}
.all-content {
background-color: var(--sb-color);
width: inherit;
max-width: inherit;
}
.main-content {
background-color: white;
}
/* HEADER */
.header {
width: 100%;
flex-shrink: 0;
}
.pages {
background-color: white;
width: var(--content-width);
max-width: var(--content-max-width);
position: relative;
left: calc(100vw - var(--scroll-bar-width));
top: 0;
min-height: 100vh;
}
/* SIDEBAR */
.sidebar {
font-size: 0.8rem;
width: var(--sidebar-width);
max-width: var(--sidebar-max-width);
position: fixed;
height: 100vh;
right: var(--content-width);
background-color: var(--sb-color);
color: var(--bg-color);
overflow-y: scroll;
overflow-x: hidden; /* disables strange scolling behaviour on iPhone */
scrollbar-width: none;
align-self: flex-start;
}
.stickifier {
/* see https://stackoverflow.com/a/57830863, this is the ONLY thing that works when when
* the height of the sidebar and content are also dynamic. Note also the height of zero
* on the .stickifier is essential for this to work.
*/
position: sticky;
top: 0px;
height: 0px;
align-self: flex-start;
}
.sidebar .section:not(.subsection) {
padding-top: var(--gutter);
padding-left: var(--gutter);
padding-right: var(--gutter);
font-size: 0.8rem;
}
.sidebar .section:last-of-type {
padding-bottom: var(--gutter);
}
.sidebar .section h1,
.sidebar .section h2 {
font-family: "Raleway";
font-weight: 500;
}
.sidebar .section h1 {
padding-bottom: var(--p2);
font-size: 1.2rem;
}
.sidebar .section h1:not(:first-of-type) {
padding-top: var(--p4);
}
.sidebar .section h2 {
margin-top: 0;
padding-top: var(--p2);
padding-bottom: 5px;
font-size: 1rem;
}
.sidebar .section h1:after {
left: 0;
width: calc(var(--sidebar-width) - 2 * var(--gutter));
border-bottom: 1px solid var(--color);
}
.sidebar .subsection {
margin-top: 0;
padding-top: 0;
}
/* SIDEBAR.contact */
/* PAGES */
.pages {
display: flex;
flex-flow: column nowrap;
justify-content: flex-start;
align-items: stretch;
}
.page {
margin: 0 0 0 0;
flex-grow: 1;
}
.page .section {
padding-left: var(--p4);
padding-top: var(--p4);
}
.page .about {
padding-bottom: var(--p4);
}
.page .subsection {
padding-top: var(--p2);
}
.page .subsection h2 {
padding-bottom: var(--p2);
}
.page h1,
.page h2 {
font-weight: 400;
color: rgb(1, 69, 145);
font-family: Raleway;
font-size: 1.2rem;
border-bottom: 0;
}
.page h1 + h1,
.page h2 + h2 {
margin-top: var(--p4);
padding-top: 0;
}
.page h1 {
font-size: 1.2rem;
}
.page h2 {
font-size: 1rem;
}
.page h1:after {
/* add bottom border */
left: 0;
border-bottom: 1px solid black;
}
/* Page */
.page .section {
font-family: "Petrona";
font-weight: 300;
}
.page .section:not(:first-of-type) {
padding-top: var(--gutter);
}
.page > .section > p {
line-height: 1.2;
}
.subsection .repo {
padding-left: var(--p4);
padding-bottom: var(--p2);
}
/* LISTS */
/* Top level */
.page section > ul {
/* list-style: symbols(cyclic "-") outside; */
list-style-type: none;
}
.page section > ul > li p {
padding-left: var(--p4);
} /* must precede rule below */
.page section > ul > li p::first-line {
padding-left: var(--p8);
}
ul + li {
padding-top: var(--p2);
}
/* Second-level */
.page section > ul > ul {
padding-left: var(--p6);
padding-bottom: var(--p2);
}
.page section > ul > ul li::marker {
color: var(--header-bg-color);
}
.page section > ul > ul > li {
border-left: 2px solid var(--bullet-color);
padding-left: var(--p4);
/* line-height: 0.1px; */
margin-top: var(--p2);
/* margin-bottom: var(--p1); */
/* margin-left: calc(0 - var(--p4)); */
}
.page section > ul > ul > li > p {
padding-bottom: var(--p1);
font-size: 0.875rem;
line-height: 0.7rem;
/* padding-left: 20px; */
}
/* repo sections */
.repo > a {
font-size: 0.8rem;
}
/* citation flexboxing */
.citation {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-items: flex-start;
align-content: flex-start;
column-gap: var(--p4);
padding-left: var(--p4);
}
.citation + .citation {
padding-top: var(--p4);
}
.authors {
/* do not show in print to save space */
display: none;
}
.citation .title {
order: 0;
flex-basis: 85%;
}
.citation .year {
order: 1;
flex-basis: 10%;
text-align: right;
}
.citation .journal {
order: 2;
font-size: 0.8rem;
}
.citation .link {
order: 3;
font-size: 0.8rem;
}
}