Skip to content

Commit e85a7ea

Browse files
committed
Cheatsheet adjustments
1 parent 99fc6c1 commit e85a7ea

File tree

2 files changed

+102
-128
lines changed

2 files changed

+102
-128
lines changed

assets/css/content/cheatsheet.css

Lines changed: 100 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,17 @@
1-
/* Code blocks */
2-
3-
.page-cheatmd pre code {
4-
/* -ms-overflow-style: none;
5-
scrollbar-width: none; */
6-
padding: 1.5em 2em;
7-
}
8-
9-
/* .page-cheatmd pre code:hover {
10-
-ms-overflow-style: auto;
11-
scrollbar-width: auto;
12-
} */
1+
/* h1 styling */
132

14-
/* .page-cheatmd pre code::-webkit-scrollbar {
15-
display: none;
16-
}
17-
18-
.page-cheatmd pre code:hover::-webkit-scrollbar {
19-
display: block;
20-
} */
21-
22-
.page-cheatmd pre {
23-
margin: 0;
24-
}
25-
26-
.content-inner pre code::-webkit-scrollbar {
27-
width: 0.4rem;
28-
height: 0.3rem;
3+
.page-cheatmd h1 {
4+
margin-bottom: 1em;
295
}
306

317
/* h2 styling */
328

339
.page-cheatmd h2 {
34-
margin: 1em 0 1em 0;
10+
margin: 1em 0;
3511
column-span: all;
3612
padding-left: 3px;
37-
color: var(--gray600);
13+
color: var(--gray700);
3814
font-weight: 500;
39-
font-size: 2rem;
4015
}
4116

4217
.page-cheatmd.dark h2 {
@@ -54,9 +29,10 @@
5429
font-weight: 400;
5530
}
5631

57-
.page-cheatmd .h3 {
32+
.page-cheatmd section.h3 {
5833
min-width: 300px;
5934
margin: 0 0 2em 0;
35+
break-inside: avoid;
6036
-webkit-column-break-inside: avoid;
6137
}
6238

@@ -80,7 +56,7 @@
8056
display: block;
8157
margin: 0;
8258
margin-bottom: -1px;
83-
padding: 0.25em 2em;
59+
padding: 0.25em 1.5em;
8460
font-weight: 400;
8561
background: var(--gray100);
8662
color: #567;
@@ -94,219 +70,220 @@
9470
border-bottom: 0;
9571
}
9672

97-
/* Columns */
98-
99-
.full-page {
100-
display: block;
101-
width: 100%;
102-
}
103-
104-
.full-page > section > table {
105-
width: 100%;
106-
}
73+
/* Paragraphs */
10774

108-
.page-cheatmd section.width-50 {
75+
.page-cheatmd .h2 p {
76+
margin: 0;
10977
display: block;
110-
width: 50%;
111-
margin: 0;
112-
}
113-
114-
.width-50 > section > table {
115-
width: 100%;
116-
}
117-
118-
.col-2 {
119-
column-count: 2;
120-
column-gap: 40px;
121-
height: auto;
122-
}
123-
124-
.col-2-left {
125-
display: grid;
126-
grid-template-columns: 33% 63.2%;
127-
column-gap: 40px;
78+
background: var(--gray50);
79+
padding: 1.5em;
12880
}
12981

130-
.col-2-left > h2 {
131-
display: block;
132-
grid-column-end: span 2;
82+
.page-cheatmd.dark .h2 p {
83+
background: var(--gray700);
13384
}
13485

135-
.col-3 {
136-
column-count: 3;
137-
column-gap: 40px;
138-
height: auto;
86+
.page-cheatmd .h2 p > code {
87+
color: #eb5757;
88+
border-radius: 3px;
89+
padding: 0.2em 0.4em;
13990
}
14091

141-
/* paragraphs */
142-
143-
.page-cheatmd .h2 .h3 p {
144-
display: block;
145-
background: var(--gray50);
146-
padding: 1.5em 1em;
147-
padding-left: 2em;
148-
}
92+
/* Code blocks */
14993

150-
.page-cheatmd.dark .h2 .h3 p {
151-
background: var(--gray700);
94+
.page-cheatmd .h2 pre code {
95+
padding: 1em 1.5em;
15296
}
15397

154-
.page-cheatmd .h2,
155-
.h3 {
98+
.page-cheatmd .h2 pre {
15699
margin: 0;
157100
}
158101

159-
.page-cheatmd p {
160-
margin: 0;
102+
.page-cheatmd .h2 pre code::-webkit-scrollbar {
103+
width: 0.4rem;
104+
height: 0.3rem;
161105
}
162106

163-
.page-cheatmd p > code {
164-
color: #eb5757;
165-
border-radius: 3px;
166-
padding: 0.2em 0.4em;
107+
.page-cheatmd pre.wrap {
108+
white-space: break-spaces;
167109
}
168110

169111
/* Tables */
170112

171-
.page-cheatmd table {
113+
.page-cheatmd .h2 table {
172114
display: table;
173115
box-sizing: border-box;
174116
width: 100%;
175117
border-collapse: collapse;
176118
margin: 0;
177119
}
178120

179-
.page-cheatmd table th {
180-
padding: 0.75em 2em;
121+
.page-cheatmd .h2 table th {
122+
padding: 0.75em 1.5em;
181123
line-height: 2em;
182124
margin-bottom: -1px;
183125
vertical-align: middle;
184126
border-bottom: 1px solid var(--codeBorder);
185127
}
186128

187-
.page-cheatmd table td {
188-
padding: 0.75em 2em;
129+
.page-cheatmd .h2 table td {
130+
padding: 0.75em 1.5em;
189131
border: 0;
190132
border-bottom: 1px solid var(--codeBorder);
191133
}
192134

193-
.page-cheatmd table tr:first-child {
135+
.page-cheatmd .h2 table tr:first-child {
194136
border-top: 1px solid var(--codeBorder);
195137
}
196138

197-
.page-cheatmd table td code {
139+
.page-cheatmd .h2 table td code {
198140
color: #eb5757;
199141
border-radius: 3px;
200142
padding: 0.2em 0.4em;
201143
}
202144

203-
.page-cheatmd thead {
145+
.page-cheatmd .h2 thead {
204146
background-color: var(--gray50);
205147
}
206148

207-
.page-cheatmd.dark thead {
149+
.page-cheatmd.dark .h2 thead {
208150
background-color: var(--gray700);
209151
}
210152

211-
.page-cheatmd tbody {
153+
.page-cheatmd .h2 tbody {
212154
background-color: var(--codeBackground);
213155
}
214156

215157
/* Lists */
216-
.page-cheatmd .h3 ul,
217-
ol {
158+
.page-cheatmd .h2 ul,
159+
.page-cheatmd .h2 ol {
218160
margin: 0;
219161
padding: 0;
220162
}
221163

222-
.page-cheatmd .h3 li {
164+
.page-cheatmd .h2 li {
223165
list-style-position: inside;
224-
padding: 0.5em;
225-
padding-left: 2em;
166+
padding: 0.5em 1.5em;
226167
line-height: 2em;
227168
vertical-align: middle;
228169
background-color: var(--codeBackground);
229170
border-bottom: 1px solid var(--codeBorder);
230171
}
231172

232-
.page-cheatmd .h3 li > code {
173+
.page-cheatmd .h2 li > code {
233174
color: #eb5757;
234175
border-radius: 3px;
235176
padding: 0.2em 0.4em;
236177
}
237178

238-
/* List Columns*/
179+
/* Columns */
180+
181+
.page-cheatmd section.full-page {
182+
display: block;
183+
width: 100%;
184+
}
185+
186+
.page-cheatmd section.full-page > section > table {
187+
width: 100%;
188+
}
189+
190+
.page-cheatmd section.width-50 {
191+
display: block;
192+
width: 50%;
193+
margin: 0;
194+
}
195+
196+
.page-cheatmd section.width-50 > section > table {
197+
width: 100%;
198+
}
199+
200+
.page-cheatmd section.col-2 {
201+
column-count: 2;
202+
column-gap: 40px;
203+
height: auto;
204+
}
239205

240-
.col-4 > ul {
206+
.page-cheatmd section.col-2-left {
207+
display: grid;
208+
grid-template-columns: 33% 63.2%;
209+
column-gap: 40px;
210+
}
211+
212+
.page-cheatmd section.col-2-left > h2 {
213+
display: block;
214+
grid-column-end: span 2;
215+
}
216+
217+
.page-cheatmd section.col-3 {
218+
column-count: 3;
219+
column-gap: 40px;
220+
height: auto;
221+
}
222+
223+
.page-cheatmd section.col-4 > ul {
241224
display: flex;
242225
flex-wrap: wrap;
243226
}
244227

245-
.col-4 > ul > li {
228+
.page-cheatmd section.col-4 > ul > li {
246229
flex: 0 0 25%;
247230
}
248231

249-
.col-6 > ul {
232+
.page-cheatmd section.col-6 > ul {
250233
display: flex;
251234
flex-wrap: wrap;
252235
}
253236

254-
.col-6 > ul > li {
237+
.page-cheatmd section.col-6 > ul > li {
255238
flex: 0 0 16.6667%;
256239
}
257240

258-
/* Wrap */
259-
260-
.page-cheatmd pre.wrap {
261-
white-space: normal;
262-
}
263-
264-
/* media query */
241+
/* Media query */
265242

266243
@media (max-width: 1080px) {
267-
.col-3 {
244+
.page-cheatmd section.col-3 {
268245
column-count: 2;
269246
column-gap: 40px;
270247
}
271248
}
272249

273250
@media (max-width: 850px) {
274-
.col-2-left {
251+
.page-cheatmd section.col-2-left {
275252
display: block;
276253
column-count: 1;
277254
}
278255

279-
.col-6 > ul > li {
256+
.page-cheatmd section.col-6 > ul > li {
280257
flex: 0 0 25%;
281258
}
282259
}
283260

284261
@media (max-width: 768px) {
285-
.col-4 > ul > li {
262+
.page-cheatmd section.col-4 > ul > li {
286263
flex: 0 0 33%;
287264
}
288265

289-
.col-6 > ul > li {
266+
.page-cheatmd section.col-6 > ul > li {
290267
flex: 0 0 33%;
291268
}
292269
}
293270

294271
@media (max-width: 680px) {
295-
.col-3 {
272+
.page-cheatmd section.col-3 {
296273
column-count: 1;
297274
}
298275

299-
.col-2 {
276+
.page-cheatmd section.col-2 {
300277
column-count: 1;
301278
}
302279
}
303280

304281
@media (max-width: 480px) {
305-
.col-4 > ul > li {
282+
.page-cheatmd section.col-4 > ul > li {
306283
flex: 0 0 50%;
307284
}
308285

309-
.col-6 > ul > li {
286+
.page-cheatmd section.col-6 > ul > li {
310287
flex: 0 0 50%;
311288
}
312289
}

0 commit comments

Comments
 (0)