fix(quarto): keep slide margins, list numbers, and column widths in civilytics-reveal

Print-to-PDF restores a 32px 56px section padding (full-bleed slides are
left alone), ordered lists get room for two-digit markers, and columns
with a Quarto width keep it while unsized columns stay equal. The default
column gap drops from 3em to 1.5em.

Closes #25
Closes #26
Closes #27

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
jaredandClaude Sonnet 5.5 committed 2026-10-15 15:27:54 -04:00
1 parent 76aebe2b49
commit 4f697e2d52
1 file changed
+20 -2
@@ -209,7 +209,11 @@ $code-color: #923D00 !default;
height: 2px; height: 2px;
background: var(--accent-600); background: var(--accent-600);
} }
.reveal ol { list-style: decimal; } .reveal ol {
list-style: decimal;
/* Room for two-digit markers in the bold mono face (#27) */
padding-left: 1.6em;
}
.reveal ol > li::marker { .reveal ol > li::marker {
color: var(--accent-600); color: var(--accent-600);
font-family: var(--font-mono); font-family: var(--font-mono);
@@ -747,7 +751,7 @@ img.civilytics-wordmark,
----------------------------------------------------------- */ ----------------------------------------------------------- */
.reveal .columns { .reveal .columns {
display: flex; display: flex;
gap: 3em; gap: 1.5em;
align-items: flex-start; align-items: flex-start;
margin: 0.25em 0; margin: 0.25em 0;
} }
@@ -755,6 +759,11 @@ img.civilytics-wordmark,
flex: 1; flex: 1;
min-width: 0; min-width: 0;
} }
/* Quarto writes width="60%" as an inline style; honor it (#26). Columns
without a width stay equal. */
.reveal .column[style*="width"] {
flex: 0 1 auto;
}
.reveal .column > :first-child { margin-top: 0; } .reveal .column > :first-child { margin-top: 0; }
/* Hand-rolled two-col for pandoc (non-Quarto) users */ /* Hand-rolled two-col for pandoc (non-Quarto) users */
@@ -1040,6 +1049,15 @@ body.civilytics-hide-chrome .slide-number {
.reveal section { break-inside: avoid; } .reveal section { break-inside: avoid; }
} }
/* reveal.js print-pdf zeroes section padding with !important, so the screen
padding is lost. Restore a smaller print value; 48px 72px pushed dense
slides onto extra pages (#25). */
html.print-pdf .reveal .slides section:not(.full-bleed):not(.stack),
html.reveal-print .reveal .slides section:not(.full-bleed):not(.stack) {
padding: 32px 56px !important;
box-sizing: border-box !important;
}
/* ----------------------------------------------------------- /* -----------------------------------------------------------
SMALL-SCREEN GUARDRAILS SMALL-SCREEN GUARDRAILS
Reveal scales slides, but the narrowest keep-legible margins. Reveal scales slides, but the narrowest keep-legible margins.