Skip to content

Commit 2e8c3e4

Browse files
authored
Merge pull request #213 from readium/fix-defaultLineLength
Update DefaultLineLength value
2 parents 52d0308 + a73673c commit 2e8c3e4

File tree

14 files changed

+33
-10
lines changed

14 files changed

+33
-10
lines changed

css/dist/ReadiumCSS-after.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
--RS__pageGutter:0;
2929

30-
--RS__defaultLineLength:40rem;
30+
--RS__defaultLineLength:100%;
3131

3232
--RS__colGap:0;
3333

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
--RS__pageGutter:0;
2929

30-
--RS__defaultLineLength:40rem;
30+
--RS__defaultLineLength:100%;
3131

3232
--RS__colGap:0;
3333

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
--RS__pageGutter:0;
2929

30-
--RS__defaultLineLength:40rem;
30+
--RS__defaultLineLength:100%;
3131

3232
--RS__colGap:0;
3333

css/dist/rtl/ReadiumCSS-after.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
--RS__pageGutter:0;
2929

30-
--RS__defaultLineLength:40rem;
30+
--RS__defaultLineLength:100%;
3131

3232
--RS__colGap:0;
3333

css/vars/pagination.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"RS__colWidth": "100vw",
33
"RS__colCount": 1,
44
"RS__colGap": 0,
5-
"RS__defaultLineLength": "40rem",
5+
"RS__defaultLineLength": "100%",
66
"RS__pageGutter": 0,
77
"RS__viewportWidth": "100%"
88
}

docs/CSS03-injection_and_pagination.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The inline (horizontal by default, vertical in vertical-writing) page margins.
123123
--RS__defaultLineLength
124124
```
125125

126-
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.
126+
The default line-length when none is set by the user. It represents the `max-width` of the `body` element and is `100%` by default so that it does not conflict with the the zoom factor.
127127

128128
* * *
129129

docs/CSS19-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ The inline (horizontal by default, vertical in vertical-writing) page margins.
273273
--RS__defaultLineLength
274274
```
275275

276-
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.
276+
The default line-length when none is set by the user. It represents the `max-width` of the `body` element and is `100%` by default so that it does not conflict with the the zoom factor.
277277

278278
### Scroll
279279

docs/CSS28-migration_guide.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,4 +274,10 @@ As of version `2.0.0` (stable), the `--RS__pageGutter` property no longer applie
274274

275275
**This is a breaking change.**
276276

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.
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.
278+
279+
## Default line-length value has changed
280+
281+
As of version `2.0.0` (stable), the default line-length when none is set by the user is `100%` instead of `40rem`. This is to prevent conflicts with the zoom factor.
282+
283+
The custom property has been kept so that consumers of ReadiumCSS can still customize the value if they wish, especially as they can opt out of the new font-size implementation.

docs/ReadiumCSS_docs.epub

199 Bytes
Binary file not shown.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160

161161
<pre><code>--RS__defaultLineLength</code></pre>
162162

163-
<p>The default line-length when none is set by the user. It must be set in <code>rem</code> in order to take <code>:root</code>’s <code>font-size</code> as a reference, whichever the <code>body</code>’s <code>font-size</code> might be.</p>
163+
<p>The default line-length when none is set by the user. It represents the <code>max-width</code> of the <code>body</code> element and is <code>100%</code> by default so that it does not conflict with the the zoom factor.</p>
164164

165165
<hr/>
166166

0 commit comments

Comments
 (0)