Skip to content

Commit b0d505b

Browse files
committed
Update docs for iPadOS Patch
1 parent e526358 commit b0d505b

9 files changed

Lines changed: 57 additions & 2 deletions

docs/CSS06-stylesheets_order.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,5 @@ The following modules must be appended after the author’s stylesheets (`Readiu
6868
15. `ReadiumCSS-variableFont_pref.css` (this contains optical sizing, weight and width prefs)
6969
16. `ReadiumCSS-ruby_pref.css` (CJK only)
7070
17. `ReadiumCSS-imageFilters_pref.css`
71-
8. `ReadiumCSS-fs_normalize.css`
71+
8. `ReadiumCSS-fs_normalize.css`
72+
9. `ReadiumCSS-iPadOS_patch.css`

docs/CSS12-user_prefs.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ Supported value: `readium-normalize-on`
101101

102102
Override class: None.
103103

104+
### iPadOS Zoom Patch
105+
106+
Acts as an explicit switch to force iPadOS patching of zoom issues so that `--USER__fontSize` can work as expected. This should be applied only when the site is requested in its desktop version on iPadOS – mobile version is completely fine.
107+
108+
```
109+
--USER__iPadOSPatch
110+
```
111+
112+
Supported value: `readium-iPadOSPatch-on`
113+
114+
Override class: None.
115+
104116
### Reading Modes
105117

106118
We currently have two reading modes for night and sepia.
@@ -295,6 +307,8 @@ Recommended values: a range from `75%` to `250%`. Increments are left to impleme
295307

296308
Override class: User settings (should be applied by any means necessary)
297309

310+
**Note: iPadOS needs a patch when the site is requested in its desktop version. It is activated with the `readium-iPadOSPatch-on` flag.**
311+
298312
#### Line height
299313

300314
```

docs/CSS19-api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@ Scope: `html`
8686

8787
Override class: None. This flag can be used to force font-size normalization if the browser/rendering engine does not support CSS property `zoom` and the book’s styles are using absolute units, breaking the font-size user submodule.
8888

89+
* * *
90+
91+
```
92+
:--ipadOS-patch
93+
```
94+
95+
Preset: `--USER__iPadOSPatch: readium-iPadOSPatch-on`
96+
97+
Scope: `html`
98+
99+
Override class: None. This flag is used to activate patching of iPadOS’ desktop-class experience in Safari, which disables zoom.
100+
89101
* * *
90102

91103
```

docs/CSS28-migration_guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ It doesn’t need any change at the implementation level, and should work out of
108108

109109
As a side-effect of this new implementation, please note the `--USER__typeScale` setting is no longer available.
110110

111+
Due to iPadOS “desktop-class experience” interventions, a patch has to be applied when the site is requested (by default) in desktop version, and only in this version (mobile website is fine without it). The selector for the flag can be configured (`:--ipadOS-patch`) and is `[style*="readium-iPadOSPatch-on"]` by default.
112+
111113
## Extension of the font-family user setting override
112114

113115
In version 1, the font-family user setting overrode a selection of elements of body copy e.g. `p`, `li`, `dt`, etc. This explained why the font-family of headings would remain the same as the one set in authors’ stylesheets for instance.

docs/ReadiumCSS_docs.epub

394 Bytes
Binary file not shown.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@
132132
</ol></li>
133133

134134
<li><code>ReadiumCSS-fs_normalize.css</code></li>
135+
136+
<li><code>ReadiumCSS-iPadOS_patch.css</code></li>
135137
</ol>
136138
</section>
137139
</section>

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,18 @@ root.style.setProperty("name of var", "");</code></pre>
119119
<p>Supported value: <code>readium-normalize-on</code></p>
120120

121121
<p>Override class: None.</p>
122+
</section>
123+
124+
<section id="ipados-zoom-patch" class="level3">
125+
<h3 class="sigil_not_in_toc">iPadOS Zoom Patch</h3>
126+
127+
<p>Acts as an explicit switch to force iPadOS patching of zoom issues so that <code>--USER__fontSize</code> can work as expected. This should be applied only when the site is requested in its desktop version on iPadOS – mobile version is completely fine.</p>
128+
129+
<pre><code>--USER__iPadOSPatch</code></pre>
122130

123-
<p>To switch back to the publisher’s styles, you can either set an empty string as a value or remove the property. This will disable all advanced settings requiring the flag.</p>
131+
<p>Supported value: <code>readium-iPadOSPatch-on</code></p>
132+
133+
<p>Override class: None.</p>
124134
</section>
125135

126136
<section id="reading-modes" class="level3">
@@ -324,6 +334,8 @@ root.style.setProperty("name of var", "");</code></pre>
324334
<p>Recommended values: a range from <code>75%</code> to <code>250%</code>. Increments are left to implementers’ judgment.</p>
325335

326336
<p>Override class: User settings (should be applied by any means necessary)</p>
337+
338+
<p><strong>Note: iPadOS needs a patch when the site is requested in its desktop version. It is activated with the <code>readium-iPadOSPatch-on</code> flag.</strong></p>
327339
</section>
328340

329341
<section id="line-height" class="level4">

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@
9090

9191
<hr/>
9292

93+
<pre><code>:--ipadOS-patch</code></pre>
94+
95+
<p>Preset: <code>--USER__iPadOSPatch: readium-iPadOSPatch-on</code></p>
96+
97+
<p>Scope: <code>html</code></p>
98+
99+
<p>Override class: None. This flag is used to activate patching of iPadOS’ desktop-class experience in Safari, which disables zoom.</p>
100+
101+
<hr/>
102+
93103
<pre><code>:--sepia-mode</code></pre>
94104

95105
<p>Preset: <code>--USER__appearance: readium-sepia-on</code></p>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@
125125
<p>It doesn’t need any change at the implementation level, and should work out of the box. All is handled behind the scenes in ReadiumCSS font-size module.</p>
126126

127127
<p>As a side-effect of this new implementation, please note the <code>--USER__typeScale</code> setting is no longer available.</p>
128+
129+
<p>Due to iPadOS “desktop-class experience” interventions, a patch has to be applied when the site is requested (by default) in desktop mode, and only in this mode (mobile website is fine without it). The selector for the flag can be configured (<code>:--ipadOS-patch</code>) and is <code>[style*="readium-iPadOSPatch-on"]</code> by default.</p>
128130
</section>
129131

130132
<section id="extension-of-the-font-family-user-setting-override" class="level2">

0 commit comments

Comments
 (0)