forked from webpack/webpack.js.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMarkdown.css
More file actions
457 lines (382 loc) · 7.83 KB
/
Markdown.css
File metadata and controls
457 lines (382 loc) · 7.83 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
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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
@reference "tailwindcss";
@reference "../../styles/theme.css";
@import "./prism-theme.css";
/*
Local constants (previously Sass variables):
$bannerHeight: 56px
$navigationHeight: 56px
$navigationSubHeight: 28px
$someExtraHeight: 10px
$topHeightDesktop: 94px (56 + 28 + 10)
$topHeightMobile: 56px
*/
.markdown {
@apply leading-normal;
h1 {
@apply text-4xl;
}
h2 {
@apply text-3xl;
}
h3 {
@apply text-2xl;
}
h4 {
@apply text-xl;
}
h5 {
@apply text-base;
}
h6 {
@apply text-sm;
}
h2,
h3,
h4,
h5,
h6 {
> span[id] {
@apply absolute w-0 block invisible pointer-events-none pt-14 -mt-14;
@media (min-width: 768px) {
@apply pt-[94px] -mt-[94px];
}
}
}
h1,
h2,
h3,
h4,
h5,
h6 {
@apply block font-semibold text-heading-dark leading-[1.4];
font-family:
"Source Serif Pro", ui-serif, Georgia, Cambria, "Times New Roman", Times,
serif;
margin: 0 0 0.25em;
word-break: break-word;
tt,
code {
font-size: 90%;
color: inherit;
}
a[aria-hidden="true"] {
@apply ml-2 text-[0.8em] h-[1em] opacity-0 invisible;
transition: all 250ms;
}
&:hover a[aria-hidden="true"] {
@apply opacity-100 visible;
}
}
h1:first-child {
margin: 0;
@apply leading-none;
}
p,
blockquote,
aside,
table,
pre {
@apply my-[1em];
}
ul,
ol,
dl {
@apply mt-[0.5em] mb-[1em];
}
li {
@apply my-[0.5em];
}
hr {
@apply border-none bg-gray-200 h-[3px] my-[2em];
}
ul,
ol {
@apply pl-[30px];
list-style: revert;
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
dl {
dt {
@apply text-base font-bold italic mt-[15px] mb-[5px];
&:first-child {
padding: 0;
}
}
dd {
@apply mb-[15px] px-[15px];
}
dt,
dd {
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
}
}
aside {
@apply border-l-4 border-solid border-l-aside-border py-[0.75em] px-[1em] text-gray-500;
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
&.tip,
&.warning,
&.preview,
&.todo {
@apply border-l-[3px];
.tip-content {
@apply italic;
}
code {
color: inherit;
}
> .tip__prefix,
> .warning__prefix,
> .preview__prefix,
> .todo__prefix {
@apply capitalize font-semibold block text-base text-aside-prefix mb-[0.25em];
}
}
&.tip {
@apply bg-aside-tip-bg text-aside-tip-text border-l-aside-tip-border;
}
&.warning {
@apply bg-aside-warning-bg text-aside-warning-text border-l-aside-warning-border;
}
&.preview {
@apply bg-gray-100 text-aside-warning-text border-l-brand-blue;
}
&.todo {
@apply bg-aside-todo-bg text-aside-todo-text border-l-aside-todo-border;
.tip-content::before {
content: "[TODO]: ";
font-style: normal;
}
}
}
blockquote {
@apply border-l-4 border-solid border-l-aside-border py-[0.75em] px-[1em] text-gray-500 italic;
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
}
table {
@apply my-[1em];
@media (min-width: 768px) {
@apply block overflow-x-auto overflow-y-hidden;
}
p {
margin: 0;
}
code {
padding-top: 0;
}
}
thead {
@apply hidden;
@media (min-width: 768px) {
display: table-header-group;
}
}
th {
@apply font-bold text-left py-1.5 px-3 bg-table-header-bg border-r border-solid border-r-table-border;
&:last-child {
@apply border-r-0;
}
}
tr {
@apply border border-solid border-table-border block mb-2.5;
&:nth-child(2n) {
@apply bg-table-row-alt;
}
&:last-child {
@apply border-b border-b-table-border;
}
@media (min-width: 768px) {
@apply mb-0;
display: table-row;
}
}
td {
@apply py-1 px-3 border-r-0 grid grid-cols-2 text-left border-b border-solid border-b-gray-100;
&::before {
content: attr(data-th);
@apply font-bold;
}
&:last-child {
@apply border-b-0;
}
@media (min-width: 768px) {
display: table-cell;
@apply py-3.5 px-[22px];
text-align: unset;
&::before {
content: none;
}
@apply border-r border-r-table-border border-b-0;
&:last-child {
@apply border-r-0;
}
}
}
img:not([class*="support__"]) {
@apply max-w-full h-auto;
}
b,
strong {
font-weight: 600;
}
i,
em {
@apply italic;
}
code,
tt {
font-family:
"Source Code Pro", Consolas, "Liberation Mono", Menlo, Courier, monospace;
@apply text-[90%] mx-0.5 py-0.5 px-1.5 whitespace-normal bg-[rgba(70,94,105,0.05)] rounded-[3px];
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
a {
@apply text-brand-link;
text-decoration: no underline;
text-underline-offset: 2px;
text-decoration-thickness: 1px;
}
a:hover {
@apply text-brand-link-hover;
}
pre {
@apply bg-code-pre-bg text-code-pre-text p-4 pr-14 rounded-[3px] text-sm leading-normal overflow-auto;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
code {
@apply m-0 p-0 whitespace-pre border-none bg-transparent text-code-token;
font-family: monospace;
text-shadow: 0 1px 0 rgba(22, 31, 35, 0.5);
.code-details-summary-span {
@apply -ml-[15px] cursor-pointer;
&::after {
content: "›";
@apply float-left relative -left-0.5 text-center text-code-link text-base;
}
}
a {
border-bottom: 1px dotted;
@apply border-b-code-anchor-border;
}
.code-link {
@apply relative;
&:hover {
@apply text-code-link-hover;
}
}
}
code,
tt {
@apply bg-transparent border-none;
}
}
p {
code,
tt {
@apply max-w-full overflow-auto;
line-height: initial;
margin: 0;
}
}
span {
code,
tt {
@apply whitespace-pre-line;
}
}
h2 {
@apply mt-[2em];
}
h2:first-child {
@apply mt-[1em];
}
h2 + h3 {
@apply mt-[0.5em];
}
h3 {
@apply mt-[1.5em];
}
}
.dark .markdown h1,
.dark .markdown h2,
.dark .markdown h3,
.dark .markdown h4,
.dark .markdown h5,
.dark .markdown h6 {
@apply text-dark-heading;
}
.dark .markdown code,
.dark .markdown tt {
text-shadow: none;
@apply bg-dark-code-inline-bg;
}
.dark .markdown blockquote {
@apply border-l-dark-section-border text-dark-muted;
}
.dark .markdown blockquote.tip {
@apply bg-dark-aside-tip-bg text-dark-aside-tip-text;
}
.dark .markdown blockquote.warning {
@apply bg-dark-aside-warning-bg text-dark-aside-warning-text;
}
.dark .markdown blockquote.todo {
@apply bg-dark-aside-todo-bg text-dark-aside-todo-text;
}
.dark .markdown hr {
@apply bg-dark-section-border;
}
.dark .markdown th {
@apply bg-dark-bg border-dark-border;
}
.dark .markdown tr,
.dark .markdown tr:last-child {
@apply border-dark-border;
}
.dark .markdown tr:nth-child(2n) {
@apply bg-dark-surface;
}
.dark .markdown td {
@apply border-dark-border;
}
.dark .markdown pre {
@apply bg-dark-code-bg;
}
.dark .markdown pre code {
@apply bg-transparent;
}
.dark .markdown a {
@apply text-dark-link;
}
.dark .markdown a:hover {
@apply text-dark-link-hover;
}
.dark .markdown aside.tip,
.dark .markdown aside.warning,
.dark .markdown aside.preview,
.dark .markdown aside.todo {
@apply bg-dark-surface-2 text-white;
}
.dark .markdown aside.tip > .tip__prefix,
.dark .markdown aside.warning > .warning__prefix,
.dark .markdown aside.preview > .preview__prefix,
.dark .markdown aside.todo > .todo__prefix {
@apply text-white;
}