From bcaad1ddd2caa822f713f5c0b90b81bb22a23af2 Mon Sep 17 00:00:00 2001 From: Jake Zimmerman Date: Wed, 23 Jun 2021 15:39:18 -0700 Subject: [PATCH] Attempt to make the text tighter around .wide divs --- docs/css/theme.css | 13 ++++++++++++- public/css/theme.css | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/css/theme.css b/docs/css/theme.css index 39c54ca..d3181e9 100644 --- a/docs/css/theme.css +++ b/docs/css/theme.css @@ -260,11 +260,22 @@ h3 + *, h3 + p { margin-top: 0; } /* }}} */ /* ----- Prose --------------------------------------------------------- {{{ */ -p, main > ul, main > ol, div.sourceCode, main > pre, img, table { +/* p, main > ul, main > ol, div.sourceCode, main > pre, img, table { */ +.wide, p, ul, ol, div.sourceCode, :not(.sourceCode) > pre, img, table { margin-top: var(--line-height); margin-bottom: var(--line-height) } +.wide > p, .wide > table, .wide > figure, .wide > div.sourceCode, .wide > pre, .wide > img, .wide > p > img, .wide > figure > img { + margin-top: 0; + margin-bottom: 0; +} + +li > ul:first-of-type { margin-top: 0; } +li > ul:last-of-type { margin-bottom: 0; } +li > ol:first-of-type { margin-top: 0; } +li > ol:last-of-type { margin-bottom: 0; } + ul:not(.task-list) { margin-left: var(--ul-indent-size); } diff --git a/public/css/theme.css b/public/css/theme.css index 39c54ca..d3181e9 100644 --- a/public/css/theme.css +++ b/public/css/theme.css @@ -260,11 +260,22 @@ h3 + *, h3 + p { margin-top: 0; } /* }}} */ /* ----- Prose --------------------------------------------------------- {{{ */ -p, main > ul, main > ol, div.sourceCode, main > pre, img, table { +/* p, main > ul, main > ol, div.sourceCode, main > pre, img, table { */ +.wide, p, ul, ol, div.sourceCode, :not(.sourceCode) > pre, img, table { margin-top: var(--line-height); margin-bottom: var(--line-height) } +.wide > p, .wide > table, .wide > figure, .wide > div.sourceCode, .wide > pre, .wide > img, .wide > p > img, .wide > figure > img { + margin-top: 0; + margin-bottom: 0; +} + +li > ul:first-of-type { margin-top: 0; } +li > ul:last-of-type { margin-bottom: 0; } +li > ol:first-of-type { margin-top: 0; } +li > ol:last-of-type { margin-bottom: 0; } + ul:not(.task-list) { margin-left: var(--ul-indent-size); }