Skip to content

Commit bcaad1d

Browse files
committed
Attempt to make the text tighter around .wide divs
1 parent 066540e commit bcaad1d

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

docs/css/theme.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,22 @@ h3 + *, h3 + p { margin-top: 0; }
260260
/* }}} */
261261
/* ----- Prose --------------------------------------------------------- {{{ */
262262

263-
p, main > ul, main > ol, div.sourceCode, main > pre, img, table {
263+
/* p, main > ul, main > ol, div.sourceCode, main > pre, img, table { */
264+
.wide, p, ul, ol, div.sourceCode, :not(.sourceCode) > pre, img, table {
264265
margin-top: var(--line-height);
265266
margin-bottom: var(--line-height)
266267
}
267268

269+
.wide > p, .wide > table, .wide > figure, .wide > div.sourceCode, .wide > pre, .wide > img, .wide > p > img, .wide > figure > img {
270+
margin-top: 0;
271+
margin-bottom: 0;
272+
}
273+
274+
li > ul:first-of-type { margin-top: 0; }
275+
li > ul:last-of-type { margin-bottom: 0; }
276+
li > ol:first-of-type { margin-top: 0; }
277+
li > ol:last-of-type { margin-bottom: 0; }
278+
268279
ul:not(.task-list) {
269280
margin-left: var(--ul-indent-size);
270281
}

public/css/theme.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,22 @@ h3 + *, h3 + p { margin-top: 0; }
260260
/* }}} */
261261
/* ----- Prose --------------------------------------------------------- {{{ */
262262

263-
p, main > ul, main > ol, div.sourceCode, main > pre, img, table {
263+
/* p, main > ul, main > ol, div.sourceCode, main > pre, img, table { */
264+
.wide, p, ul, ol, div.sourceCode, :not(.sourceCode) > pre, img, table {
264265
margin-top: var(--line-height);
265266
margin-bottom: var(--line-height)
266267
}
267268

269+
.wide > p, .wide > table, .wide > figure, .wide > div.sourceCode, .wide > pre, .wide > img, .wide > p > img, .wide > figure > img {
270+
margin-top: 0;
271+
margin-bottom: 0;
272+
}
273+
274+
li > ul:first-of-type { margin-top: 0; }
275+
li > ul:last-of-type { margin-bottom: 0; }
276+
li > ol:first-of-type { margin-top: 0; }
277+
li > ol:last-of-type { margin-bottom: 0; }
278+
268279
ul:not(.task-list) {
269280
margin-left: var(--ul-indent-size);
270281
}

0 commit comments

Comments
 (0)