ids theme: balance title/subtitle margins in bar, keep layout invariant
Change-Id: I49672cdefdb9a91b2ab7738aebe9e169fa8b7e85
diff --git a/inst/reveal.js-5.2.1/css/theme/source/ids.scss b/inst/reveal.js-5.2.1/css/theme/source/ids.scss
index e83f1ad..41a1e43 100644
--- a/inst/reveal.js-5.2.1/css/theme/source/ids.scss
+++ b/inst/reveal.js-5.2.1/css/theme/source/ids.scss
@@ -286,6 +286,21 @@
height: calc(100% + (#{$idsHeadingSpacing} + #{$idsSubtitleHeight}) / 2) !important;
}
+// Vertical balance when a subtitle follows: the orange strip between the
+// title's baseline and the subtitle's cap height used to be title descent (16)
+// + segment spacing (8) + subtitle leading (3) ≈ 27px, against only ≈ 11px of
+// orange above the title's cap height. Moving the title 8px DOWN inside its
+// box while REMOVING the 8px segment spacing makes the two margins equal
+// (19px each) AND keeps the bar's total height and the body content's start
+// position pixel-identical: box grows by 8, spacing drops by 8. The subtitle
+// segment still rises (#{$idsHeadingSpacing} + #{$idsBarOverlap}) above its
+// own box, so the bar stays seamless.
+.reveal .slides section:not(.title-frame) > h1:first-child:has(+ h3),
+.reveal .slides section:not(.title-frame) > h2:first-child:has(+ h3) {
+ padding-top: #{$idsHeadingSpacing} !important;
+ margin-bottom: 0 !important;
+}
+
// The subtitle sits in the slide's normal text column, so its segment has to
// reach back out to the slide edge, and up over the gap to the title.
.reveal .slides section:not(.title-frame) > h2:first-child + h3 {