Skip to content

Commit 9611980

Browse files
committed
Update docs
1 parent 90bf5dd commit 9611980

8 files changed

+59
-3
lines changed

docs/CSS12-user_prefs.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,23 @@ Override class: None. This flag is required to change the `font-family` user set
8989

9090
To switch back to the publisher’s font, you can either set an empty string as a value or remove the property.
9191

92+
### Toggling the Deprecated Implementation of the Font Size Setting
93+
94+
Allows to switch to the Deprecated Implementation of the Font Size Setting from version 1.
95+
96+
```
97+
--USER__fontSizeImplementation
98+
```
99+
100+
Supported value: `readium-deprecatedFontSize-on`
101+
102+
Override class: None.
103+
104+
**Note:** This implementation will automatically be used in case `zoom` is not supported.
105+
92106
### Font Size Normalization
93107

94-
Acts as an explicit switch to force font-normalization in publications whose font-sizing is declared using CSS absolute units, breaking the font-size user setting in engines that don’t support CSS property `zoom`.
108+
Acts as an explicit switch to force font-normalization in publications whose font-sizing is declared using CSS absolute units, breaking the font-size user setting.
95109

96110
```
97111
--USER__fontSizeNormalize

docs/CSS19-api.md

+12
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ Scope: `html`
7474

7575
Override class: None. This flag is required to change the `font-family` user setting.
7676

77+
* * *
78+
79+
```
80+
:--deprecated-font-size
81+
```
82+
83+
Preset: `--USER__fontSizeImplementation: readium-deprecatedFontSize-on`
84+
85+
Scope: `html`
86+
87+
Override class: None. This flag can be used to force the previous and deprecated implementation of font-size setting. It is also used automatically if the browser/rendering engine does not support CSS property `zoom` – note font-size normalization is not triggered by default in that case.
88+
7789
* * *
7890

7991
```

docs/CSS28-migration_guide.md

+4
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ As a side-effect of this new implementation, please note the `--USER__typeScale`
110110

111111
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.
112112

113+
Starting version `2.0.0-beta.12` the previous and deprecated implementation of font-size is exposed under a flag that can be configured (`:--deprecated-font-size`) and is `[style*="readium-deprecatedFontSize-on"]` by default. This can be used if you need some time to switch to the new implementation, or simply prefer to use the old one. The font-size normalize is no longer applied by default though, and is relying on another flag (`:--fs-normalize`) with `[style*="readium-normalize-on"]` as default.
114+
115+
Note that when zoom is not supported, the setting will automatically switch to the previous implementation. Once again, you need to manually apply the font-size normalization as you see fit.
116+
113117
## Extension of the font-family user setting override
114118

115119
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

358 Bytes
Binary file not shown.

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

+13-1
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,22 @@ root.style.setProperty("name of var", "");</code></pre>
109109
<p>To switch back to the publisher’s font, you can either set an empty string as a value or remove the property.</p>
110110
</section>
111111

112+
<section id="toggling-font-size-implementation" class="level3">
113+
<h3 class="sigil_not_in_toc">Toggling the Deprecated Implementation of the Font Size Setting</h3>
114+
115+
<p>Allows to switch to the Deprecated Implementation of the Font Size Setting from version 1.</p>
116+
117+
<pre><code>--USER__fontSizeImplementation</code></pre>
118+
119+
<p>Supported value: <code>readium-deprecatedFontSize-on</code></p>
120+
121+
<p>Override class: None.</p>
122+
</section>
123+
112124
<section id="font-size-normalization" class="level3">
113125
<h3 class="sigil_not_in_toc">Font Size Normalization</h3>
114126

115-
<p>Acts as an explicit switch to orce font-normalization in publications whose font-sizing is declared using CSS absolute units, breaking the font-size user setting in engines that don’t support CSS property <code>zoom</code>.</p>
127+
<p>Acts as an explicit switch to orce font-normalization in publications whose font-sizing is declared using CSS absolute units, breaking the font-size user setting.</p>
116128

117129
<pre><code>--USER__fontSizeNormalize</code></pre>
118130

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

+10
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@
8080

8181
<hr/>
8282

83+
<pre><code>:--deprecated-font-size</code></pre>
84+
85+
<p>Preset: <code>--USER__fontSizeImplementation: readium-deprecatedFontSize-on</code></p>
86+
87+
<p>Scope: <code>html</code></p>
88+
89+
<p>Override class: None. This flag can be used to force the previous and deprecated implementation of font-size setting. It is also used automatically if the browser/rendering engine does not support CSS property <code>zoom</code> – note font-size normalization is not triggered by default in that case.</p>
90+
91+
<hr/>
92+
8393
<pre><code>:--fs-normalize</code></pre>
8494

8595
<p>Preset: <code>--USER__fontSizeNormalize: readium-normalize-on</code></p>

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

+4
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@
127127
<p>As a side-effect of this new implementation, please note the <code>--USER__typeScale</code> setting is no longer available.</p>
128128

129129
<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>
130+
131+
<p>Starting version <code>2.0.0-beta.12</code> the previous and deprecated implementation of font-size is exposed under a flag that can be configured (<code>:--deprecated-font-size</code>) and is <code>[style*="readium-deprecatedFontSize-on"]</code> by default. This can be used if you need some time to switch to the new implementation, or simply prefer to use the old one. The font-size normalize is no longer applied by default though, and is relying on another flag (<code>:--fs-normalize</code>) with <code>[style*="readium-normalize-on"]</code> as default.</p>
132+
133+
<p>Note that when zoom is not supported, the setting will automatically switch to the previous implementation. Once again, you need to manually apply the font-size normalization as you see fit.</p>
130134
</section>
131135

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

tests/font-size-normalize.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html style="--USER__view: readium-scroll-on; --USER__fsImplementation: readium-deprecatedFontSize-on; --USER__fontSize: 200%; --USER__fsNormalize: readium-normalize-on;">
2+
<html style="--USER__view: readium-scroll-on; --USER__fontSizeImplementation: readium-deprecatedFontSize-on; --USER__fontSize: 200%; --USER__fontSizeNormalize: readium-normalize-on;">
33
<head>
44
<title>Test</title>
55
<meta charset="UTF-8" />

0 commit comments

Comments
 (0)