ids theme: adaptive vertical centering of slide content
Slides with little content look lost when everything is glued below the
title bar, while packed slides must start at the top. reveal.js' own
center option cannot express this -- it also vertically centers the
headings.
Instead the template groups each slide's body content (everything after
the heading block except speaker notes) into a div.ids-slide-content,
and the theme turns such slides into flex columns of full slide height:
the heading block stays pinned to the top and the wrapper's auto margins
center the content in the remaining space. Auto margins collapse to zero
when there is no free space, so packed slides still start directly below
the heading and overflow downwards exactly as before -- no measuring and
no resize handling involved. The wrapper also reserves the footer band
(--ids-footer-reserve, published from the actual footer height in slide
coordinates), so centered content never covers the footer; slides too
packed to fit above it may, as they always could.
Heading-only section-divider slides keep their dedicated centered-title
layout, the transcript view treats the wrapper transparently, and the
new rules are screen-scoped so the pdf export keeps laying out slides
itself.
Change-Id: Iccfbebebbf18ec860c1ccd950043a84f638c33da
diff --git a/R/revealjs_presentation.R b/R/revealjs_presentation.R
index 047bda3..d93e617 100644
--- a/R/revealjs_presentation.R
+++ b/R/revealjs_presentation.R
@@ -94,6 +94,21 @@
#' The function [slide_timing()] computes these totals directly from an
#' `.Rmd` source file without rendering it.
#'
+#' ## Vertical content centering
+#'
+#' Slides with little content look lost when everything is glued below the
+#' title bar, while packed slides must start at the top. reveal.js' own
+#' `center` option cannot express this -- it also vertically centers the
+#' headings. Instead, the body content of each slide (everything after the
+#' heading block except speaker notes) is grouped and, whenever there is
+#' free space, centered in the area between the heading and the footer:
+#' slides that are too packed simply start directly below the heading and
+#' overflow downwards, exactly as before. Centered content never reaches
+#' into the footer; content too tall to fit above it may, as it always
+#' could. Heading-only section-divider slides keep their own centered-title
+#' layout. No configuration is needed and nothing changes about how slides
+#' are authored.
+#'
#' ## Chapter numbering
#'
#' Like in the old Google Docs slide workflow, chapter headings (`#`) are