/* Readium CSS 
   Scroll module

   A set of styles to scroll ePublications
   This module overrides pagination

   Repo: https://github.com/readium/readium-css */

:root {
  /* Reset html size so that the user can scroll */
  width: auto !important;
  height: auto !important;

  /* Reset columns, auto + auto = columns can’t be created */
  -webkit-columns: auto auto !important;
  -moz-columns: auto auto !important;
  columns: auto auto !important;

  --RS__currentColNumber: 0;

  /* Max-height for media in scroll mode
     This is currently a magic number, which: 
     1. is bad;
     2. is not supported in Trident/EdgeHTML */
  --RS__maxMediaHeight: 100vmax;
}

/* TODO: Enforce max-width for body, no matter which media query overrides it in pagination */
body {
  max-width: var(--RS__maxLineLength) !important;
}

/* Try resetting image + figcaption */
div > img:only-of-type:not(:only-child),
p > img:only-of-type:not(:only-child),
figure img:only-of-type:not(:only-child) {
  min-height: 0;
  max-height: var(--RS__maxMediaHeight);
}

/* Scroll mode horizontal */

/* Vertical writing needs body height set */

/* Do we add a top/bottom margin for body in vertical scroll or not? */
/* Readium CSS 
   Scroll module

   A set of styles to scroll ePublications
   This module overrides pagination

   Repo: https://github.com/readium/readium-css */

:root {
  /* Reset html size so that the user can scroll */
  width: auto !important;
  height: auto !important;

  /* Reset columns, auto + auto = columns can’t be created */
  -webkit-columns: auto auto !important;
  -moz-columns: auto auto !important;
  columns: auto auto !important;

  --RS__currentColNumber: 0;

  /* Max-height for media in scroll mode
     This is currently a magic number, which is bad.
     Should be the browser’s height, but based on iframe… */
  --RS__maxMediaHeight: 1500px;
}

/* TODO: Enforce max-width for body, no matter which media query overrides it in pagination */
body {
  max-width: var(--RS__maxLineLength) !important;
}

/* Try resetting image + figcaption */
div > img:only-of-type:not(:only-child),
p > img:only-of-type:not(:only-child),
figure img:only-of-type:not(:only-child) {
  min-height: 0;
  max-height: var(--RS__maxMediaHeight);
}

/* Scroll mode horizontal */

/* Vertical writing needs body height set */

/* Do we add a top/bottom margin for body in vertical scroll or not? */
Fix max-height fix in scroll
Fix max-height fix in scroll
