Skip to content

Beta 11 #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update docs for iPadOS Patch
  • Loading branch information
JayPanoz committed Apr 14, 2025
commit b0d505b2933689a4801295ff0d5e0b443d9caefa
3 changes: 2 additions & 1 deletion docs/CSS06-stylesheets_order.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@ The following modules must be appended after the author’s stylesheets (`Readiu
15. `ReadiumCSS-variableFont_pref.css` (this contains optical sizing, weight and width prefs)
16. `ReadiumCSS-ruby_pref.css` (CJK only)
17. `ReadiumCSS-imageFilters_pref.css`
8. `ReadiumCSS-fs_normalize.css`
8. `ReadiumCSS-fs_normalize.css`
9. `ReadiumCSS-iPadOS_patch.css`
14 changes: 14 additions & 0 deletions docs/CSS12-user_prefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ Supported value: `readium-normalize-on`

Override class: None.

### iPadOS Zoom Patch

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.

```
--USER__iPadOSPatch
```

Supported value: `readium-iPadOSPatch-on`

Override class: None.

### Reading Modes

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

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

**Note: iPadOS needs a patch when the site is requested in its desktop version. It is activated with the `readium-iPadOSPatch-on` flag.**

#### Line height

```
Expand Down
12 changes: 12 additions & 0 deletions docs/CSS19-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ Scope: `html`

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.

* * *

```
:--ipadOS-patch
```

Preset: `--USER__iPadOSPatch: readium-iPadOSPatch-on`

Scope: `html`

Override class: None. This flag is used to activate patching of iPadOS’ desktop-class experience in Safari, which disables zoom.

* * *

```
Expand Down
2 changes: 2 additions & 0 deletions docs/CSS28-migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ It doesn’t need any change at the implementation level, and should work out of

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

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.

## Extension of the font-family user setting override

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.
Expand Down
Binary file modified docs/ReadiumCSS_docs.epub
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/ReadiumCSS_docs/OEBPS/Text/Section-006.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
</ol></li>

<li><code>ReadiumCSS-fs_normalize.css</code></li>

<li><code>ReadiumCSS-iPadOS_patch.css</code></li>
</ol>
</section>
</section>
Expand Down
14 changes: 13 additions & 1 deletion docs/ReadiumCSS_docs/OEBPS/Text/Section-012.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,18 @@ root.style.setProperty("name of var", "");</code></pre>
<p>Supported value: <code>readium-normalize-on</code></p>

<p>Override class: None.</p>
</section>

<section id="ipados-zoom-patch" class="level3">
<h3 class="sigil_not_in_toc">iPadOS Zoom Patch</h3>

<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>

<pre><code>--USER__iPadOSPatch</code></pre>

<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>
<p>Supported value: <code>readium-iPadOSPatch-on</code></p>

<p>Override class: None.</p>
</section>

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

<p>Override class: User settings (should be applied by any means necessary)</p>

<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>
</section>

<section id="line-height" class="level4">
Expand Down
10 changes: 10 additions & 0 deletions docs/ReadiumCSS_docs/OEBPS/Text/Section-019.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@

<hr/>

<pre><code>:--ipadOS-patch</code></pre>

<p>Preset: <code>--USER__iPadOSPatch: readium-iPadOSPatch-on</code></p>

<p>Scope: <code>html</code></p>

<p>Override class: None. This flag is used to activate patching of iPadOS’ desktop-class experience in Safari, which disables zoom.</p>

<hr/>

<pre><code>:--sepia-mode</code></pre>

<p>Preset: <code>--USER__appearance: readium-sepia-on</code></p>
Expand Down
2 changes: 2 additions & 0 deletions docs/ReadiumCSS_docs/OEBPS/Text/Section-028.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@
<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>

<p>As a side-effect of this new implementation, please note the <code>--USER__typeScale</code> setting is no longer available.</p>

<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>
</section>

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