Skip to content

Commit

Permalink
EPUB: Fix images becoming two narrow in one-column view
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeJellinek committed Jan 3, 2024
1 parent 2d74fe3 commit 8e2d41c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/dom/epub/stylesheets/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,24 @@ body.flow-mode-paginated > .sections {
}

body.flow-mode-paginated > .sections.spread-mode-none {
max-width: 800px;
--column-width: calc(min(800px, 100vw - 80px));
column-width: 800px;
column-gap: 100vw;
max-width: 800px;
}

body.flow-mode-paginated > .sections.spread-mode-odd {
--column-width: calc(50vw - 80px);
column-width: calc(50vw - 80px);
}

@media (max-width: 800px) {
body.flow-mode-paginated > .sections {
max-width: 800px;
--column-width: calc(min(800px, 100vw - 80px));
column-width: 800px;
column-gap: 100vw;
}
max-width: 800px;
}
}

body.flow-mode-paginated > .sections > .section-container {
Expand All @@ -130,7 +133,7 @@ body.flow-mode-paginated > .sections > .section-container.hidden {

body.flow-mode-paginated replaced-body img, body.flow-mode-paginated replaced-body svg,
body.flow-mode-paginated replaced-body audio, body.flow-mode-paginated replaced-body video {
max-width: calc(50vw - 80px) !important;
max-width: var(--column-width) !important;
max-height: calc(100vh - 80px) !important;
object-fit: contain;
}
Expand Down

1 comment on commit 8e2d41c

@AbeJellinek
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(too)

Please sign in to comment.