Skip to content
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

Version 2 #151

Merged
merged 83 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
228bad1
Remove -webkit-perspective hack (resolves #119)
JayPanoz Jun 20, 2024
91e59fb
Remove webkit-line-box-contain safeguard (resolves #113)
JayPanoz Jun 20, 2024
ff49e4c
Remove responsive columns (resolves #143)
JayPanoz Jun 20, 2024
7b67138
Init migration guide
JayPanoz Jun 20, 2024
27ef0e1
Update migration guide
JayPanoz Jun 21, 2024
9c63005
Implement line length user setting
JayPanoz Jun 26, 2024
c020af2
Remove page margins setting
JayPanoz Jun 26, 2024
20dcacc
Fix responsive columns removal
JayPanoz Jun 26, 2024
609caae
Update migration guide
JayPanoz Jun 26, 2024
96b9199
Clarify pageGutter in migration
JayPanoz Jun 26, 2024
3bf5a5a
Add test for user line length
JayPanoz Jun 27, 2024
f3123ee
Remove page margins test
JayPanoz Jun 27, 2024
14139cc
Update version
JayPanoz Jun 27, 2024
d774cdb
Remove postcss-custom-media from build script
JayPanoz Jun 27, 2024
c646a36
Serve demo via express
JayPanoz Jun 27, 2024
619977c
Correct docs for colCount and modules order
JayPanoz Jul 2, 2024
839cd5e
Add variable fonts pref submodules
JayPanoz Jul 3, 2024
939b171
Add regression tests
JayPanoz Jul 3, 2024
502707d
Update docs for variable fonts settings
JayPanoz Jul 3, 2024
9863532
Correct comment in fontWeight submodule
JayPanoz Jul 3, 2024
4613739
Correct font width test
JayPanoz Jul 3, 2024
33d8c0b
Update docs following test corrections
JayPanoz Jul 3, 2024
62163e7
Add bold in font-weight test
JayPanoz Jul 4, 2024
ae27482
Change variable font for optical-sizing test
JayPanoz Jul 4, 2024
ee863a9
Modify font-width so that it can accept keywords
JayPanoz Jul 4, 2024
4313b87
Add variable font tests in typeface tester util
JayPanoz Jul 10, 2024
280cfda
Correct variations test and add utils to server
JayPanoz Jul 10, 2024
4a2863a
Add support for google variations in typetester
JayPanoz Jul 10, 2024
0f26685
Update libre fonts doc with variations
JayPanoz Jul 10, 2024
341c470
Add header for optical sizing
JayPanoz Jul 10, 2024
1cb5c04
Add variations’ range for libre fonts
JayPanoz Jul 11, 2024
afe10e4
Add variable fonts to fonts review
JayPanoz Jul 11, 2024
7070a99
Remove Source Sans Pro from var review
JayPanoz Jul 11, 2024
9beb179
Add 2 recommanded fonts for a11y
JayPanoz Jul 12, 2024
336b02d
Add variable fonts to md docs
JayPanoz Jul 12, 2024
4c196d8
Add MacOS variable fonts to review
JayPanoz Jul 12, 2024
6552dd0
Remove note about missing ™ in gFonts
JayPanoz Jul 12, 2024
fe018ad
Add Apple System fonts in var fonts
JayPanoz Jul 12, 2024
53aa574
Add image alts in variable fonts
JayPanoz Jul 12, 2024
063ecfc
Update migration guide
JayPanoz Jul 12, 2024
b38fcb4
Corrections in docs
JayPanoz Jul 13, 2024
6f9cecd
Add var fonts to exploded EPUB
JayPanoz Jul 15, 2024
a88a795
Add note about font collections in var docs
JayPanoz Jul 22, 2024
0e9de45
Improve default font stacks
JayPanoz Jul 22, 2024
b3a6349
Document Windows 11 variable fonts
JayPanoz Jul 22, 2024
472878b
Add Windows 11 var fonts to default stacks
JayPanoz Jul 23, 2024
113885f
Update migration guide
JayPanoz Jul 23, 2024
d93df55
Q&D improvement of type tester
JayPanoz Jul 23, 2024
aa69530
Update default font stacks in docs
JayPanoz Aug 2, 2024
ff755c3
Adding selectors to break-word safeguard
JayPanoz Jul 4, 2024
623dca9
Experiment with hidden and clip overflow
JayPanoz Jul 5, 2024
882f6c4
Update migration guide
JayPanoz Jul 12, 2024
b703f76
Replace font-size user setting with zoom
JayPanoz Jul 2, 2024
9a573d5
Update font-size and type-scale in docs
JayPanoz Jul 2, 2024
714e275
Update migration guide
JayPanoz Jul 12, 2024
49ce19f
Correct indent in fs normalize module
JayPanoz Jul 29, 2024
c0960cf
Correct namespaced selector for svg
JayPanoz Jul 29, 2024
b783bed
Update pagination model in docs
JayPanoz Jul 29, 2024
6adcd73
Update fragmented model for vertical-writing
JayPanoz Jul 29, 2024
2cf269c
Align vertical pagination with the default one
JayPanoz Jul 30, 2024
8cf4ecf
Clarify pageGutter in docs
JayPanoz Jul 30, 2024
b8c04bb
Add input in demo
JayPanoz Jul 31, 2024
a53d43a
Allow colCount pref to accept any integer
JayPanoz Aug 1, 2024
37bf973
Extend font-family setting overrides
JayPanoz Aug 1, 2024
f46f3bd
Create flag to disable vertical-writing pagination
JayPanoz Aug 1, 2024
0fc2806
Update EBPAJ font patch in dist
JayPanoz Aug 2, 2024
e10cc2a
Add script to update dist patches on build
JayPanoz Aug 2, 2024
4ec8de5
Add Android Fonts Patch
JayPanoz Aug 2, 2024
385b45b
Update migration guide with android fonts patch
JayPanoz Aug 5, 2024
4f9b62f
Update japanese font changes in docs
JayPanoz Aug 2, 2024
8a68193
Update EPUB doc
JayPanoz Aug 2, 2024
c705d33
Update migration guide
JayPanoz Aug 5, 2024
fc36a45
Add clarification re. vertical writing pagination
JayPanoz Aug 19, 2024
b696a7e
Update migration guide in EPUB docs
JayPanoz Aug 26, 2024
729c6a7
Merge branch 'develop' into v2
JayPanoz Aug 27, 2024
ec48b4d
Rebuild dist and EPUB
JayPanoz Aug 27, 2024
d60307f
Correct lineLength variable in CSS03-injection_and_pagination
JayPanoz Sep 5, 2024
9272175
Clarify migration + remove typeScale from docs
JayPanoz Sep 5, 2024
90231d9
Remove font-size normalize from doc details
JayPanoz Sep 12, 2024
5680018
Simplify pagination
JayPanoz Sep 16, 2024
2874d9b
Update dist
JayPanoz Sep 16, 2024
e9e92ee
Run audit fix
JayPanoz Sep 19, 2024
8f7d6b5
Merge branch 'develop' into v2
JayPanoz Sep 20, 2024
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
2 changes: 2 additions & 0 deletions _includes/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<li><a href="CSS08-defaults.html">Defaults</a></li>
<li><a href="CSS09-default_fonts.html">Typefaces and font-stacks</a></li>
<li><a href="CSS10-libre_fonts.html">Open Source and Libre Fonts We Can Recommend</a></li>
<li><a href="CSS10b-variable_fonts.html">Variable fonts</a></li>
<li><a href="CSS11-overrides_classification.html">User Overrides’ Classification</a></li>
<li><a href="CSS12-user_prefs.html">User Settings, Reading Modes and Themes</a></li>
<li><a href="CSS13-a11y_settings_baseline.html">Baseline for a11y-related user settings</a></li>
Expand All @@ -27,5 +28,6 @@
<li><a href="CSS25-performance_hacks.html">CSS Performance Hacks</a></li>
<li><a href="CSS26-i18n_glossary.html">i18n glossary</a></li>
<li><a href="CSS27-considered_features.html">Features that were considered but not implemented</a></li>
<li><a href="CSS28-migration_guide.html">Migration Guide</a></li>
</ol>
</nav>
39 changes: 37 additions & 2 deletions backstop.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,15 @@
"misMatchThreshold" : 0.1
},
{
"label": "Page margins pref",
"url": "http://localhost:8000/tests/margins.html",
"label": "3 columns pref",
"url": "http://localhost:8000/tests/cols-3.html",
"delay": 0,
"selectors": ["viewport"],
"misMatchThreshold" : 0.1
},
{
"label": "Line length pref",
"url": "http://localhost:8000/tests/line-length.html",
"delay": 0,
"selectors": ["viewport"],
"misMatchThreshold" : 0.1
Expand Down Expand Up @@ -201,6 +208,34 @@
"delay": 0,
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
{
"label": "Font optical sizing pref",
"url": "http://localhost:8000/tests/font-optical-sizing.html",
"delay": 0,
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
{
"label": "Font weight pref",
"url": "http://localhost:8000/tests/font-weight.html",
"delay": 0,
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
{
"label": "Font width Keyword pref",
"url": "http://localhost:8000/tests/font-width-keyword.html",
"delay": 0,
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
{
"label": "Font width Percentage pref",
"url": "http://localhost:8000/tests/font-width-percentage.html",
"delay": 0,
"selectors": ["document"],
"misMatchThreshold" : 0.1
}
],
"paths": {
Expand Down
21 changes: 2 additions & 19 deletions css/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,9 @@ By default, we inject all stylesheets on load and rely on custom properties (a.k

## Customize

ReadiumCSS ships with a `ReadiumCSS-config.css` file you can use to customize it a little bit. It allows implementers to:
ReadiumCSS ships with a `ReadiumCSS-config.css` file you can use to customize it a little bit. It allows implementers to choose selectors for the user settings’ flags.

1. define in which conditions the auto pagination model is used;
2. choose selectors for the user settings’ flags.

In order to provide this customization, we use custom media and custom selectors, which will hopefully become [standards implemented at some point](https://drafts.csswg.org/css-extensions/), but require PostCSS at the moment. Consequently, you’ll have to rebuild all `dist` stylesheets if you’re changing this file.

### Auto pagination model

The auto pagination model switches from 1 to 2 columns, and vice versa, when the conditions defined in `ReadiumCSS-config.css` are met. Further details about this model can be found in [“Injection and pagination” doc](../docs/CSS03-injection_and_pagination.md).

On desktop, `--responsive-columns` is the `min-width` at which the model must be used. Default is `60em`, a relative unit since it is responsive by default and will switch depending on the window’s dimensions and the font size.

Should you want it never or always applied, you can either define a `min-width` large or small enough, or remove the media queries entirely in `ReadiumCSS-pagination.css` and `ReadiumCSS-colNumber_pref.css`.

On mobile, `--min-device-columns` and `--max-device-columns` is the range of (minimum and maximum) device widths in which the model must be used. We are forcing the orientation in `landscape`.

We recommend not trying to apply it in portrait orientation because 2 columns will provide users with quite a terrible reading experience in this configuration.

Those custom medias may be extended at some point, depending on implementers’ feedbacks and issues.
In order to provide this customization, we use custom selectors, which will hopefully become [standards implemented at some point](https://drafts.csswg.org/css-extensions/), but require PostCSS at the moment. Consequently, you’ll have to rebuild all `dist` stylesheets if you’re changing this file.

### Flags for user settings

Expand Down
18 changes: 3 additions & 15 deletions css/ReadiumCSS-config.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@

Repo: https://github.com/readium/readium-css */

/* Custom medias
Syntax: @custom-media --variable (prop: value) */

/* Responsive columns
The minimum width for which responsive columns (2 -> 1 and vice versa,
depending on the current font-size) must be enabled */
@custom-media --responsive-columns (min-width: 60em);

/* Mobile columns
The minimum and maximum width for mobile devices.
We’re forcing the landscape orientation by default,
and must still investigate large tablets (iPad Pro, Surface Pro 3, etc.). */
@custom-media --min-device-columns (min-device-width: 36em);
@custom-media --max-device-columns (max-device-width: 47em);

/* Custom selectors
Syntax: @custom-selector :--variable selector
The selectors you will use for flags/switches
Expand All @@ -44,6 +29,9 @@
@custom-selector :--darken-filter [style*="readium-darken-on"];
@custom-selector :--invert-filter [style*="readium-invert-on"];

/* Disabling pagination for vertical writing */
@custom-selector :--no-vertical-pagination [style*="readium-noVerticalPagination-on"];

/* Hiding ruby */
@custom-selector :--no-ruby [style*="readium-noRuby-on"];

Expand Down
Loading