-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtufte_updates.css
407 lines (307 loc) · 13.4 KB
/
tufte_updates.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
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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
/* Import ET Book styles
adapted from https://github.com/edwardtufte/et-book/blob/gh-pages/et-book.css */
/*
WISHLIST:
- fix size of dropdown menu when screen is narrow
*/
:root { /*create some variables*/
--manuscript-background-color: #fffff8;
--link-selection-color: #1964bf;
--border-color: #B6C5CD;
--body-width: 78%;
--p-width: 100%;
--table-font-size: 0.8rem;
}
@charset "UTF-8";
/* attempting to alter quarto classes*/
#quarto-sidebar { /*change background of sidebar, and set width to inherit the container's width*/
background-color: var(--manuscript-background-color);
width: inherit;
}
#quarto-document-content { /*change padding on main body of text, add vertical borders*/
padding-right: 14px;
padding-left: 14px;
border-width: 1px;
border-style: none solid;
border-color: var(--border-color);
}
.list-unstyled.mt-1 { /*change the width of the items in the sidebar*/
width: 100%;
}
li.sidebar-item { /* remove bottom padding in sidebar*/
padding-bottom: 0;
}
a:link.sidebar-item-text { /*remove line in background that looks like an underline in sidebar list items*/
background: none;
}
a.sidebar-item-text.sidebar-link.active { /*remove coloring of link in sidebar for current page*/
color: inherit;
}
a.sidebar-item-text.sidebar-link.active:hover { /*make active page link hover color the same as the others*/
color: var(--link-selection-color);
}
h2, .h2 { /*remove underline for h2*/
border-bottom: none;
}
#quarto-header { /*fix collapsed header so it is the same width as the content and centered over the content*/
width: var(--body-width);
margin: auto;
}
#title-block-header.quarto-title-block.default .quarto-title-meta-heading { /*remove margin for now-empty title metadata element that used to contain "AUTHOR" label*/
margin-top: 0;
}
p.subtitle.lead { /*remove margin under subtitle*/
margin-bottom: 0;
width: 100%;
}
@media { /*adjust grid to center content*/
body .page-columns {
grid-template-columns: [screen-start screen-start-inset body-start] 5fr [body-start-outset page-start-inset page-start body-content-start] minmax(min-content, calc(600px - 3em)) [body-content-end body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset screen-end];
}
}
@media { /*repeat for more specific body.floating class so that text doesn't spill over the right margin*/
body.floating .page-columns {
grid-template-columns: [screen-start screen-start-inset body-start] 5fr [body-start-outset page-start-inset page-start body-content-start] minmax(min-content, calc(600px - 3em)) [body-content-end body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset screen-end];
}
}
@media { /*repeat for more specific body.floating.fullcontent class so same grid pattern used on front page*/
body.floating.fullcontent .page-columns {
grid-template-columns: [screen-start screen-start-inset body-start] 5fr [body-start-outset page-start-inset page-start body-content-start] minmax(min-content, calc(600px - 3em)) [body-content-end body-end body-end-outset page-end-inset page-end] 5fr [screen-end-inset screen-end];
}
}
.table { /*make table width match content width*/
width: var(--p-width);
}
tr {
border-color: var(--border-color);
border-width: 1px 0px;
}
.cell-output-display:not(.no-overflow-x) { /*allow margin notes to overflow the bounding box*/
overflow-x: visible;
}
.nav-page a:hover { /*set hover link color for navigation at bottom of page*/
color: var(--link-selection-color);
}
.observablehq table {/*override ojs table font size*/
font-size: var(--table-font-size) !important;
}
/* Tufte CSS styles */
html { font-size: 12px; }
body { width: var(--body-width);
margin-left: auto;
margin-right: auto;
color: #111;
max-width: 1400px;
counter-reset: sidenote-counter;
background-image: url(materials/margin_image.jpg), url(materials/margin_image.jpg);
background-position: left 0 top 0, right 0 top 0;
background-repeat: repeat-y;
background-attachment: fixed;
background-size: 11%, 11% ;
}
h1.title { font-weight: 400;
font-style: normal;
margin-top: 4rem;
margin-bottom: 1.5rem;
font-size: 2.8rem;
line-height: 1; }
h1 {
font-weight: 400;
margin-top: 2.1rem;
margin-bottom: 0;
font-size: 1.7rem;
line-height: 1; }
h2 {
font-weight: 400;
font-size: 1.3rem;
margin-top: 2rem;
margin-bottom: 0;
line-height: 1; }
h3.subtitle {
font-weight: 400;
margin-top: 1rem;
margin-bottom: 1rem;
font-size: 1.4rem;
display: block;
line-height: 1; }
h4.author, h4.date {
font-size: 1rem;
font-weight: 400;
margin: 1rem auto;
line-height: 1;
}
.danger { color: red; }
article { position: relative;
padding: 5rem 0rem; }
section { padding-top: 1rem;
padding-bottom: 1rem; }
p, ol, ul { font-size: 1rem; }
p { line-height: 1.5rem;
margin-top: 1.4rem;
margin-bottom: 1.4rem;
padding-right: 0;
vertical-align: baseline; }
blockquote { font-size: 1.4rem; }
blockquote p { width: 50%; }
blockquote footer { width: 50%;
font-size: 1.1rem;
text-align: right; }
ol, ul { width: 45%;
-webkit-padding-start: 5%;
-webkit-padding-end: 5%; }
li { padding: 0.5rem 0; }
table {
border-top: 2px solid #111;
border-bottom: 2px solid #111;
font-size: var(--table-font-size);
}
th {
border-bottom: 1px solid #111;
}
td {
vertical-align: baseline;
}
div.figure {
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
max-width: 55%;
-webkit-margin-start: 0;
-webkit-margin-end: 0;
margin: 0 0 3em 0;
}
/* Links: replicate underline that clears descenders */
a:link, a:visited { color: inherit; }
a:link {
text-decoration: none;
/*comment out the background here to remove the line that appears under links*/
background: -webkit-linear-gradient(var(--manuscript-background-color), var(--manuscript-background-color)), -webkit-linear-gradient(var(--manuscript-background-color), var(--manuscript-background-color)), -webkit-linear-gradient(#333, #333);
background: linear-gradient(var(--manuscript-background-color), var(--manuscript-background-color)), linear-gradient(var(--manuscript-background-color), var(--manuscript-background-color)), linear-gradient(#333, #333);
-webkit-background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
-moz-background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
background-repeat: no-repeat, no-repeat, repeat-x;
text-shadow: 0.03em 0 var(--manuscript-background-color), -0.03em 0 var(--manuscript-background-color), 0 0.03em var(--manuscript-background-color), 0 -0.03em var(--manuscript-background-color), 0.06em 0 var(--manuscript-background-color), -0.06em 0 var(--manuscript-background-color), 0.09em 0 var(--manuscript-background-color), -0.09em 0 var(--manuscript-background-color), 0.12em 0 var(--manuscript-background-color), -0.12em 0 var(--manuscript-background-color), 0.15em 0 var(--manuscript-background-color), -0.15em 0 var(--manuscript-background-color);
background-position: 0% 93%, 100% 93%, 0% 93%; }
@media screen and (-webkit-min-device-pixel-ratio: 0) { a:link { background-position-y: 87%, 87%, 87%; } }
a:link::selection { text-shadow: 0.03em 0 var(--link-selection-color), -0.03em 0 var(--link-selection-color), 0 0.03em var(--link-selection-color), 0 -0.03em var(--link-selection-color), 0.06em 0 var(--link-selection-color), -0.06em 0 var(--link-selection-color), 0.09em 0 var(--link-selection-color), -0.09em 0 var(--link-selection-color), 0.12em 0 var(--link-selection-color), -0.12em 0 var(--link-selection-color), 0.15em 0 var(--link-selection-color), -0.15em 0 var(--link-selection-color);
background: var(--link-selection-color); }
a:link::-moz-selection { text-shadow: 0.03em 0 var(--link-selection-color), -0.03em 0 var(--link-selection-color), 0 0.03em var(--link-selection-color), 0 -0.03em var(--link-selection-color), 0.06em 0 var(--link-selection-color), -0.06em 0 var(--link-selection-color), 0.09em 0 var(--link-selection-color), -0.09em 0 var(--link-selection-color), 0.12em 0 var(--link-selection-color), -0.12em 0 var(--link-selection-color), 0.15em 0 var(--link-selection-color), -0.15em 0 var(--link-selection-color);
background: var(--link-selection-color); }
a:hover { /*set hover link color*/
color: var(--link-selection-color);
}
/* Sidenotes, margin notes, figures, captions */
img {max-width: 100%;}
.marginnote img { display: block; }
.sidenote, .marginnote { float: right;
clear: right;
margin-right: calc(var(--body-width) * -1);
padding-left: 5%;
width: 70%;
margin-top: 0;
margin-bottom: 1rem;
font-size: var(--table-font-size);
line-height: 1.3;
vertical-align: baseline;
position: relative; }
.sidenote-number {
position: relative;
vertical-align: baseline; }
.sidenote-number { font-size: 1rem;
top: -0.5rem;
left: 0.1rem; }
p, footer, table, hr { width: var(--p-width); }
hr { margin-left: 0; }
table table, li p, li pre { width: auto; }
li p, li pre {margin-top: auto; }
div.fullwidth, table.fullwidth { max-width: 90%; }
div.fullwidth > * { width: auto; }
#TOC, h1.title { max-width: 90%; }
#TOC ol, #TOC ul { width: auto; }
div.fullwidth p.caption {
margin-right: 0;
max-width: 33%;
}
p.caption { text-align: left; }
@media screen and (max-width: 760px) { p, footer, ol, ul, table, hr { width: 90%; }
pre { width: 87.5%; }
ul { width: 85%; }
figure { max-width: 90%; }
div.fullwidth p.caption { max-width: none; }
blockquote p, blockquote footer { width: 90%; }}
.sans { font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
letter-spacing: .03em; }
code { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 1.125rem;
line-height: 1.6; }
pre code { font-size: 1rem; }
p code { white-space: inherit; }
h1 code, h2 code, h3 code { font-size: 0.80em; }
.marginnote code, .sidenote code { font-size: 1rem; }
pre { width: 52.5%;
overflow-x: auto; }
.fullwidth { max-width: 90%;
clear:both; }
span.newthought { font-variant: small-caps;
font-size: 1.2em; }
input.margin-toggle { display: none; }
label.sidenote-number { display: inline; }
label.margin-toggle:not(.sidenote-number) { display: none; }
@media (max-width: 1194px) { label.margin-toggle:not(.sidenote-number) { display: inline; }
.sidenote, .marginnote { display: none; }
.shownote,
.margin-toggle:checked + .sidenote,
.margin-toggle:checked + .marginnote {
display: block;
float: left;
left: 1rem;
clear: both;
width: 95%;
margin: 1rem 2.5%;
vertical-align: baseline;
position: relative;
}
label { cursor: pointer; }
div.figure { max-width: 90%; }
pre { width: 90%;
padding: 0; }
}
iframe {
border: 0;
}
/* tufte-fonts.css */
@font-face {
font-family: "et-book";
src: url("et-book/roman-line-figures.ttf") format("truetype");
font-weight: normal;
font-style: normal
}
@font-face {
font-family: "et-book";
src: url("et-book/display-italic-old-style-figures.ttf") format("truetype");
font-weight: normal;
font-style: italic
}
@font-face {
font-family: "et-book";
src: url("et-book/bold-line-figures.ttf") format("truetype");
font-weight: bold;
font-style: normal
}
@font-face {
font-family: "et-book-roman-old-style";
src: url("et-book/roman-old-style-figures.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
body { font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif; }
.numeral, .sidenote-number { font-family: et-book-roman-old-style; }
/* tufte-background.css */
body {
background-color: var(--manuscript-background-color);
}
/* tufte-italics.css */
h1, h2, h3.subtitle { font-style: italic; }