diff --git a/src/pyj/read_book/iframe.pyj b/src/pyj/read_book/iframe.pyj index 328a175550..3f10483545 100644 --- a/src/pyj/read_book/iframe.pyj +++ b/src/pyj/read_book/iframe.pyj @@ -251,6 +251,7 @@ class IframeBoss: document.documentElement.style.overflow = 'hidden' if self.is_titlepage and not opts.cover_preserve_aspect_ratio: document.body.classList.add('cover-fill') + document.body.classList.add(f'calibre-viewer-{window.navigator.epubReadingSystem.layoutStyle}') self.last_window_width, self.last_window_height = scroll_viewport.width(), scroll_viewport.height() apply_settings() self.fix_fullscreen_svg_images() diff --git a/src/pyj/read_book/prefs/user_stylesheet.pyj b/src/pyj/read_book/prefs/user_stylesheet.pyj index b51dbfdd31..24be315e00 100644 --- a/src/pyj/read_book/prefs/user_stylesheet.pyj +++ b/src/pyj/read_book/prefs/user_stylesheet.pyj @@ -103,9 +103,12 @@ def create_user_stylesheet_panel(container, apply_func, cancel_func): _('A CSS style sheet that can be used to control the look and feel of the text. For examples, click'), ' ', E.a(class_='blue-link', title=_("Examples of user style sheets"), target=('_self' if runtime.is_standalone_viewer else '_blank'), - href='https://www.mobileread.com/forums/showthread.php?t=51500', _('here')) + href='https://www.mobileread.com/forums/showthread.php?t=51500', _('here.')), + ' ', _( + 'Note that you can use the selectors body.calibre-viewer-paginated and body.calibre-viewer-scrolling' + ' to target the Paged and Flow modes.') ), - E.textarea(name='user-stylesheet', style='width: 100%; margin-top: 1ex; box-sizing: border-box; flex-grow: 10') + E.textarea(name='user-stylesheet', style='width: 100%; margin-top: 1ex; box-sizing: border-box; flex-grow: 10'), ) ) )