Skip to content

Commit 6e282bc

Browse files
authored
Merge pull request #201 from readium/experimental-webPub
Experimental web pub
2 parents a9eda0f + 6e0766f commit 6e282bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+616
-73
lines changed

css/dist/ReadMe.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ Disabled user settings:
2727
- `hyphens`;
2828
- `letter-spacing`.
2929

30-
Added user settings:
31-
32-
- `font-variant-ligatures` (mapped to `--USER__ligatures` CSS variable).
33-
3430
## CJK
3531

3632
Chinese, Japanese, Korean, and Mongolian can be either written `horizontal-tb` or `vertical-*`. Consequently, there are stylesheets for horizontal and vertical writing modes.
@@ -52,6 +48,7 @@ Disabled user settings:
5248

5349
- `text-align`;
5450
- `hyphens`;
51+
- `ligatures`;
5552
- paragraphs’ indent;
5653
- `word-spacing`.
5754

@@ -88,6 +85,7 @@ Disabled user settings:
8885
- `column-count` (number of columns);
8986
- `text-align`;
9087
- `hyphens`;
88+
- `ligatures`;
9189
- paragraphs’ indent;
9290
- `word-spacing`.
9391

css/dist/ReadiumCSS-after.css

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.21
2+
* Readium CSS v.2.0.0-beta.22
33
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
44
* Use of this source code is governed by a BSD-style license which is detailed in the
55
* LICENSE file present in the project repository where this source code is maintained.
@@ -297,10 +297,36 @@ body{
297297
zoom:var(--USER__fontSize) !important;
298298
}
299299

300-
:root[style*="readium-iOSPatch-on"][style*="--USER__fontSize"] body{
300+
:root:not([style*="readium-deprecatedFontSize-on"])[style*="readium-iOSPatch-on"][style*="--USER__fontSize"] body{
301301
-webkit-text-size-adjust:var(--USER__fontSize) !important;
302302
}
303303

304+
@supports selector(figure:has(> img)){
305+
306+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> img),
307+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> video),
308+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> svg),
309+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> canvas),
310+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> iframe),
311+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> audio),
312+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> img),
313+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> video),
314+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> svg),
315+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> canvas),
316+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> iframe),
317+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> audio),
318+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] table{
319+
zoom:calc(100% / var(--USER__fontSize)) !important;
320+
}
321+
322+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figcaption,
323+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] caption,
324+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] td,
325+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] th{
326+
zoom:var(--USER__fontSize) !important;
327+
}
328+
}
329+
304330
@supports not (zoom: 1){
305331

306332
:root[style*="--USER__fontSize"]{
@@ -366,6 +392,14 @@ body{
366392
font-variant:none;
367393
}
368394

395+
:root[style*="--USER__ligatures"]{
396+
font-variant-ligatures:var(--USER__ligatures) !important;
397+
}
398+
399+
:root[style*="--USER__ligatures"] *{
400+
font-variant-ligatures:inherit !important;
401+
}
402+
369403
:root[style*="--USER__fontWeight"] body{
370404
font-weight:var(--USER__fontWeight) !important;
371405
}

css/dist/ReadiumCSS-before.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.21
2+
* Readium CSS v.2.0.0-beta.22
33
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
44
* Use of this source code is governed by a BSD-style license which is detailed in the
55
* LICENSE file present in the project repository where this source code is maintained.

css/dist/ReadiumCSS-default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.21
2+
* Readium CSS v.2.0.0-beta.22
33
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
44
* Use of this source code is governed by a BSD-style license which is detailed in the
55
* LICENSE file present in the project repository where this source code is maintained.

css/dist/cjk-horizontal/ReadiumCSS-after.css

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.21
2+
* Readium CSS v.2.0.0-beta.22
33
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
44
* Use of this source code is governed by a BSD-style license which is detailed in the
55
* LICENSE file present in the project repository where this source code is maintained.
@@ -221,10 +221,36 @@ body{
221221
zoom:var(--USER__fontSize) !important;
222222
}
223223

224-
:root[style*="readium-iOSPatch-on"][style*="--USER__fontSize"] body{
224+
:root:not([style*="readium-deprecatedFontSize-on"])[style*="readium-iOSPatch-on"][style*="--USER__fontSize"] body{
225225
-webkit-text-size-adjust:var(--USER__fontSize) !important;
226226
}
227227

228+
@supports selector(figure:has(> img)){
229+
230+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> img),
231+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> video),
232+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> svg),
233+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> canvas),
234+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> iframe),
235+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> audio),
236+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> img),
237+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> video),
238+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> svg),
239+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> canvas),
240+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> iframe),
241+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> audio),
242+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] table{
243+
zoom:calc(100% / var(--USER__fontSize)) !important;
244+
}
245+
246+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figcaption,
247+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] caption,
248+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] td,
249+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] th{
250+
zoom:var(--USER__fontSize) !important;
251+
}
252+
}
253+
228254
@supports not (zoom: 1){
229255

230256
:root[style*="--USER__fontSize"]{

css/dist/cjk-horizontal/ReadiumCSS-before.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.21
2+
* Readium CSS v.2.0.0-beta.22
33
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
44
* Use of this source code is governed by a BSD-style license which is detailed in the
55
* LICENSE file present in the project repository where this source code is maintained.

css/dist/cjk-horizontal/ReadiumCSS-default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.21
2+
* Readium CSS v.2.0.0-beta.22
33
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
44
* Use of this source code is governed by a BSD-style license which is detailed in the
55
* LICENSE file present in the project repository where this source code is maintained.

css/dist/cjk-vertical/ReadiumCSS-after.css

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.21
2+
* Readium CSS v.2.0.0-beta.22
33
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
44
* Use of this source code is governed by a BSD-style license which is detailed in the
55
* LICENSE file present in the project repository where this source code is maintained.
@@ -206,10 +206,36 @@ body{
206206
zoom:var(--USER__fontSize) !important;
207207
}
208208

209-
:root[style*="readium-iOSPatch-on"][style*="--USER__fontSize"] body{
209+
:root:not([style*="readium-deprecatedFontSize-on"])[style*="readium-iOSPatch-on"][style*="--USER__fontSize"] body{
210210
-webkit-text-size-adjust:var(--USER__fontSize) !important;
211211
}
212212

213+
@supports selector(figure:has(> img)){
214+
215+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> img),
216+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> video),
217+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> svg),
218+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> canvas),
219+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> iframe),
220+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> audio),
221+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> img),
222+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> video),
223+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> svg),
224+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> canvas),
225+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> iframe),
226+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> audio),
227+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] table{
228+
zoom:calc(100% / var(--USER__fontSize)) !important;
229+
}
230+
231+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figcaption,
232+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] caption,
233+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] td,
234+
:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] th{
235+
zoom:var(--USER__fontSize) !important;
236+
}
237+
}
238+
213239
@supports not (zoom: 1){
214240

215241
:root[style*="--USER__fontSize"]{

css/dist/cjk-vertical/ReadiumCSS-before.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.21
2+
* Readium CSS v.2.0.0-beta.22
33
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
44
* Use of this source code is governed by a BSD-style license which is detailed in the
55
* LICENSE file present in the project repository where this source code is maintained.

css/dist/cjk-vertical/ReadiumCSS-default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.21
2+
* Readium CSS v.2.0.0-beta.22
33
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
44
* Use of this source code is governed by a BSD-style license which is detailed in the
55
* LICENSE file present in the project repository where this source code is maintained.

0 commit comments

Comments
 (0)