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

NPM upgrade + Thorium ports #150

Merged
merged 47 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
33493b2
Merge branch 'master' into develop
JayPanoz May 6, 2020
274ce9b
Merge branch 'master' into develop
JayPanoz May 8, 2020
1ba225f
Correct Chinese para indent
JayPanoz May 8, 2020
cb0b18e
Merge branch 'master' into develop
JayPanoz May 16, 2020
0849bc4
Add header in dist files and remove comments
JayPanoz Jun 2, 2020
21160e9
Disable sourcemaps
JayPanoz Jun 3, 2020
756cfc4
Add postcss-clean dep for minification
JayPanoz Jun 3, 2020
17238c2
Remove Highlights module (+ its mentions)
JayPanoz Jun 3, 2020
ab2306a
Remove highlights mention from docs
JayPanoz Jun 3, 2020
0d66556
Build new beta.2 version w/o highlights + minification
JayPanoz Jun 3, 2020
8a96c01
Remove Highlights module
JayPanoz Jun 3, 2020
f926e16
Expose root width as --RS__viewportWidth variable
JayPanoz Nov 9, 2020
5b4df15
Update AccessibleDfa
mickael-menu Feb 2, 2023
b1392b9
Merge pull request #123 from mickael-menu/update-accessibledfa
danielweck Mar 11, 2024
a3f7ac0
Upgrade devDependencies
JayPanoz Mar 21, 2024
f1a6c92
Update stylelint rules
JayPanoz Mar 21, 2024
14c80b2
Downgrade custom-selectors plugin for iOS 10
JayPanoz Mar 26, 2024
fbe0465
Update devDependencies to latest
JayPanoz Apr 25, 2024
355383a
Merge pull request #142 from readium/npm-upgrade
JayPanoz Apr 25, 2024
2960348
Enable letter-spacing user setting for CJK
JayPanoz May 22, 2024
843c108
Fix safeguards for audio
JayPanoz May 22, 2024
7a84524
Fix text-align user setting
JayPanoz May 22, 2024
95a0ec0
Add ruby user submodule
JayPanoz May 22, 2024
6bdfdd1
Add tests for new settings
JayPanoz May 23, 2024
9ad046c
Adjust the Japanese font name settings in @font-face.
peaceroad May 29, 2024
b633668
Adjust the Japanese font-family settings:
peaceroad May 29, 2024
86fbd56
Remove duplicate fonts in ReadiumCSS-ebpaj_fonts_patch.css and adjust…
peaceroad May 29, 2024
2ed5e5e
Fix font name mistake in ReadiumCSS-base.css
peaceroad May 29, 2024
a458e72
Use "Yu Gothic Medium" in Windows sans-serif display
peaceroad Jun 6, 2024
64aa787
Merge pull request #146 from peaceroad/fix-japanese-font-settings
JayPanoz Jun 18, 2024
2e1bb29
Build updated dist stylesheets
JayPanoz Jun 18, 2024
0051840
Merge branch 'develop' into thorium-ports
JayPanoz Jun 20, 2024
6cdf731
Update ReadMe in dist
JayPanoz Jun 21, 2024
4443bb6
Update stylesheets order doc
JayPanoz Jul 2, 2024
a52291f
Update EBPAJ font patch in dist
JayPanoz Aug 2, 2024
5826a7b
Add script to update dist patches on build
JayPanoz Aug 2, 2024
738b732
Update japanese font changes in docs
JayPanoz Aug 2, 2024
d1b7516
Merge branch 'develop' of https://github.com/readium/readium-css into…
JayPanoz Aug 13, 2024
7d96198
Update packaged EPUB doc
JayPanoz Aug 13, 2024
754a177
Merge pull request #145 from readium/thorium-ports
JayPanoz Aug 27, 2024
de2f556
Remove mention of beta from ReadMe
JayPanoz Aug 27, 2024
a75bc30
Add GitHub workflow node.js.yml
JayPanoz Sep 2, 2024
0910745
Simplify build script
JayPanoz Sep 2, 2024
d234cfe
Correct workflow name
JayPanoz Sep 2, 2024
c689d50
Update workflow to commit only dist
JayPanoz Sep 3, 2024
4ef13a1
clarify workflow through its comment
JayPanoz Sep 3, 2024
0773e5f
run npm audit fix
JayPanoz Sep 3, 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
33 changes: 33 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, and build the source code into dist stylesheets. If these are different from the existing ones, it will automatically commit them into the current branch on push and PR events.
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: "css/dist/**"
commit_message: Update dist
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ Readium CSS provides styles for reflowable text:
- reading modes (day, night, and sepia);
- themes;
- user settings;
- media overlays and user highlights;
- a set of baselines and recommendations for accessibility, overrides, and internationalization.

**Readium CSS is currently in alpha** (version `1.0.0-beta.1`).

## License

BSD-3-Clause (http://opensource.org/licenses/BSD-3-Clause)
Expand Down Expand Up @@ -47,6 +44,46 @@ There is no external implementation of Readium CSS so far.

Consequently, if you are encountering rendering issues with Readium (iOS apps, Android apps, or the Readium Chrome App), please report them on the [github section dedicated to the proper Readium project](https://github.com/readium) (readium-js, readium-shared-js, readium-sdk, etc.).

## Development

Active development is pulled in branch `develop` first, and then made available in the main branch when sufficiently tested and deemed stable.

### Init

Building and testing are relying on npm packages and scripts. To initialize your clone/fork, first install dev dependencies:

```
npm install
```

In case you’re encountering an error with Puppeteer, make sure you’re using at least Node v.20.11.1 – it might work with an earlier version but only the latest LTS as of March 21, 2024 has been tested.

Then create reference bitmaps for visual regression testing:

```
npm run test:ref
```

### Build

To transpile all stylesheets using PostCSS:

```
npm run build
```

To test the updated styles and catch visual regression bugs:

```
npm run test
```

To update reference bitmaps after a bugfix:

```
npm run test:approve
```

## Docs

Documentation [can be accessed in docs](docs).
Expand Down
16 changes: 15 additions & 1 deletion backstop.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
{
"label": "Letterspacing CJK pref",
"url": "http://localhost:8000/tests/letter-spacing-cjk.html",
"delay": 0,
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
{
"label": "Ligatures pref",
"url": "http://localhost:8000/tests/arabic-ligatures.html",
Expand All @@ -170,7 +177,7 @@
{
"label": "Accessibility font pref",
"url": "http://localhost:8000/tests/a11y-font.html",
"delay": 0,
"delay": 200,
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
Expand All @@ -184,6 +191,13 @@
{
"label": "Accessibility custom pref",
"url": "http://localhost:8000/tests/a11y-custom.html",
"delay": 200,
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
{
"label": "no Ruby pref",
"url": "http://localhost:8000/tests/no-ruby.html",
"delay": 0,
"selectors": ["document"],
"misMatchThreshold" : 0.1
Expand Down
3 changes: 1 addition & 2 deletions css/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Readium CSS is a set of reference stylesheets for EPUB Reading Systems. It provi
- default styles;
- reading modes (night, sepia, etc.);
- themes;
- user settings;
- media overlays and user highlights.
- user settings.

**Note:** Readium CSS stylesheets were not designed and should not be used for fixed-layout EPUB, nor other file formats like FB2, PRC, Mobi, TEI, etc.

Expand Down
3 changes: 3 additions & 0 deletions css/ReadiumCSS-config.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
@custom-selector :--darken-filter [style*="readium-darken-on"];
@custom-selector :--invert-filter [style*="readium-invert-on"];

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

/* Accessibility normalization */
@custom-selector :--a11y-normalize [style*="readium-a11y-on"];

Expand Down
14 changes: 10 additions & 4 deletions css/dist/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ Disabled user settings:
- `text-align`;
- `hyphens`;
- 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 @@ -87,8 +90,11 @@ Disabled user settings:
- `text-align`;
- `hyphens`;
- 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 Down
Loading