-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoc.css
161 lines (140 loc) · 3.2 KB
/
toc.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
@import 'global.css';
/* Table of Content Box
/* ---------------------------------------------------------- */
/* Need for sticky to work */
html.casper body {
overflow: visible;
}
/* Adjust outer wrapper */
html.casper .post-full-content {
display: block;
}
@media (min-width: 1170px) {
html.casper .post-full-content {
display: flex;
align-items: flex-start;
}
}
/* Adjust content wrapper */
html.casper .post-content {
min-width: 100%;
}
/* Offset headings from fixed header */
html.casper .post-content h2::before,
html.casper .post-content h3::before,
html.casper .post-content h4::before,
html.casper .post-content h5::before,
html.casper .post-content h6::before {
display: block;
content: ' ';
height: 80px;
margin-top: -80px;
visibility: hidden;
}
/* Adjustments to wide and full width cards */
html.casper .kg-gallery-card,
html.casper .kg-width-wide,
html.casper .kg-width-full {
display: flex;
flex-direction: column;
align-items: center;
}
html.casper .kg-gallery-card > *,
html.casper .kg-width-wide > *,
html.casper .kg-width-full > *,
html.casper figure.kg-width-full:not(.fluid-image) {
margin-left: -50vw;
margin-right: -50vw;
z-index: 1;
}
/* Dark mode */
html.casper body.dark .post-full-content aside {
color: #bbb;
background: color-mod(var(--darkgrey) alpha(0.6));
}
html.casper body.dark .post-full-content aside a {
box-shadow: none;
}
/* Page styles */
html.casper aside.toc {
order: 1;
font-family: -apple-system, Liberation Sans, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Open Sans, Helvetica Neue, sans-serif;
line-height: 1.5em;
font-size: 1.6rem;
color: #78757a;
background-color: rgba(255, 255, 255, 0.8);
border-radius: 5px;
}
@media (min-width: 1170px) {
html.casper aside.toc {
position: sticky;
top: 120px;
min-width: 260px;
font-size: 1.4rem;
padding: 0 2.4rem;
margin-left: 0.2rem;
}
}
html.casper aside.toc h2 {
font-size: 1.4rem;
letter-spacing: 0.075em;
margin-top: 1.2rem;
margin-bottom: 2rem;
text-transform: uppercase;
font-weight: 700;
}
@media (min-width: 1170px) {
html.casper aside.toc h2 {
font-size: 1.2rem;
}
}
html.casper aside.toc ul.list {
overflow: hidden;
position: relative;
list-style: none;
margin: 0;
padding: 0;
margin-top: -1.6rem;
margin-bottom: 2rem;
padding-top: 0.6rem;
padding-left: 0.9rem;
}
html.casper aside.toc ul.sub {
margin-top: 0.5rem;
padding-left: 1.6rem;
margin-bottom: 0.1rem;
}
html.casper aside.toc li {
list-style: none;
margin-bottom: calc(1.5rem / 2);
}
html.casper aside.toc li a {
height: 100%;
box-shadow: none;
text-decoration: none;
color: inherit !important;
border-bottom: none;
}
html.casper aside.toc li a.active {
color: #54bc4b !important;
border-bottom: 1px solid #54bc4b;
}
html.casper aside.toc li a::before {
background-color: #eee;
content: ' ';
display: inline-block;
height: inherit;
left: 0;
position: absolute;
width: 2px;
margin-left: 1px;
}
html.casper aside.toc li a.active::before {
background-color: #54bc4b;
}
html.casper aside.toc li a:hover {
color: #54bc4b !important;
border-bottom: 1px solid #54bc4b;
text-decoration: none;
box-shadow: none;
}