From 8fdbf265cee28274632ab60110ed24a37dd9cb66 Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Fri, 30 Jun 2023 01:24:10 +0200 Subject: [PATCH] Improve markdown style --- css/dialogs.css | 4 +--- css/general.css | 30 ++++++++++++++++++++++++++++++ css/setup.css | 5 ++--- js/plugin_loader.js | 1 - 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/css/dialogs.css b/css/dialogs.css index 92e8816f..75d6270b 100644 --- a/css/dialogs.css +++ b/css/dialogs.css @@ -218,9 +218,6 @@ color: var(--color-light); } - .dialog p { - margin: 4px 0; - } .dialog h3 { margin-left: 0; } @@ -1288,6 +1285,7 @@ dialog#edit_bedrock_binding > .dialog_wrapper > .dialog_content { font-size: 15px; padding: 1px 6px; border-radius: 5px; + letter-spacing: normal; } #plugin_list .about { overflow-y: auto; diff --git a/css/general.css b/css/general.css index 8362ae1e..cec4e3e0 100644 --- a/css/general.css +++ b/css/general.css @@ -283,9 +283,19 @@ @-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } } @keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } } /*Markdown*/ + .markdown h1 { + margin: 8px 0 8px 0; + } + .markdown h2 { + margin: 14px 0 8px 0; + } + .markdown p { + margin: 12px 0; + } .markdown li { list-style: initial; cursor: inherit; + margin: 8px 0; } .markdown ul { padding-left: 24px; @@ -313,6 +323,26 @@ user-select: text; -webkit-user-select: text; } + blockquote { + border-left: 4px solid var(--color-accent); + padding: 4px; + padding-left: 16px; + background: var(--color-back); + } + .markdown table { + border: 1px solid var(--color-border); + background: var(--color-back); + } + .markdown th { + padding: 4px; + } + .markdown td { + padding: 3px 4px; + border-top: 1px solid var(--color-border); + } + .markdown img { + max-width: 100%; + } /*Actions*/ .toolbar { diff --git a/css/setup.css b/css/setup.css index a4911e3f..ea5ae63e 100644 --- a/css/setup.css +++ b/css/setup.css @@ -402,8 +402,9 @@ } h1, h2, h3, h4, h5, h6 { font-family: var(--font-headline); + margin: 12px 0 8px 0; } - h2 { + h1 { letter-spacing: -0.03em; } h2 { @@ -411,13 +412,11 @@ margin: 0; } h3 { - display: inline-block; font-size: 1.28em; padding-bottom: 4px; font-weight: inherit; margin-left: 16px; min-width: 10px; - height: 32px; } h4 { font-size: 1.2em; diff --git a/js/plugin_loader.js b/js/plugin_loader.js index a0f1dcc0..512fcc00 100644 --- a/js/plugin_loader.js +++ b/js/plugin_loader.js @@ -683,7 +683,6 @@ BARS.defineActions(function() { } }, formatAbout(about) { - about = about.replace(/\n/g, '\n\n').replace(/\n#/, '\n##'); return pureMarked(about); }, getIconNode: Blockbench.getIconNode,