From 018ed212bc2f827cca3b8213ac23ff4c1117208c Mon Sep 17 00:00:00 2001 From: John Knox Date: Fri, 22 Nov 2019 06:22:31 -0800 Subject: [PATCH] Improve markdown header spacing Summary: The spacing above headings didn't look right. Also workplace purposely limits the different heading sizes to 2 to encourage using notes for large posts. So I'm changing this to match. If we need to have arbitrary depth in future, we can add a `workplaceMode` toggle, but so far that's the only use case we have. Reviewed By: mweststrate Differential Revision: D18638861 fbshipit-source-id: 3949a37515e4282bb8435c2740ef45a55e5a97cc --- src/ui/components/Markdown.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/components/Markdown.tsx b/src/ui/components/Markdown.tsx index c1c74a243..229b7a375 100644 --- a/src/ui/components/Markdown.tsx +++ b/src/ui/components/Markdown.tsx @@ -19,7 +19,8 @@ const Row = styled('div')({ marginBottom: 5, }); const Heading = styled('div')((props: {level: number}) => ({ - fontSize: Math.max(10, 20 - (props.level - 1) * 4), + fontSize: props.level === 1 ? 25 : 18, + marginTop: 10, marginBottom: 10, fontWeight: 'bold', }));