Skip to content

Commit 73970b8

Browse files
author
Stefanie Hein
committed
Markdown: use CSS variables for markdown color work so we can override this in certain places, e.g. when markdown is rendered on an already gray "pane" background as in plugin manager > "Readme"-Tab. See #77960
1 parent 1a8b7f6 commit 73970b8

1 file changed

Lines changed: 19 additions & 13 deletions

File tree

src/scss/themes/fylr/components/_labels.scss

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,17 @@ label[data-label-clickable],
408408
word-break: keep-all;
409409

410410
tbody tr:nth-child(odd) {
411-
background-color: $gray-100;
411+
background-color: var(--markdown-darker-100, #{$gray-100});
412+
413+
code {
414+
--markdown-darker-100: var(--gray-300);
415+
--markdown-code-border-color: var(--gray-400);
416+
}
412417
}
413418

414419
td, th {
415-
padding: $spacer-xs $spacer-sm;
416-
border: 1px solid $gray-200;
420+
padding: $spacer-sm;
421+
border: 1px solid var(--markdown-darker-300, #{$gray-200});
417422
}
418423

419424
th {
@@ -428,35 +433,36 @@ label[data-label-clickable],
428433

429434
blockquote {
430435
padding: $spacer-xs $spacer-sm;
431-
border-left: 5px solid $gray-300;
436+
border-left: 5px solid var(--markdown-darker-300, #{$gray-300});
432437
}
433438

434439
code {
435-
border: none;
436-
background: $light;
440+
border: 1px solid var(--markdown-code-border-color, transparent);
441+
background: var(--markdown-darker-100, #{$gray-100});
437442
white-space: pre-wrap;
438443
padding: 0 $spacer-xs;
439444
border-radius: $border-radius-sm;
445+
font-size: var(--font-size-sm); // matches font-size-base on this font
440446
}
441447

442448
pre {
443-
padding: $spacer;
444-
background: $light;
449+
padding: $spacer-sm $spacer;
450+
background: var(--markdown-darker-100, #{$gray-100});
445451
white-space: pre-wrap;
446-
border-radius: $border-radius;
447-
border: none;
448452
overflow: auto;
449453
-webkit-overflow-scrolling: touch;
450-
454+
451455
code {
452456
padding: 0;
453457
border-radius: 0;
458+
border: none;
459+
background: none;
454460
}
455461
}
456462

457463
hr {
458-
margin-top: $spacer-sm;
459-
margin-bottom: $spacer-sm;
464+
margin-top: $spacer;
465+
margin-bottom: $spacer;
460466
border: 0;
461467
border-top: $hr-border-width solid $body-color;
462468
}

0 commit comments

Comments
 (0)