From 8fb9cd6bace87af473310b38a1b0196fbb020dda Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Mon, 6 Aug 2018 15:19:09 +0300 Subject: [PATCH] fix: fix linebreaks in multiparagraph field descriptions --- src/components/Markdown/styled.elements.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/Markdown/styled.elements.ts b/src/components/Markdown/styled.elements.ts index 249f2ecd..512b4531 100644 --- a/src/components/Markdown/styled.elements.ts +++ b/src/components/Markdown/styled.elements.ts @@ -26,16 +26,21 @@ export const StyledMarkdownBlock = withProps<{ dense?: boolean; inline?: boolean line-height: ${props => props.theme.typography.lineHeight}; p { - &:last-of-type { + &:last-child { margin-bottom: 0; } } ${({ dense }) => dense && - ` p { - margin: 0; - }`} + ` + p:first-child { + margin-top: 0; + } + p:last-child { + margin-bottom: 0; + } + `} ${({ inline }) => inline && @@ -108,9 +113,9 @@ export const StyledMarkdownBlock = withProps<{ dense?: boolean; inline?: boolean padding-left: 2em; margin: 0; margin-bottom: 1em; - > li { - margin: 1em 0; - } + // > li { + // margin: 0.5em 0; + // } } table {