Skip to content

Commit 52d0308

Browse files
authored
Merge pull request #210 from readium/resolve-gutter-scroll
Only apply pageGutter in columns
2 parents a3c1b62 + 0d16f53 commit 52d0308

File tree

11 files changed

+77
-5
lines changed

11 files changed

+77
-5
lines changed

css/dist/ReadiumCSS-after.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@
7171
body{
7272
width:100%;
7373
max-width:var(--RS__defaultLineLength) !important;
74-
padding:0 var(--RS__pageGutter) !important;
7574
margin:0 auto !important;
7675
box-sizing:border-box;
7776
}
7877

78+
:root:not([style*="readium-scroll-on"]) body{
79+
padding:0 var(--RS__pageGutter) !important;
80+
}
81+
7982
:root:not([style*="readium-noOverflow-on"]) body{
8083
overflow:hidden;
8184
}

css/dist/cjk-horizontal/ReadiumCSS-after.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@
7171
body{
7272
width:100%;
7373
max-width:var(--RS__defaultLineLength) !important;
74-
padding:0 var(--RS__pageGutter) !important;
7574
margin:0 auto !important;
7675
box-sizing:border-box;
7776
}
7877

78+
:root:not([style*="readium-scroll-on"]) body{
79+
padding:0 var(--RS__pageGutter) !important;
80+
}
81+
7982
:root:not([style*="readium-noOverflow-on"]) body{
8083
overflow:hidden;
8184
}

css/dist/cjk-vertical/ReadiumCSS-after.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,14 @@
8282
body{
8383
width:100%;
8484
max-height:var(--RS__defaultLineLength) !important;
85-
padding:var(--RS__pageGutter) 0 !important;
8685
margin:auto 0 !important;
8786
box-sizing:border-box;
8887
}
8988

89+
:root:not([style*="readium-scroll-on"]) body{
90+
padding:var(--RS__pageGutter) 0 !important;
91+
}
92+
9093
:root:not([style*="readium-noOverflow-on"]) body{
9194
overflow:hidden;
9295
}

css/dist/rtl/ReadiumCSS-after.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@
7171
body{
7272
width:100%;
7373
max-width:var(--RS__defaultLineLength) !important;
74-
padding:0 var(--RS__pageGutter) !important;
7574
margin:0 auto !important;
7675
box-sizing:border-box;
7776
}
7877

78+
:root:not([style*="readium-scroll-on"]) body{
79+
padding:0 var(--RS__pageGutter) !important;
80+
}
81+
7982
:root:not([style*="readium-noOverflow-on"]) body{
8083
overflow:hidden;
8184
}

css/src/modules/ReadiumCSS-pagination-vertical.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ body {
9494
Drawback: we have to use border-box so that it doesn’t screw the box model,
9595
which means it impacts colWidth and max-width */
9696
box-sizing: border-box;
97+
}
98+
99+
:root:not(:--scroll-view) body {
97100
padding: var(--RS__pageGutter) 0 !important;
98101
}
99102

css/src/modules/ReadiumCSS-pagination.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ body {
8080
Drawback: we have to use border-box so that it doesn’t screw the box model,
8181
which means it impacts colWidth and max-width */
8282
box-sizing: border-box;
83+
}
84+
85+
:root:not(:--scroll-view) body {
8386
padding: 0 var(--RS__pageGutter) !important;
8487
}
8588

docs/CSS28-migration_guide.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,20 @@ As of version `2.0.0-beta.23`, ReadiumCSS provides flags as a way to opt-in to a
258258
- `--RS__experimentalHeaderFiltering: readium-experimentalHeaderFiltering-on`: attempts to filter out paragraphs that are implicitly headings or part of headers
259259
- `--RS__experimentalZoom: readium-experimentalZoom-on`: attemps to filter out elements that are sized using viewport units and should not be scaled directly
260260

261-
These flags are expected to be found on `:root`.
261+
These flags are expected to be found on `:root`.
262+
263+
## Fonts are no longer distributed in the package
264+
265+
As of version `2.0.0` (stable), ReadiumCSS no longer distributes fonts and their `font-face` rules. You will need to load them yourself.
266+
267+
**This is a breaking change.**
268+
269+
This means AccessibleDfa, iA Writer Duospace, and the Android FXL fonts patch are no longer included, nor are their `font-face` rules.
270+
271+
## PageGutter no longer applies in scroll view
272+
273+
As of version `2.0.0` (stable), the `--RS__pageGutter` property no longer applies in scroll view.
274+
275+
**This is a breaking change.**
276+
277+
If you need to apply padding to the scroll view, you can use the `--RS__scrollPadding` properties instead. This can be useful to get around safe area insets, or to add whitespace so that contents are not hidden behind UI elements.

docs/ReadiumCSS_docs.epub

-2.47 KB
Binary file not shown.

docs/ReadiumCSS_docs/OEBPS/Text/Section-028.xhtml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,26 @@ const backgroundColor = defaultColors.RS__backgroundColor;</code></pre>
310310
<li><code>--RS__experimentalZoom: readium-experimentalZoom-on</code>: attemps to filter out elements that are sized using viewport units and should not be scaled directly</li>
311311
</ul>
312312
</section>
313+
314+
<section id="fonts-removed-from-package" class="level2">
315+
<h2 id="sigil_toc_id_223">Fonts are no longer distributed in the package</h2>
316+
317+
<p>As of version <code>2.0.0</code> (stable), ReadiumCSS no longer distributes fonts and their <code>font-face</code> rules. You will need to load them yourself.</p>
318+
319+
<p><strong>This is a breaking change.</strong></p>
320+
321+
<p>This means AccessibleDfa, iA Writer Duospace, and the Android FXL fonts patch are no longer included, nor are their <code>font-face</code> rules.</p>
322+
</section>
323+
324+
<section id="pagegutter-removed-from-scroll-view" class="level2">
325+
<h2 id="sigil_toc_id_224">PageGutter no longer applies in scroll view</h2>
326+
327+
<p>As of version <code>2.0.0</code> (stable), the <code>--RS__pageGutter</code> property no longer applies in scroll view.</p>
328+
329+
<p><strong>This is a breaking change.</strong></p>
330+
331+
<p>If you need to apply padding to the scroll view, you can use the <code>--RS__scrollPadding</code> properties instead. This can be useful to get around safe area insets, or to add whitespace so that contents are not hidden behind UI elements.</p>
332+
</section>
313333
</section>
314334
</body>
315335
</html>

docs/ReadiumCSS_docs/OEBPS/Text/nav.xhtml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,12 @@
773773
<li>
774774
<a href="../Text/Section-028.xhtml#sigil_toc_id_219">Experimental Features Flags</a>
775775
</li>
776+
<li>
777+
<a href="../Text/Section-028.xhtml#sigil_toc_id_223">Fonts are no longer distributed in the package</a>
778+
</li>
779+
<li>
780+
<a href="../Text/Section-028.xhtml#sigil_toc_id_224">PageGutter no longer applies in scroll view</a>
781+
</li>
776782
</ol>
777783
</li>
778784
</ol>

0 commit comments

Comments
 (0)