ids theme: vertically center lone titles within the orange bar
Change-Id: I477ce457d556e28e034fd6e419d223dccd338b09
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 05952f8..e83f1ad 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
@@ -269,14 +269,21 @@
// bar keeps the same height and the body content starts at the same place on
// every slide. :has() is what lets us ask "is a subtitle coming?" in CSS; where
// it is unsupported such slides simply keep a title-height bar.
+//
+// The lone title is vertically CENTRED in its reserved bar: half of the
+// reservation goes above the text as top padding (the bar segment, anchored
+// to the heading box, moves up with it), and the bottom half stays in the bar
+// extension plus margin. The space consumed below the bar is reduced by the
+// same half, so body content starts where it always did.
.reveal .slides section:not(.title-frame) > h1:first-child:not(:has(+ h3)),
.reveal .slides section:not(.title-frame) > h2:first-child:not(:has(+ h3)) {
- margin-bottom: calc(#{$idsHeadingSpacing} + #{$idsSubtitleHeight} + #{$blockMargin}) !important;
+ padding-top: calc((#{$idsHeadingSpacing} + #{$idsSubtitleHeight}) / 2) !important;
+ margin-bottom: calc((#{$idsHeadingSpacing} + #{$idsSubtitleHeight}) / 2 + #{$blockMargin}) !important;
}
.reveal .slides section:not(.title-frame) > h1:first-child:not(:has(+ h3))::before,
.reveal .slides section:not(.title-frame) > h2:first-child:not(:has(+ h3))::before {
- height: calc(100% + #{$idsHeadingSpacing} + #{$idsSubtitleHeight}) !important;
+ height: calc(100% + (#{$idsHeadingSpacing} + #{$idsSubtitleHeight}) / 2) !important;
}
// The subtitle sits in the slide's normal text column, so its segment has to
diff --git a/inst/reveal.js-5.2.1/dist/theme/ids.css b/inst/reveal.js-5.2.1/dist/theme/ids.css
index b2c3e97..bd99e14 100644
--- a/inst/reveal.js-5.2.1/dist/theme/ids.css
+++ b/inst/reveal.js-5.2.1/dist/theme/ids.css
@@ -464,12 +464,13 @@
.reveal .slides section:not(.title-frame) > h1:first-child:not(:has(+ h3)),
.reveal .slides section:not(.title-frame) > h2:first-child:not(:has(+ h3)) {
- margin-bottom: calc(8px + 45.36px + 20px) !important;
+ padding-top: calc((8px + 45.36px) / 2) !important;
+ margin-bottom: calc((8px + 45.36px) / 2 + 20px) !important;
}
.reveal .slides section:not(.title-frame) > h1:first-child:not(:has(+ h3))::before,
.reveal .slides section:not(.title-frame) > h2:first-child:not(:has(+ h3))::before {
- height: calc(100% + 8px + 45.36px) !important;
+ height: calc(100% + (8px + 45.36px) / 2) !important;
}
.reveal .slides section:not(.title-frame) > h2:first-child + h3 {