Skip to content

Commit

Permalink
prevent extra page at end when printing to pdf, reader mode styling t…
Browse files Browse the repository at this point in the history
…weaks
  • Loading branch information
hakimel committed Oct 13, 2023
1 parent 28ef437 commit 836967d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
4 changes: 4 additions & 0 deletions css/print/pdf.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ html.reveal-print {
page-break-after: always;
}

.reveal .slides .pdf-page:last-of-type {
page-break-after: avoid;
}

.reveal .slides section {
visibility: visible !important;
display: block !important;
Expand Down
26 changes: 20 additions & 6 deletions css/reveal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,7 @@ $notesWidthPercent: 25%;
z-index: 1;

--r-reader-progress-width: 8px;
--r-reader-progress-trigger-size: 6px;
--r-reader-progress-trigger-size: 5px;
}

@media screen and (max-width: 500px) {
Expand All @@ -1895,7 +1895,8 @@ $notesWidthPercent: 25%;
.reveal .progress,
.reveal .playback,
.reveal .backgrounds,
.reveal .slide-number {
.reveal .slide-number,
.reveal .speaker-notes {
display: none !important;
}

Expand Down Expand Up @@ -1968,11 +1969,18 @@ $notesWidthPercent: 25%;
}
}

// Chromium
.reveal-viewport.reveal-reader[data-reader-scroll-bar="true"]::-webkit-scrollbar,
.reveal-viewport.reveal-reader[data-reader-scroll-bar="auto"]::-webkit-scrollbar {
display: none;
}

// Firefox
.reveal-viewport.reveal-reader[data-reader-scroll-bar="true"],
.reveal-viewport.reveal-reader[data-reader-scroll-bar="auto"] {
scrollbar-width: none;
}

.reveal.has-dark-background,
.reveal-viewport.has-dark-background {
--r-overlay-element-bg-color: 240, 240, 240;
Expand Down Expand Up @@ -2041,7 +2049,7 @@ $notesWidthPercent: 25%;
}

.reader-progress-slide.active {
background-color: rgba(var(--r-overlay-element-bg-color), 1);
background-color: rgba(var(--r-overlay-element-bg-color), 0.4);
}

.reader-progress-trigger {
Expand All @@ -2061,14 +2069,20 @@ $notesWidthPercent: 25%;
width: var(--r-reader-progress-trigger-size);
height: var(--r-reader-progress-trigger-size);
border-radius: 20px;
bottom: 0;
top: 100%;
left: 50%;
transform: translate(-50%, 0);
background-color: rgba(var(--r-overlay-element-bg-color), 0.8);
transition: transform 0.2s ease;
transition: transform 0.2s ease, opacity 0.2s ease;
opacity: 0.4;
}

.reader-progress-slide.active .reader-progress-trigger.active:after,
.reader-progress-slide.active .reader-progress-trigger.active ~ .reader-progress-trigger:after {
opacity: 1;
}

.reader-progress-slide.active .reader-progress-trigger.active:after {
.reader-progress-slide.active .reader-progress-trigger ~ .reader-progress-trigger.active:after {
transform: translate(calc( var(--r-reader-progress-width) * -2), 0);
background-color: rgba(var(--r-overlay-element-bg-color), 1);
}
Expand Down
2 changes: 1 addition & 1 deletion dist/reveal.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js.map

Large diffs are not rendered by default.

0 comments on commit 836967d

Please sign in to comment.