Skip to content

Commit

Permalink
Clarify migration + remove typeScale from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JayPanoz committed Sep 5, 2024
1 parent d60307f commit 9272175
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 43 deletions.
2 changes: 1 addition & 1 deletion docs/CSS18-further_details.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The scale to be used for computing all elements’ `font-size`. Since those font

Possible values: `1` | `1.067` | `1.125` (suggested default) | `1.2` | `1.25` | `1.333` | `1.414` | `1.5` | `1.618`

The suggested default will accomodate most configurations, from small to large screens. Please note it is different from the `--USER__typeScale` suggested default, which was designed to accomodate the publisher’s styles.
The suggested default will accomodate most configurations, from small to large screens.

* * *

Expand Down
20 changes: 0 additions & 20 deletions docs/CSS19-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,26 +748,6 @@ To reset, remove the required flag.

* * *

```
--USER__typeScale
```

The type scale the user wants to use for the publication.

Scope: `html`

It requires the `ReadiumCSS-fs_normalize.css` stylesheet.

It impacts headings, `p`, `li`, `div`, `pre`, `dd`, `small`, `sub`, and `sup`.

Recommended values: a range from `75%` to `250%`. Increments are left to implementers’ judgment.

Required flag: `:--advancedSettings`

Override class: User settings advanced (optional but should be applied by any means necessary if provided to users)

* * *

```
--USER__lineHeight
```
Expand Down
7 changes: 6 additions & 1 deletion docs/CSS28-migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ This is no longer supported in version 2, as it has been replaced with a user se

The user setting should consequently be updated, either in the form of replacement or mimicking of the old one.

It is indeed possible to re-implement the page margins user setting by using the new variable, given margin will adjust automatically to the line length, but this also means that your updated logic will have to work backwards.
It is indeed possible to re-implement the page margins user setting by using the new variable, given margin will adjust automatically to the line length, but this also means that your updated logic will have to work backwards:

- in version 1, you would just decrease/increase the value of `--USER__pageMargins`.
- in version 2, you would decrease `--USER__lineLength` to increase page margins, and increase `--USER__lineLength` to decrease page margins.

Otherwise, the line-length user setting can be a set of predefined values, a range, etc. It accepts the values that the CSS properties `max-width|height` do.

Expand Down Expand Up @@ -103,6 +106,8 @@ In version 2, ReadiumCSS switched to `zoom`, which makes the patch no longer nee

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.

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

## 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
1 change: 0 additions & 1 deletion docs/ReadiumCSS-user_variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

--USER__fontFamily: ; /* font stacks e.g. var(--RS__oldStyleTf) */
--USER__fontSize: ; /* 12 = 75%, 14 = 87.5%, 16 = 100%, 18 = 112.5%, 22 = 137.5%, 24 = 150%, 26 = 162.5%, 28 = 175%, 32 = 200%, 36 = 225%, 40 = 250% */
--USER__typeScale: ; /* 1.067 | 1.125 | 1.2 | 1.25 | 1.333 | 1.414 | 1.5 | 1.618 */
--USER__lineHeight: ; /* may depend on font size? */

--USER__paraSpacing: ; /* 0, 0.375rem, 0.75rem, 1rem, 1.25rem, 1.5rem, 1.65rem, 1.75rem, 2rem */
Expand Down
Binary file modified docs/ReadiumCSS_docs.epub
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/ReadiumCSS_docs/OEBPS/Text/Section-018.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

<p>Possible values: <code>1</code> | <code>1.067</code> | <code>1.125</code> (suggested default) | <code>1.2</code> | <code>1.25</code> | <code>1.333</code> | <code>1.414</code> | <code>1.5</code> | <code>1.618</code></p>

<p>The suggested default will accomodate most configurations, from small to large screens. Please note it is different from the <code>--USER__typeScale</code> suggested default, which was designed to accomodate the publisher’s styles.</p>
<p>The suggested default will accomodate most configurations, from small to large screens.</p>

<hr/>

Expand Down
18 changes: 0 additions & 18 deletions docs/ReadiumCSS_docs/OEBPS/Text/Section-019.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -666,24 +666,6 @@

<hr/>

<pre><code>--USER__typeScale</code></pre>

<p>The type scale the user wants to use for the publication.</p>

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

<p>It requires the <code>ReadiumCSS-fs_normalize.css</code> stylesheet.</p>

<p>It impacts headings, <code>p</code>, <code>li</code>, <code>div</code>, <code>pre</code>, <code>dd</code>, <code>small</code>, <code>sub</code>, and <code>sup</code>.</p>

<p>Recommended values: a range from <code>75%</code> to <code>250%</code>. Increments are left to implementers’ judgment.</p>

<p>Required flag: <code>:--advancedSettings</code></p>

<p>Override class: User settings advanced (optional but should be applied by any means necessary if provided to users)</p>

<hr/>

<pre><code>--USER__lineHeight</code></pre>

<p>Increasing and decreasing leading (<code>line-height</code>).</p>
Expand Down
10 changes: 9 additions & 1 deletion docs/ReadiumCSS_docs/OEBPS/Text/Section-028.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@

<p>The user setting should consequently be updated, either in the form of replacement or mimicking of the old one.</p>

<p>It is indeed possible to re-implement the page margins user setting by using the new variable, given margin will adjust automatically to the line length, but this also means that your updated logic will have to work backwards.</p>
<p>It is indeed possible to re-implement the page margins user setting by using the new variable, given margin will adjust automatically to the line length, but this also means that your updated logic will have to work backwards:</p>

<ul>
<li>in version 1, you would just decrease/increase the value of <code>--USER__pageMargins.</code></li>

<li>in version 2, you would decrease <code>--USER__lineLength</code> to increase page margins, and increase <code>--USER__lineLength</code> to decrease page margins.</li>
</ul>

<p>Otherwise, the line-length user setting can be a set of predefined values, a range, etc. It accepts the values that the CSS properties <code>max-width|height</code> do.</p>

Expand Down Expand Up @@ -117,6 +123,8 @@
<p>In version 2, ReadiumCSS switched to <code>zoom</code>, which makes the patch no longer needed, except for rendering engines/browsers that don’t support this CSS property.</p>

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

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

0 comments on commit 9272175

Please sign in to comment.