Repository navigation
Expand file tree
/
Copy pathcustom.scss
More file actions
161 lines (134 loc) · 3.26 KB
/
Copy pathcustom.scss
File metadata and controls
161 lines (134 loc) · 3.26 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
@use "./base.scss";
// docs.hackctl.com sizing: 16px root, article at browser default scale.
// chrome (nav/search) stays compact at 14px.
html {
font-size: 16px;
}
body {
font-size: 0.875rem;
line-height: 1.5;
}
// compact article type
.center > article p,
.center > article li {
font-size: 0.8125rem;
line-height: 1.7;
}
.center > article h1,
.page-header h1.article-title {
font-size: 1.35rem;
line-height: 1.3;
}
.center > article h2 {
font-size: 1.15rem;
line-height: 1.3;
}
.center > article h3 {
font-size: 1rem;
line-height: 1.5;
}
.center > article table {
font-size: 0.75rem;
}
// put your custom CSS here!
header > .flex-component {
flex-grow: 1;
}
.search {
max-width: none;
width: 100%;
min-width: 280px;
}
.search > .search-button {
width: 100%;
max-width: 32rem;
}
// hide folder/tag item counts ("N items under this folder")
.page-listing > p {
display: none;
}
// hide dates in file listings
.section > .meta {
display: none;
}
// pin top bar (logo/search/theme/github) + breadcrumbs while scrolling.
// NOTE: sticky (not fixed) so the bar keeps its full grid-column width.
// (fixed + width:inherit shrink-wraps to content width and leaves a
// see-through strip). Selector must match Quartz's specificity or the
// built-in 6rem margin wins and pushes the bar down.
.page > #quartz-body .page-header {
position: sticky;
top: 0;
z-index: 20;
background: var(--light);
margin: 0;
padding: 1.5rem 0 0.5rem 0;
border-bottom: 1px solid var(--lightgray);
}
// flush inner header to the top like a navbar (Quartz default is 2rem margin)
.page-header > header {
margin: 0;
}
.page-header .breadcrumb-container {
margin-top: 1rem;
margin-bottom: 0.75rem;
}
// kill Quartz's 1.9rem h2 top-margin on UI headings (navbar logo, Explorer title)
.page-header h2 {
margin: 0;
}
// slim the title inside the fixed bar (ArticleTitle defaults to 2rem top margin)
.page-header h1.article-title {
margin: 0;
}
.sidebar h2,
.sidebar h3 {
margin-top: 0;
margin-bottom: 0.5rem;
}
// outer gutters on the far left and right of the page
.page > #quartz-body {
padding-left: 1rem;
padding-right: 1rem;
column-gap: 1.5rem;
}
// wider middle: slimmer sidebars and a wider page cap (1700px)
.page {
max-width: 1700px;
}
// slimmer sidebars on desktop so the middle gets the space
@media all and (min-width: 1200px) {
.page > #quartz-body {
grid-template-columns: 240px auto 300px;
}
}
// wide view: hide both sidebars, middle takes the full page width
:root[wide="on"] .page > #quartz-body {
grid-template-columns: auto;
grid-template-areas:
"grid-header"
"grid-center"
"grid-footer";
}
:root[wide="on"] .page > #quartz-body > .sidebar {
display: none;
}
// no indent guide line in the Explorer file tree
.explorer .folder-outer > ul {
border-left: none;
}
// pull sidebars up (Quartz default reserves 6rem for the old in-flow header)
.page > #quartz-body > .sidebar {
padding-top: 2rem;
}
// keep anchor/TOC jumps clear of the fixed bar
html {
scroll-padding-top: 160px;
}
// sticky bar stays in flow, so no compensation needed on desktop;
// keep anchor/TOC jumps clear of it via scroll-padding (see html rule)
@media all and (max-width: 800px) {
.page > #quartz-body > .sidebar.left {
padding-top: 2rem;
}
}