Skip to content

Commit

Permalink
Increase delta for slide width variable
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaVerou committed Feb 10, 2024
1 parent 7778d1a commit f6a9401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ export function deduplicateId (element) {
}

export function slideWidthUpdated (slide) {
if (slide.offsetWidth < innerWidth) {
let delta = 30;
if (slide.offsetWidth + delta < innerWidth) {
let width = parseFloat(getComputedStyle(slide).width);
slide.style.setProperty("--width", Math.ceil(width));
slide.style.setProperty("--width", Math.ceil(width) + delta);
}
else {
slide.style.removeProperty("--width");
Expand Down
2 changes: 1 addition & 1 deletion style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ img {
/* Plain slides, just a heading + a list */
&.plain,
&.dbpp, /* Death By PowerPoint :) */
&:not(header, .not-plain, :has(> :not(h1, h2, h3, h4, h5, h6, p, ul, ol, details.notes, .delayed.dummy))) {
&:not(header, .not-plain, :has(> :not(h1, h2, p, ul, ol, details.notes, .delayed.dummy))) {
/* Size of content cannot exceed size of heading */
width: fit-content;
contain: none;
Expand Down

0 comments on commit f6a9401

Please sign in to comment.