From 95bde7f67ca347671d3422c10784f60adb85c741 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Wed, 7 Dec 2022 22:46:15 +0100 Subject: [PATCH 1/4] [docs] Improve line-height readability --- docs/src/modules/components/MarkdownElement.js | 3 ++- docs/src/modules/components/TopLayoutBlog.js | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/modules/components/MarkdownElement.js b/docs/src/modules/components/MarkdownElement.js index 64664cbcdd7071..e70ec1c36d3f02 100644 --- a/docs/src/modules/components/MarkdownElement.js +++ b/docs/src/modules/components/MarkdownElement.js @@ -10,6 +10,7 @@ import { const Root = styled('div')( ({ theme }) => ({ ...lightTheme.typography.body1, + lineHeight: 1.625, color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`, '& strong': { color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`, @@ -422,7 +423,7 @@ const Root = styled('div')( }, }, '& li': { - marginBottom: 4, + marginBottom: 6, '& pre': { marginTop: theme.spacing(1), }, diff --git a/docs/src/modules/components/TopLayoutBlog.js b/docs/src/modules/components/TopLayoutBlog.js index f5c097bd38fb8b..b258d489d1a894 100644 --- a/docs/src/modules/components/TopLayoutBlog.js +++ b/docs/src/modules/components/TopLayoutBlog.js @@ -143,7 +143,6 @@ const Root = styled('div')( marginBottom: theme.spacing(3), }, '& .markdown-body': { - fontSize: theme.typography.pxToRem(16), lineHeight: 1.7, }, '& img, & video': { From e0b0ec6a14a026307e58b47936d9a04c88f2b602 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sun, 11 Dec 2022 12:33:09 +0100 Subject: [PATCH 2/4] fix regression --- docs/public/static/styles/prism-okaidia.css | 2 +- docs/src/modules/components/MarkdownElement.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/public/static/styles/prism-okaidia.css b/docs/public/static/styles/prism-okaidia.css index 13783c48963b1c..0a01bed2a94acb 100644 --- a/docs/public/static/styles/prism-okaidia.css +++ b/docs/public/static/styles/prism-okaidia.css @@ -16,7 +16,7 @@ pre[class*='language-'] { word-spacing: normal; word-break: normal; word-wrap: normal; - line-height: 1.5; + /* line-height: 1.5; */ /* -moz-tab-size: 4; */ /* -o-tab-size: 4; */ diff --git a/docs/src/modules/components/MarkdownElement.js b/docs/src/modules/components/MarkdownElement.js index e70ec1c36d3f02..8a0646553afe95 100644 --- a/docs/src/modules/components/MarkdownElement.js +++ b/docs/src/modules/components/MarkdownElement.js @@ -17,6 +17,7 @@ const Root = styled('div')( }, wordBreak: 'break-word', '& pre': { + lineHeight: 1.5, margin: theme.spacing(2, 'auto'), padding: theme.spacing(2), backgroundColor: `var(--muidocs-palette-primaryDark-800, ${lightTheme.palette.primaryDark[800]})`, @@ -423,7 +424,7 @@ const Root = styled('div')( }, }, '& li': { - marginBottom: 6, + marginBottom: 4, '& pre': { marginTop: theme.spacing(1), }, From a6b2bf08af9b08b18d9c538f506ce557c658b1e1 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sun, 11 Dec 2022 12:34:28 +0100 Subject: [PATCH 3/4] add comments --- docs/src/modules/components/MarkdownElement.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/modules/components/MarkdownElement.js b/docs/src/modules/components/MarkdownElement.js index 8a0646553afe95..82782b4ecd7509 100644 --- a/docs/src/modules/components/MarkdownElement.js +++ b/docs/src/modules/components/MarkdownElement.js @@ -10,14 +10,14 @@ import { const Root = styled('div')( ({ theme }) => ({ ...lightTheme.typography.body1, - lineHeight: 1.625, + lineHeight: 1.625, // Increased compared to the 1.5 default to make the docs easier to read. color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`, '& strong': { color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`, }, wordBreak: 'break-word', '& pre': { - lineHeight: 1.5, + lineHeight: 1.5, // Developers likes when the code is dense. margin: theme.spacing(2, 'auto'), padding: theme.spacing(2), backgroundColor: `var(--muidocs-palette-primaryDark-800, ${lightTheme.palette.primaryDark[800]})`, From 3a115583c4739fc70b71fcdf74394e075c36a398 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sun, 11 Dec 2022 12:37:20 +0100 Subject: [PATCH 4/4] add one more pixel --- docs/src/modules/components/MarkdownElement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/modules/components/MarkdownElement.js b/docs/src/modules/components/MarkdownElement.js index 82782b4ecd7509..c172864f676d7e 100644 --- a/docs/src/modules/components/MarkdownElement.js +++ b/docs/src/modules/components/MarkdownElement.js @@ -10,7 +10,7 @@ import { const Root = styled('div')( ({ theme }) => ({ ...lightTheme.typography.body1, - lineHeight: 1.625, // Increased compared to the 1.5 default to make the docs easier to read. + lineHeight: 1.5625, // Increased compared to the 1.5 default to make the docs easier to read. color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`, '& strong': { color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,