From 4f697e2d528b6e21621999ae2125bdb9326b7694 Mon Sep 17 00:00:00 2001 From: Jared Knowles Date: Thu, 15 Oct 2026 15:27:54 -0400 Subject: [PATCH] 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 --- .../civilytics-reveal/civilytics.scss | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/inst/quarto/extensions/civilytics-reveal/civilytics.scss b/inst/quarto/extensions/civilytics-reveal/civilytics.scss index c3921d9..078e4f7 100644 --- a/inst/quarto/extensions/civilytics-reveal/civilytics.scss +++ b/inst/quarto/extensions/civilytics-reveal/civilytics.scss @@ -209,7 +209,11 @@ $code-color: #923D00 !default; height: 2px; 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 { color: var(--accent-600); font-family: var(--font-mono); @@ -747,7 +751,7 @@ img.civilytics-wordmark, ----------------------------------------------------------- */ .reveal .columns { display: flex; - gap: 3em; + gap: 1.5em; align-items: flex-start; margin: 0.25em 0; } @@ -755,6 +759,11 @@ img.civilytics-wordmark, flex: 1; 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; } /* 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.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 Reveal scales slides, but the narrowest keep-legible margins.