From 950bf14d955b66858e18fd857248afa89a71b6e0 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Wed, 12 Jan 2022 11:17:44 +0530 Subject: [PATCH] Fix markdown heading formatting Signed-off-by: Ajay Bura --- src/app/molecules/message/Message.scss | 29 ++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/app/molecules/message/Message.scss b/src/app/molecules/message/Message.scss index 8ec29bf..279a246 100644 --- a/src/app/molecules/message/Message.scss +++ b/src/app/molecules/message/Message.scss @@ -303,23 +303,40 @@ // markdown formating .message__body { + & h1, h2, h3, h4, h5, h6 { + margin: 0; + margin-bottom: var(--sp-ultra-tight); + font-weight: var(--fw-medium); + &:first-child { + margin-top: 0; + } + &:last-child { + margin-bottom: 0; + } + } & h1, & h2 { color: var(--tc-surface-high); - margin: var(--sp-loose) 0 var(--sp-normal); - line-height: var(--lh-h1); + margin-top: var(--sp-normal); + font-size: var(--fs-h2); + line-height: var(--lh-h2); + letter-spacing: var(--ls-h2); } & h3, & h4 { color: var(--tc-surface-high); - margin: var(--sp-normal) 0 var(--sp-tight); - line-height: var(--lh-h2); + margin-top: var(--sp-tight); + font-size: var(--fs-s1); + line-height: var(--lh-s1); + letter-spacing: var(--ls-s1); } & h5, & h6 { color: var(--tc-surface-high); - margin: var(--sp-tight) 0 var(--sp-extra-tight); - line-height: var(--lh-s1); + margin-top: var(--sp-extra-tight); + font-size: var(--fs-b1); + line-height: var(--lh-b1); + letter-spacing: var(--ls-b1); } & hr { border-color: var(--bg-divider);