diff --git a/css/dist/ReadiumCSS-after.css b/css/dist/ReadiumCSS-after.css index 11c6888..414a9f9 100644 --- a/css/dist/ReadiumCSS-after.css +++ b/css/dist/ReadiumCSS-after.css @@ -27,8 +27,6 @@ --RS__pageGutter:0; - --RS__defaultLineLength:40rem; - --RS__colGap:0; --RS__colCount:1; @@ -70,7 +68,7 @@ body{ width:100%; - max-width:var(--RS__defaultLineLength) !important; + max-width:100% !important; padding:0 var(--RS__pageGutter) !important; margin:0 auto !important; box-sizing:border-box; @@ -105,7 +103,7 @@ body{ } :root[style*="readium-scroll-on"] body{ - max-width:var(--RS__defaultLineLength) !important; + max-width:100% !important; box-sizing:border-box !important; } diff --git a/css/dist/ReadiumCSS-before.css b/css/dist/ReadiumCSS-before.css index 5d56910..3e31edd 100644 --- a/css/dist/ReadiumCSS-before.css +++ b/css/dist/ReadiumCSS-before.css @@ -402,11 +402,15 @@ ruby > rt, ruby > rp{ :root{ --RS__maxMediaWidth:100%; - --RS__maxMediaHeight:95vh; + --RS__maxMediaHeight:calc(95vh * (1 / var(--USER__fontSize, 1))); --RS__boxSizingMedia:border-box; --RS__boxSizingTable:border-box; } +:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"]){ + --RS__maxMediaHeight:95vh; +} + a, a span, span a, h1, h2, h3, h4, h5, h6{ word-wrap:break-word; } diff --git a/css/dist/cjk-horizontal/ReadiumCSS-after.css b/css/dist/cjk-horizontal/ReadiumCSS-after.css index d5f830c..677a8ef 100644 --- a/css/dist/cjk-horizontal/ReadiumCSS-after.css +++ b/css/dist/cjk-horizontal/ReadiumCSS-after.css @@ -27,8 +27,6 @@ --RS__pageGutter:0; - --RS__defaultLineLength:40rem; - --RS__colGap:0; --RS__colCount:1; @@ -70,7 +68,7 @@ body{ width:100%; - max-width:var(--RS__defaultLineLength) !important; + max-width:100% !important; padding:0 var(--RS__pageGutter) !important; margin:0 auto !important; box-sizing:border-box; @@ -105,7 +103,7 @@ body{ } :root[style*="readium-scroll-on"] body{ - max-width:var(--RS__defaultLineLength) !important; + max-width:100% !important; box-sizing:border-box !important; } diff --git a/css/dist/cjk-horizontal/ReadiumCSS-before.css b/css/dist/cjk-horizontal/ReadiumCSS-before.css index 925a65d..55dc8f9 100644 --- a/css/dist/cjk-horizontal/ReadiumCSS-before.css +++ b/css/dist/cjk-horizontal/ReadiumCSS-before.css @@ -374,11 +374,15 @@ ruby > rt, ruby > rp{ :root{ --RS__maxMediaWidth:100%; - --RS__maxMediaHeight:95vh; + --RS__maxMediaHeight:calc(95vh * (1 / var(--USER__fontSize, 1))); --RS__boxSizingMedia:border-box; --RS__boxSizingTable:border-box; } +:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"]){ + --RS__maxMediaHeight:95vh; +} + a, a span, span a, h1, h2, h3, h4, h5, h6{ word-wrap:break-word; } diff --git a/css/dist/cjk-vertical/ReadiumCSS-after.css b/css/dist/cjk-vertical/ReadiumCSS-after.css index 26d6229..7cecdab 100644 --- a/css/dist/cjk-vertical/ReadiumCSS-after.css +++ b/css/dist/cjk-vertical/ReadiumCSS-after.css @@ -27,8 +27,6 @@ --RS__pageGutter:0; - --RS__defaultLineLength:40rem; - --RS__colGap:0; --RS__colCount:1; @@ -81,7 +79,7 @@ body{ width:100%; - max-height:var(--RS__defaultLineLength) !important; + max-height:100% !important; padding:var(--RS__pageGutter) 0 !important; margin:auto 0 !important; box-sizing:border-box; @@ -116,7 +114,7 @@ body{ :root[style*="readium-scroll-on"] body, :root[style*="readium-noVerticalPagination-on"] body{ - max-width:var(--RS__defaultLineLength) !important; + max-width:100% !important; box-sizing:border-box !important; } diff --git a/css/dist/cjk-vertical/ReadiumCSS-before.css b/css/dist/cjk-vertical/ReadiumCSS-before.css index 5bce37d..4fcafc0 100644 --- a/css/dist/cjk-vertical/ReadiumCSS-before.css +++ b/css/dist/cjk-vertical/ReadiumCSS-before.css @@ -374,11 +374,15 @@ ruby > rt, ruby > rp{ :root{ --RS__maxMediaWidth:100%; - --RS__maxMediaHeight:100vw; + --RS__maxMediaHeight:calc(100vw * (1 / var(--USER__fontSize, 1))); --RS__boxSizingMedia:border-box; --RS__boxSizingTable:border-box; } +:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"]){ + --RS__maxMediaHeight:100vw; +} + a, a span, span a, h1, h2, h3, h4, h5, h6{ word-wrap:break-word; } diff --git a/css/dist/rtl/ReadiumCSS-after.css b/css/dist/rtl/ReadiumCSS-after.css index 7ae9abf..b8d12ee 100644 --- a/css/dist/rtl/ReadiumCSS-after.css +++ b/css/dist/rtl/ReadiumCSS-after.css @@ -27,8 +27,6 @@ --RS__pageGutter:0; - --RS__defaultLineLength:40rem; - --RS__colGap:0; --RS__colCount:1; @@ -70,7 +68,7 @@ body{ width:100%; - max-width:var(--RS__defaultLineLength) !important; + max-width:100% !important; padding:0 var(--RS__pageGutter) !important; margin:0 auto !important; box-sizing:border-box; @@ -105,7 +103,7 @@ body{ } :root[style*="readium-scroll-on"] body{ - max-width:var(--RS__defaultLineLength) !important; + max-width:100% !important; box-sizing:border-box !important; } diff --git a/css/dist/rtl/ReadiumCSS-before.css b/css/dist/rtl/ReadiumCSS-before.css index 925a65d..55dc8f9 100644 --- a/css/dist/rtl/ReadiumCSS-before.css +++ b/css/dist/rtl/ReadiumCSS-before.css @@ -374,11 +374,15 @@ ruby > rt, ruby > rp{ :root{ --RS__maxMediaWidth:100%; - --RS__maxMediaHeight:95vh; + --RS__maxMediaHeight:calc(95vh * (1 / var(--USER__fontSize, 1))); --RS__boxSizingMedia:border-box; --RS__boxSizingTable:border-box; } +:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"]){ + --RS__maxMediaHeight:95vh; +} + a, a span, span a, h1, h2, h3, h4, h5, h6{ word-wrap:break-word; } diff --git a/css/src/modules/ReadiumCSS-pagination-vertical.css b/css/src/modules/ReadiumCSS-pagination-vertical.css index 6426e76..10455f1 100644 --- a/css/src/modules/ReadiumCSS-pagination-vertical.css +++ b/css/src/modules/ReadiumCSS-pagination-vertical.css @@ -87,7 +87,7 @@ body { /* Limit line-length but we have to reset when 2 columns and control the viewport. By using max-width + margin auto, margins will shrink when font-size increases, which is what would be expected in terms of typography. */ - max-height: var(--RS__defaultLineLength) !important; + max-height: 100% !important; margin: auto 0 !important; /* We need a minimum padding on body so that descandants/ascendants in italic/script are not cut-off. diff --git a/css/src/modules/ReadiumCSS-pagination.css b/css/src/modules/ReadiumCSS-pagination.css index 36516da..094f145 100644 --- a/css/src/modules/ReadiumCSS-pagination.css +++ b/css/src/modules/ReadiumCSS-pagination.css @@ -73,7 +73,7 @@ body { /* Limit line-length but we have to reset when 2 columns and control the viewport. By using max-width + margin auto, margins will shrink when font-size increases, which is what would be expected in terms of typography. */ - max-width: var(--RS__defaultLineLength) !important; + max-width: 100% !important; margin: 0 auto !important; /* We need a minimum padding on body so that descandants/ascendants in italic/script are not cut-off. diff --git a/css/src/modules/ReadiumCSS-safeguards-vertical.css b/css/src/modules/ReadiumCSS-safeguards-vertical.css index 786bed0..2e05612 100644 --- a/css/src/modules/ReadiumCSS-safeguards-vertical.css +++ b/css/src/modules/ReadiumCSS-safeguards-vertical.css @@ -13,7 +13,7 @@ --RS__maxMediaWidth: 100%; /* max-height for media, you can override that via JS if not compiled to static */ - --RS__maxMediaHeight: 100vw; + --RS__maxMediaHeight: calc(100vw * (1 / var(--USER__fontSize, 1))); /* value for medias’ box-sizing */ --RS__boxSizingMedia: border-box; @@ -22,6 +22,10 @@ --RS__boxSizingTable: border-box; } +:root:not(:--deprecated-font-size):not(:--iOS-patch) { + --RS__maxMediaHeight: 100vw; +} + /* Wrap long strings if larger than line-length */ a, a span, span a, h1, h2, h3, h4, h5, h6 { word-wrap: break-word; diff --git a/css/src/modules/ReadiumCSS-safeguards.css b/css/src/modules/ReadiumCSS-safeguards.css index bbc36e6..4d6c7da 100644 --- a/css/src/modules/ReadiumCSS-safeguards.css +++ b/css/src/modules/ReadiumCSS-safeguards.css @@ -14,7 +14,7 @@ /* max-height for media, you can override that via JS if not compiled to static Please consider figures might have a figcaption, which is why 95vh in the first place */ - --RS__maxMediaHeight: 95vh; + --RS__maxMediaHeight: calc(95vh * (1 / var(--USER__fontSize, 1))); /* value for medias’ box-sizing */ --RS__boxSizingMedia: border-box; @@ -23,6 +23,10 @@ --RS__boxSizingTable: border-box; } +:root:not(:--deprecated-font-size):not(:--iOS-patch) { + --RS__maxMediaHeight: 95vh; +} + /* Wrap long strings if larger than line-length */ a, a span, span a, h1, h2, h3, h4, h5, h6 { word-wrap: break-word; diff --git a/css/src/modules/ReadiumCSS-scroll-vertical.css b/css/src/modules/ReadiumCSS-scroll-vertical.css index 9119653..8bb0d09 100644 --- a/css/src/modules/ReadiumCSS-scroll-vertical.css +++ b/css/src/modules/ReadiumCSS-scroll-vertical.css @@ -25,7 +25,7 @@ :root:--scroll-view body, :root:--no-vertical-pagination body { box-sizing: border-box !important; - max-width: var(--RS__defaultLineLength) !important; + max-width: 100% !important; } @supports (overflow: clip) { diff --git a/css/src/modules/ReadiumCSS-scroll.css b/css/src/modules/ReadiumCSS-scroll.css index a9899e2..8a25261 100644 --- a/css/src/modules/ReadiumCSS-scroll.css +++ b/css/src/modules/ReadiumCSS-scroll.css @@ -24,7 +24,7 @@ /* Make sure line-length is limited in all configs */ :root:--scroll-view body { box-sizing: border-box !important; - max-width: var(--RS__defaultLineLength) !important; + max-width: 100% !important; } :root:--scroll-view:not(:--no-overflow) body { diff --git a/css/vars/pagination.json b/css/vars/pagination.json index 581f8cf..c88e3b2 100644 --- a/css/vars/pagination.json +++ b/css/vars/pagination.json @@ -2,7 +2,6 @@ "RS__colWidth": "100vw", "RS__colCount": 1, "RS__colGap": 0, - "RS__defaultLineLength": "40rem", "RS__pageGutter": 0, "RS__viewportWidth": "100%" } \ No newline at end of file diff --git a/docs/CSS03-injection_and_pagination.md b/docs/CSS03-injection_and_pagination.md index 4967c60..2e57199 100644 --- a/docs/CSS03-injection_and_pagination.md +++ b/docs/CSS03-injection_and_pagination.md @@ -75,7 +75,7 @@ This is the model you’re dealing with. It’s been simplified in version 2 in ![The single page model relies on the column width of the :root element. Line-length is constrained by the max-width of the body element, including its padding. Finally an auto margin centers the content.](assets/Page-Model.jpg) -Page gutters are part of `body` (`--RS__pageGutter`), hence `--USER__lineLength` (or `--RS__defaultLineLength` if no user preference is set). Contents are centered in `:root` using the `auto` value for `body` margins. +Page gutters are part of `body` (`--RS__pageGutter`), hence `--USER__lineLength`. Contents are centered in `:root` using the `auto` value for `body` margins. By default, `--RS__pageGutter` is set to `0`. You can set it as you wish, but take into account it will substract from `--USER__lineLength`. @@ -119,14 +119,6 @@ The inline (horizontal by default, vertical in vertical-writing) page margins. * * * -``` ---RS__defaultLineLength -``` - -The default line-length when none is set by the user. It should be set in `rem` in order to take `:root`’s `font-size` as a reference, whichever the `body`’s `font-size` might be. - -* * * - ``` --USER__lineLength ``` diff --git a/docs/CSS19-api.md b/docs/CSS19-api.md index fd89de0..6053780 100644 --- a/docs/CSS19-api.md +++ b/docs/CSS19-api.md @@ -267,14 +267,6 @@ You must account for this gap when scrolling. The inline (horizontal by default, vertical in vertical-writing) page margins. -* * * - -``` ---RS__defaultLineLength -``` - -The default line-length when none is set by the user. It must be set in `rem` in order to take `:root`’s `font-size` as a reference, whichever the `body`’s `font-size` might be. - ### Scroll * * * diff --git a/docs/ReadiumCSS_docs.epub b/docs/ReadiumCSS_docs.epub index 9eeebac..ae27765 100644 Binary files a/docs/ReadiumCSS_docs.epub and b/docs/ReadiumCSS_docs.epub differ diff --git a/docs/ReadiumCSS_docs/OEBPS/Text/Section-003.xhtml b/docs/ReadiumCSS_docs/OEBPS/Text/Section-003.xhtml index f86f54d..dd37aef 100644 --- a/docs/ReadiumCSS_docs/OEBPS/Text/Section-003.xhtml +++ b/docs/ReadiumCSS_docs/OEBPS/Text/Section-003.xhtml @@ -120,7 +120,7 @@ The single page model relies on the column width of the :root element. Line-length is constrained by the max-width of the body element, including its padding. Finally an auto margin centers the content. -

Page gutters are part of body (--RS__pageGutter), hence --USER__lineLength (or --RS__defaultLineLength if no user preference is set). Contents are centered in :root using the auto value for body margins.

+

Page gutters are part of body (--RS__pageGutter), hence --USER__lineLength. Contents are centered in :root using the auto value for body margins.

By default, --RS__pageGutter is set to 0. You can set it as you wish, but take into account it will substract from --USER__lineLength.

@@ -156,12 +156,6 @@

The inline (horizontal by default, vertical in vertical-writing) page margins.

-
- -
--RS__defaultLineLength
- -

The default line-length when none is set by the user. It must be set in rem in order to take :root’s font-size as a reference, whichever the body’s font-size might be.

-
--USER__lineLength
diff --git a/docs/ReadiumCSS_docs/OEBPS/Text/Section-019.xhtml b/docs/ReadiumCSS_docs/OEBPS/Text/Section-019.xhtml index 0278f81..781f014 100644 --- a/docs/ReadiumCSS_docs/OEBPS/Text/Section-019.xhtml +++ b/docs/ReadiumCSS_docs/OEBPS/Text/Section-019.xhtml @@ -242,12 +242,6 @@
--RS__pageGutter

The inline (horizontal by default, vertical in vertical-writing) page margins.

- -
- -
--RS__defaultLineLength
- -

The default line-length when none is set by the user. It must be set in rem in order to take :root’s font-size as a reference, whichever the body’s font-size might be.