Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d8ab419
Configure pnpm and makefile to install CSS
stevenzeck Aug 17, 2026
2486b7f
Update CSS files
stevenzeck Aug 17, 2026
5186009
Add noRuby property
stevenzeck Aug 17, 2026
dd488cd
Replace maxLineLength with defaultLineLength
stevenzeck Aug 17, 2026
560b492
Add additional properties
stevenzeck Aug 17, 2026
f67bb65
Add overrides
stevenzeck Aug 17, 2026
2d1919a
Add tests
stevenzeck Aug 17, 2026
5b7b258
Update documentation
stevenzeck Aug 17, 2026
4a4d140
Convert CSS tests to Swift testing
stevenzeck Aug 17, 2026
6aff721
Change columnCount from enum to Int
stevenzeck Aug 18, 2026
5897899
Add lineLength
stevenzeck Aug 18, 2026
14e56f0
Remove imageFilter, add blendImages, darkenImages, invertImages, and …
stevenzeck Aug 18, 2026
64b42a0
Fix darkenImages behavior
stevenzeck Aug 18, 2026
adc8644
Merge branch 'develop' into css-v2
stevenzeck Sep 16, 2026
83688e2
Fix merge issue
stevenzeck Sep 16, 2026
4962e2b
Use algorithm for reader layout
stevenzeck Sep 22, 2026
4029646
Add and update tests
stevenzeck Sep 22, 2026
1e8f0b2
Fix deprecation in old test
stevenzeck Sep 22, 2026
bd4d495
Merge branch 'develop' into css-v2
stevenzeck Sep 22, 2026
839ed6c
Merge branch 'develop' of github.com:readium/swift-toolkit into css-v2
mickael-menu Sep 25, 2026
78a79fa
Fix the CHANGELOG
mickael-menu Sep 25, 2026
1f174cc
Remove Readium CSS v1 flags and the `publisherStyles` preference
mickael-menu Sep 25, 2026
a21946c
Hide empty preference sections automatically in the TestApp
mickael-menu Sep 25, 2026
90708f6
Remove the `typeScale` preference
mickael-menu Sep 25, 2026
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
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ All notable changes to this project will be documented in this file. Take a look
#### Navigator

* `AudioNavigator.stop()` stops the playback and ends the audio session.
* Upgraded Readium CSS to version 2.0.5.
* Added the `noRuby` preference to allow hiding ruby (furigana) annotations in CJK publications.
* Added the `lineLength` preference, which behaves as a factor applied to the maximum width of the text column, offering finer control over text presentation than `pageMargins` (which solely handles the padding around the text).
* Added `blendImages`, `darkenImages`, `invertImages`, and `invertGaiji` preferences for precise CSS filtering of images.
* Added `CSSRSProperties.defaultLineLength`, `viewportWidth`, `scrollPaddingTop`, `scrollPaddingBottom`, `scrollPaddingLeft`, and `scrollPaddingRight` to configure Readium CSS v2 reading system properties.
* Added optional CSS minification to the build scripts (`make scripts minify=true`).

### Changed

Expand All @@ -21,6 +27,16 @@ All notable changes to this project will be documented in this file. Take a look
* `end(with:)` takes the `AudioSessionUser` instead of an `AudioSessionToken`, which is removed.
* `NowPlayingInfo.Media.chapterNumber` moved to `NowPlayingInfo.Playback.chapterNumber`, [see the migration guide](docs/Migration%20Guide.md).

#### Navigator

* Changes in the EPUB navigator preferences, following the upgrade to Readium CSS v2.
* `CSSRSProperties.maxLineLength` is deprecated in favor of `defaultLineLength` to match Readium CSS v2, [see the migration guide](docs/Migration%20Guide.md).
* Changed `columnCount` preference in `EPUBPreferences`, `EPUBSettings`, and `EPUBDefaults` to `Int` to support arbitrary column counts. The `ColumnCount` enum is removed, [see the migration guide](docs/Migration%20Guide.md).
* Replaced the `imageFilter` preference with `blendImages`, `darkenImages`, `invertImages`, and `invertGaiji`. The `ImageFilter` enum is removed, [see the migration guide](docs/Migration%20Guide.md).
* Removed the `publisherStyles` preference. Readium CSS v2 applies the user settings as soon as they are set, [see the migration guide](docs/Migration%20Guide.md).
* Removed the `typeScale` preference, as the type scale user setting is no longer available in Readium CSS v2.
* Removed `CSSUserProperties.fontOverride`, `advancedSettings`, and `pageMargins`, which don't exist in Readium CSS v2.

### Fixed

#### Navigator
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ help:
\t\t\tUse 'lcp=<url>' to enable LCP.\n\
podspecs\t\tGenerate the CocoaPods podspecs\n\
scripts\t\tBundle the Navigator EPUB scripts\n\
\t\t\tUse 'minify=true' to minify CSS assets.\n\
test\t\t\tRun unit tests\n\
\t\t\tUse 'only=<target>' to run a single test target.\n\
lint-format\t\tVerify formatting\n\
Expand Down Expand Up @@ -65,7 +66,7 @@ scripts:
pnpm run lint && \
pnpm run typecheck && \
pnpm run test && \
pnpm run bundle
MINIFY_CSS=$(minify) pnpm run bundle

.PHONY: update-scripts
update-scripts:
Expand Down
27 changes: 16 additions & 11 deletions Sources/Navigator/EPUB/Assets/Static/readium-css/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ Finally, page progression is impacted:
Disabled user settings:

- `hyphens`;
- `word-spacing`;
- a11y text normalization (`a11yNormalize`);
- `letter-spacing`.

Added user settings:

- `font-variant-ligatures` (mapped to `--USER__ligatures` CSS variable).

## CJK

Chinese, Japanese, Korean, and Mongolian can be either written `horizontal-tb` or `vertical-*`. Consequently, there are stylesheets for horizontal and vertical writing modes.
Expand All @@ -53,9 +49,14 @@ Disabled user settings:

- `text-align`;
- `hyphens`;
- a11y text normalization (`a11yNormalize`);
- `ligatures`;
- paragraphs’ indent;
- `word-spacing`;
- `letter-spacing`.
- `word-spacing`.

Added user settings:

- hiding/disabling ruby (mapped to `--USER__noRuby: readium-noRuby-on` flag).

### Vertical

Expand Down Expand Up @@ -86,9 +87,14 @@ Disabled user settings:
- `column-count` (number of columns);
- `text-align`;
- `hyphens`;
- a11y text normalization (`a11yNormalize`);
- `ligatures`;
- paragraphs’ indent;
- `word-spacing`;
- `letter-spacing`.
- `word-spacing`.

Added user settings:

- hiding/disabling ruby (mapped to `--USER__noRuby: readium-noRuby-on` flag).

### EBPAJ Polyfill

Expand All @@ -108,5 +114,4 @@ This is currently an edge case as we still have to see whether we want to suppor
- Traditional is written `vertical-lr` so we can’t use `page-progression-direction` as an hint, and we must check if the language item (`mn`) is enough:
- if `mn-Mong` is set, then `vertical-lr` must be used;
- if `mn-Cyrl` is set, then the publication is in cyrillic and it is `horizontal-tb`.
- We don’t currently support the `mn` language, and we can’t rely on system fonts to do so, we’ll have to embed one.

- We don’t currently support the `mn` language, and we can’t rely on system fonts to do so, we’ll have to embed one.
Loading
Loading