Skip to content

Commit ecb974e

Browse files
authored
Merge pull request #1777 from ehuss/update-css-footnote
Fix CSS for new footnote style
2 parents 49a9c8c + 31bc41b commit ecb974e

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
merge_group:
55

66
env:
7-
MDBOOK_VERSION: 0.4.43
7+
MDBOOK_VERSION: 0.4.48
88

99
jobs:
1010
code-tests:

theme/reference.css

+9-14
Original file line numberDiff line numberDiff line change
@@ -260,23 +260,18 @@ main > .rule {
260260
grid-column: rules;
261261
}
262262

263-
/* Unset footnote margin,
264-
see below for more information about margins */
265-
/* FIXME: this doesn't work. `unset` can still break the margin of the next element,
266-
and since mdbook applies the margin to `:not(.footnore-definition)`,
267-
it can literally be anything, so there is no way to properly fix it,
268-
without changing mdbook... */
269-
:not(.footnote-definition) + .footnote-definition,
270-
.footnote-definition + :not(.footnote-definition) {
271-
margin-block-start: unset;
263+
hr {
264+
/* For some reason, grid is shrinking this to a point. */
265+
width: 100%;
272266
}
273267

274-
:not(.footnote-definition) + .footnote-definition {
275-
margin-top: calc(2em - 16px);
268+
/* Too much space with the grid.
269+
*/
270+
.footnote-definition {
271+
margin-top: 0;
276272
}
277-
278-
.footnote-definition:has(+ :not(.footnote-definition)) {
279-
margin-bottom: calc(2em - 16px);
273+
.footnote-definition li:first-child > *:first-child {
274+
margin-top: 0;
280275
}
281276

282277
/* This is quite dumb, ugh.

0 commit comments

Comments
 (0)