summaryrefslogtreecommitdiffstats
path: root/web_src/css/markup/content.css
blob: 947480a7e889ed2a4e99365cc57bc6b238719e4e (plain)
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
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
.markup {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.5 !important;
  word-wrap: break-word;
}

.markup > *:first-child {
  margin-top: 0 !important;
}

.markup > *:last-child {
  margin-bottom: 0 !important;
}

.markup a:not([href]) {
  color: inherit;
  text-decoration: none;
}

.markup .absent {
  color: var(--color-red);
}

.markup .anchor {
  float: left;
  padding-right: 4px;
  margin-left: -20px;
  color: inherit;
}

.markup .anchor .svg {
  vertical-align: middle;
}

.markup .anchor:focus {
  outline: none;
}

.markup h1 .anchor {
  margin-top: -2px; /* re-align to center */
}

.markup h1 .anchor .svg,
.markup h2 .anchor .svg,
.markup h3 .anchor .svg,
.markup h4 .anchor .svg,
.markup h5 .anchor .svg,
.markup h6 .anchor .svg {
  visibility: hidden;
}

.markup h1:hover .anchor .svg,
.markup h2:hover .anchor .svg,
.markup h3:hover .anchor .svg,
.markup h4:hover .anchor .svg,
.markup h5:hover .anchor .svg,
.markup h6:hover .anchor .svg {
  visibility: visible;
}

.markup h2 .anchor .svg,
.markup h3 .anchor .svg,
.markup h4 .anchor .svg {
  position: relative;
  top: -2px;
}

.markup h1,
.markup h2,
.markup h3,
.markup h4,
.markup h5,
.markup h6 {
  margin-top: 24px !important;
  margin-bottom: 16px;
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;
}

.markup h1 tt,
.markup h1 code,
.markup h2 tt,
.markup h2 code,
.markup h3 tt,
.markup h3 code,
.markup h4 tt,
.markup h4 code,
.markup h5 tt,
.markup h5 code,
.markup h6 tt,
.markup h6 code {
  font-size: inherit;
}

.markup h1 {
  padding-bottom: 0.3em;
  font-size: 2em;
  border-bottom: 1px solid var(--color-secondary);
}

.markup h2 {
  padding-bottom: 0.3em;
  font-size: 1.5em;
  border-bottom: 1px solid var(--color-secondary);
}

.markup h3 {
  font-size: 1.25em;
}

.markup h4 {
  font-size: 1em;
}

.markup h5 {
  font-size: 0.875em;
}

.markup h6 {
  font-size: 0.85em;
  color: var(--color-text-light-2);
}

.markup p,
.markup blockquote,
.markup details,
.markup ul,
.markup ol,
.markup dl,
.markup table,
.markup pre {
  margin-top: 0;
  margin-bottom: 16px;
}

.markup hr {
  height: 4px;
  padding: 0;
  margin: 16px 0;
  background-color: var(--color-secondary);
  border: 0;
}

.markup ul,
.markup ol {
  padding-left: 2em;
}

.markup ul.no-list,
.markup ol.no-list {
  padding: 0;
  list-style-type: none;
}

.markup .task-list-item {
  list-style-type: none;
}

.markup .task-list-item p + ul {
  margin-top: 16px;
}

.markup .task-list-item input[type="checkbox"] {
  margin: 0 .3em .25em -1.4em;
  vertical-align: middle;
  padding: 0;
}

.markup .task-list-item input[type="checkbox"] + p {
  margin-left: -0.2em;
  display: inline;
}

.markup .task-list-item > p {
  margin-inline: 16px;
}

.markup .task-list-item + .task-list-item {
  margin-top: 4px;
}

.markup input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: relative;
  border: 1px solid var(--color-secondary);
  border-radius: var(--border-radius);
  background: var(--color-input-background);
  height: 14px;
  width: 14px;
  opacity: 1 !important; /* override fomantic on edit preview */
  pointer-events: auto !important; /* override fomantic on edit preview */
  vertical-align: middle !important; /* override fomantic on edit preview */
  -webkit-print-color-adjust: exact;
  color-adjust: exact;
}

.markup input[type="checkbox"]:not([disabled]):hover,
.markup input[type="checkbox"]:not([disabled]):active {
  border-color: var(--color-primary);
}

.markup input[type="checkbox"]::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--color-text);
  mask-size: cover;
  -webkit-mask-size: cover;
}

.markup input[type="checkbox"]:checked::after {
  content: "";
  mask-image: var(--checkbox-mask-checked);
  -webkit-mask-image: var(--checkbox-mask-checked);
  -webkit-print-color-adjust: exact;
  color-adjust: exact;
}

.markup input[type="checkbox"]:indeterminate::after {
  content: "";
  mask-image: var(--checkbox-mask-indeterminate);
  -webkit-mask-image: var(--checkbox-mask-indeterminate);
}

.markup ul ul,
.markup ul ol,
.markup ol ol,
.markup ol ul {
  margin-top: 0;
  margin-bottom: 0;
}

.markup ol ol,
.markup ul ol {
  list-style-type: lower-roman;
}

.markup li > p {
  margin-top: 16px;
}

.markup li + li {
  margin-top: 0.25em;
}

.markup dl {
  padding: 0;
}

.markup dl dt {
  padding: 0;
  margin-top: 16px;
  font-size: 1em;
  font-style: italic;
  font-weight: var(--font-weight-semibold);
}

.markup dl dd {
  padding: 0 16px;
  margin-bottom: 16px;
}

.markup blockquote {
  margin-left: 0;
  padding: 0 15px;
  color: var(--color-text-light-2);
  border-left: 0.25em solid var(--color-secondary);
}

.markup blockquote > :first-child {
  margin-top: 0;
}

.markup blockquote > :last-child {
  margin-bottom: 0;
}

.markup table {
  display: block;
  width: 100%;
  width: max-content;
  max-width: 100%;
  overflow: auto;
}

.markup table th {
  font-weight: var(--font-weight-semibold);
}

.markup table th,
.markup table td {
  padding: 6px 13px !important;
  border: 1px solid var(--color-secondary) !important;
}

.markup table tr {
  border-top: 1px solid var(--color-secondary);
}

.markup table tr:nth-child(2n) {
  background-color: var(--color-markup-table-row);
}

.markup img,
.markup video {
  max-width: 100%;
  box-sizing: initial;
}

/* this background ensures images can break <hr>. We can only do this on
   cases where the background is known and not transparent. */
.markup.file-view img,
.markup.file-view video,
.comment-body .markup img, /* regular comment */
.comment-body .markup video,
.comment-content .markup img, /* code comment */
.comment-content .markup video,
.wiki .markup img,
.wiki .markup video {
  background: var(--color-box-body);
}

.markup img[align="right"],
.markup video[align="right"] {
  padding-left: 20px;
}

.markup img[align="left"],
.markup video[align="left"] {
  padding-right: 28px;
}

.markup .emoji {
  max-width: none;
  vertical-align: text-top;
}

.markup span.frame {
  display: block;
  overflow: hidden;
}

.markup span.frame > span {
  display: block;
  float: left;
  width: auto;
  padding: 7px;
  margin: 13px 0 0;
  overflow: hidden;
  border: 1px solid var(--color-secondary);
}

.markup span.frame span img,
.markup span.frame span video {
  display: block;
  float: left;
}

.markup span.frame span span {
  display: block;
  padding: 5px 0 0;
  clear: both;
  color: var(--color-text);
}

.markup span.align-center {
  display: block;
  overflow: hidden;
  clear: both;
}

.markup span.align-center > span {
  display: block;
  margin: 13px auto 0;
  overflow: hidden;
  text-align: center;
}

.markup span.align-center span img
.markup span.align-center span video {
  margin: 0 auto;
  text-align: center;
}

.markup span.align-right {
  display: block;
  overflow: hidden;
  clear: both;
}

.markup span.align-right > span {
  display: block;
  margin: 13px 0 0;
  overflow: hidden;
  text-align: right;
}

.markup span.align-right span img,
.markup span.align-right span video {
  margin: 0;
  text-align: right;
}

.markup span.float-left {
  display: block;
  float: left;
  margin-right: 13px;
  overflow: hidden;
}

.markup span.float-left span {
  margin: 13px 0 0;
}

.markup span.float-right {
  display: block;
  float: right;
  margin-left: 13px;
  overflow: hidden;
}

.markup span.float-right > span {
  display: block;
  margin: 13px auto 0;
  overflow: hidden;
  text-align: right;
}

.markup code,
.markup tt {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  white-space: break-spaces;
  background-color: var(--color-markup-code-inline);
  border-radius: var(--border-radius);
}

.markup code br,
.markup tt br {
  display: none;
}

.markup del code {
  text-decoration: inherit;
}

.markup pre > code,
.markup .file-preview code {
  padding: 0;
  margin: 0;
  font-size: 100%;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: break-word;
  background: transparent;
  border: 0;
}

.markup .highlight {
  margin-bottom: 16px;
}

.markup .highlight pre,
.markup pre {
  padding: 16px;
  font-size: 85%;
  line-height: 1.45;
  background-color: var(--color-markup-code-block);
  border-radius: var(--border-radius);
}

.markup .highlight pre {
  margin-bottom: 0;
  word-break: normal;
}

.markup pre {
  word-wrap: normal;
}

.markup pre code,
.markup pre tt {
  display: inline;
  padding: 0;
  line-height: inherit;
  word-wrap: normal;
  background-color: transparent;
  border: 0;
}

.markup pre code::before,
.markup pre code::after,
.markup pre tt::before,
.markup pre tt::after {
  content: normal;
}

.markup kbd {
  display: inline-block;
  padding: 3px 5px;
  font-size: 11px;
  line-height: 10px;
  color: var(--color-text-light);
  vertical-align: middle;
  background-color: var(--color-markup-code-inline);
  border: 1px solid var(--color-secondary);
  border-radius: var(--border-radius);
  box-shadow: inset 0 -1px 0 var(--color-secondary);
}

.markup .ui.list .list,
.markup ol.ui.list ol,
.markup ul.ui.list ul {
  padding-left: 2em;
}

.file-revisions-btn {
  display: block;
  float: left;
  margin-bottom: 2px !important;
  padding: 11px !important;
  margin-right: 10px !important;
}

.file-revisions-btn i {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.markup-render {
  display: block;
  border: none;
  width: 100%;
  height: var(--height-loading); /* actual height is set in JS after loading */
  overflow: hidden;
  color-scheme: normal; /* match the value inside the iframe to allow it to become transparent */
}

.markup-block-error {
  display: block !important; /* override fomantic .ui.form .error.message {display: none} */
  border: none !important;
  margin-bottom: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  box-shadow: none !important;
  font-size: 85% !important;
  white-space: pre-wrap !important;
  padding: 0.5rem 1rem !important;
  text-align: left !important;
}

.markup-block-error + pre {
  border-top: none !important;
  margin-top: 0 !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.file-view.markup.orgmode li.unchecked::before {
  content: "[ ] ";
}

.file-view.markup.orgmode li.checked::before {
  content: "[x] ";
}

.file-view.markup.orgmode li.indeterminate::before {
  content: "[-] ";
}

/* This is only needed for <p> because they are literally acting as paragraphs,
 * and thus having an ::before on the same line would force the paragraph to
 * move to the next line. This can be avoided by an inline-block display that
 * avoids that property while still having the other properties of the block
 * display. */
.file-view.markup.orgmode li.unchecked > p,
.file-view.markup.orgmode li.checked > p,
.file-view.markup.orgmode li.indeterminate > p {
  display: inline-block;
}