-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
124 lines (109 loc) · 2.94 KB
/
style.css
File metadata and controls
124 lines (109 loc) · 2.94 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
/* =========================================================
Global layout container
========================================================= */
.layout {
display: flex;
flex-direction: row;
align-items: flex-start; /* top-align TOC and main */
max-width: 1150px;
margin: 2rem auto; /* center horizontally */
padding: 0;
gap: 2rem; /* space between TOC and main content */
background-color: #faf9f5;
}
body {
margin: 0;
}
/* =========================================================
TOC (sticky instead of fixed)
========================================================= */
nav[role="doc-toc"] {
width: 260px;
position: sticky; /* stick to top of viewport */
top: 1rem; /* offset from top */
align-self: flex-start; /* prevents stretching in flex */
padding: 2rem 1.5rem;
border-right: 1px solid #ddd;
background-color: #f2faf8;
}
/* TOC title */
nav[role="doc-toc"] .toc-title {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 1rem;
}
/* TOC links */
nav[role="doc-toc"] ul {
list-style: disc !important;
margin: 0;
padding: 0;
}
nav[role="doc-toc"] li {
margin-bottom: 0.5em;
}
nav[role="doc-toc"] a {
color: #1a0dab;
text-decoration: none;
}
nav[role="doc-toc"] a:hover {
text-decoration: underline;
}
/* =========================================================
Main content area
========================================================= */
main {
flex: 1; /* take remaining space */
padding: 0 2rem 2rem 0;
margin: 0;
font-family: "Georgia", "Times New Roman", Times, serif;
font-size: 18px;
line-height: 1.6;
color: #222;
}
main h1:first-child {
margin-top: 0;
}
main img {
max-width: 100%;
height: auto;
display: block;
}
/* =========================================================
Headings
========================================================= */
h1, h2, h3, h4, h5, h6 {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
font-weight: 600;
margin: 1em 0 0.5em;
line-height: 1.3;
color: #111;
}
/* =========================================================
MathJax styling
========================================================= */
mjx-container[display="true"] { display: block; margin: 1em 0; }
mjx-container:not([display="true"]) { display: inline; }
/* =========================================================
Responsive
========================================================= */
@media (max-width: 900px) {
.layout {
flex-direction: column;
margin-top: 1rem;
gap: 0;
}
/*
nav[role="doc-toc"] {
width: 100%;
border-left: none;
border-bottom: 1px solid #ddd;
padding: 1rem;
position: relative; /* sticky not needed in column mode
}
*/
main {
margin: 0;
padding: 1rem;
}
}