fix markdown preview on publish page

This commit is contained in:
btzr-io 2018-05-30 12:12:54 -06:00
parent 3ea6b987ff
commit 6c91e8cbf2
5 changed files with 45 additions and 48 deletions

View file

@ -12,6 +12,7 @@ $large-breakpoint: 1760px;
--side-nav-width: 220px; --side-nav-width: 220px;
--side-nav-width-m: 240px; --side-nav-width-m: 240px;
--side-nav-width-l: 320px; --side-nav-width-l: 320px;
--font-size-subtext-multiple: 0.92;
--video-aspect-ratio: 56.25%; // 9 x 16 --video-aspect-ratio: 56.25%; // 9 x 16
--snack-bar-width: 756px; --snack-bar-width: 756px;

View file

@ -198,7 +198,6 @@
padding-top: $spacing-vertical * 1/3; padding-top: $spacing-vertical * 1/3;
word-break: break-word; word-break: break-word;
font-family: 'metropolis-medium'; font-family: 'metropolis-medium';
font-size: 13px;
} }
.card__actions { .card__actions {

View file

@ -45,8 +45,9 @@ div.editor-toolbar a {
} }
.editor-preview { .editor-preview {
background: var(--card-bg) !important; font-size: calc(var(--font-size-subtext-multiple) * 1em);
border: 0 !important; background: var(--color-bg) !important;
border: 0;
} }
.editor-preview-side { .editor-preview-side {
@ -54,18 +55,6 @@ div.editor-toolbar a {
border: 1px solid var(--input-border-color) !important; border: 1px solid var(--input-border-color) !important;
} }
.editor-preview pre,
.editor-preview-side pre {
background: #eee;
}
.editor-preview table td,
.editor-preview table th,
.editor-preview-side table td,
.editor-preview-side table th {
border: 1px solid var(--input-border-color) !important;
}
.CodeMirror .CodeMirror-code .cm-tag { .CodeMirror .CodeMirror-code .cm-tag {
color: #63a35c; color: #63a35c;
} }

View file

@ -1,7 +1,8 @@
.editor-preview,
.markdown-preview { .markdown-preview {
margin: 0; margin: 0;
/* Headings: title */ /* Headers */
h1, h1,
h2, h2,
h3, h3,
@ -36,13 +37,19 @@
font-size: 0.84em; font-size: 0.84em;
color: var(--color-help); color: var(--color-help);
} }
}
.markdown-preview p { /* Paragraphs */
p {
white-space: pre-line; white-space: pre-line;
} }
.markdown-preview table { /* Strikethrough text */
del {
color: var(--color-help);
}
/* Tables */
table {
padding: 8px; padding: 8px;
margin: 16px 0; margin: 16px 0;
background-color: var(--card-bg); background-color: var(--card-bg);
@ -55,9 +62,15 @@
tr th:last-of-type { tr th:last-of-type {
padding: 8px; padding: 8px;
} }
} }
.markdown-preview code { /* Horizontal Rule */
hr {
border: 1px solid var(--color-divider);
}
/* Code */
code {
display: block; display: block;
padding: 8px; padding: 8px;
margin: 16px 0; margin: 16px 0;
@ -65,14 +78,7 @@
color: var(--color-help); color: var(--color-help);
font-size: 1em; font-size: 1em;
font-family: Consolas, 'Lucida Console', 'Source Sans', monospace; font-family: Consolas, 'Lucida Console', 'Source Sans', monospace;
} }
.markdown-preview hr {
border: 1px solid var(--color-divider);
}
.markdown-preview del {
color: var(--color-help);
} }
blockquote { blockquote {

View file

@ -1,4 +1,5 @@
table.table, table.table,
.editor-preview table,
.markdown-preview table { .markdown-preview table {
word-wrap: break-word; word-wrap: break-word;
max-width: 100%; max-width: 100%;
@ -28,6 +29,7 @@ table.table,
th { th {
font-family: 'metropolis-semibold'; font-family: 'metropolis-semibold';
border: 0;
} }
td { td {