Skip to content

Commit c0b3a98

Browse files
committed
Introduce experimental-zoom flag
1 parent d08bd86 commit c0b3a98

3 files changed

Lines changed: 38 additions & 35 deletions

File tree

css/ReadiumCSS-config.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,7 @@
4747

4848
/* Patch for iOS and iPadOS */
4949
@custom-selector :--iOS-patch [style*="readium-iOSPatch-on"];
50-
@custom-selector :--ipadOS-patch [style*="readium-iPadOSPatch-on"];
50+
@custom-selector :--ipadOS-patch [style*="readium-iPadOSPatch-on"];
51+
52+
/* Experimental/Feature flags */
53+
@custom-selector :--experimental-zoom [style*="readium-experimentalZoom-on"];

css/src/modules/user-settings-submodules/ReadiumCSS-fontSize_pref.css

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@
1515
}
1616

1717
@supports selector(figure:has(> img)) {
18-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> img),
19-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> video),
20-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> svg),
21-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> canvas),
22-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> iframe),
23-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> audio),
24-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> img:only-child),
25-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> video:only-child),
26-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> svg:only-child),
27-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> canvas:only-child),
28-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> iframe:only-child),
29-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> audio:only-child),
30-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] table {
18+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> img),
19+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> video),
20+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> svg),
21+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> canvas),
22+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> iframe),
23+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figure:has(> audio),
24+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> img:only-child),
25+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> video:only-child),
26+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> svg:only-child),
27+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> canvas:only-child),
28+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> iframe:only-child),
29+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] div:has(> audio:only-child),
30+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] table {
3131
zoom: calc(100% / var(--USER__fontSize)) !important;
3232
}
3333

34-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figcaption,
35-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] caption,
36-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] td,
37-
:root:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] th {
34+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] figcaption,
35+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] caption,
36+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] td,
37+
:root:--experimental-zoom:not(:--deprecated-font-size):not(:--iOS-patch)[style*="--USER__fontSize"] th {
3838
zoom: var(--USER__fontSize) !important;
3939
}
4040
}

css/src/modules/user-settings-submodules/ReadiumCSS-webPubZoom_pref.css

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@
1515
}
1616

1717
@supports selector(figure:has(> img)) {
18-
:root:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> img),
19-
:root:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> video),
20-
:root:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> svg),
21-
:root:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> canvas),
22-
:root:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> iframe),
23-
:root:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> audio),
24-
:root:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> img:only-child),
25-
:root:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> video:only-child),
26-
:root:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> svg:only-child),
27-
:root:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> canvas:only-child),
28-
:root:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> iframe:only-child),
29-
:root:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> audio:only-child),
30-
:root:not(:--iOS-patch)[style*="--USER__zoom"] table {
18+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> img),
19+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> video),
20+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> svg),
21+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> canvas),
22+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> iframe),
23+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] figure:has(> audio),
24+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> img:only-child),
25+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> video:only-child),
26+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> svg:only-child),
27+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> canvas:only-child),
28+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> iframe:only-child),
29+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] div:has(> audio:only-child),
30+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] table {
3131
zoom: calc(100% / var(--USER__zoom)) !important;
3232
}
3333

34-
:root:not(:--iOS-patch)[style*="--USER__zoom"] figcaption,
35-
:root:not(:--iOS-patch)[style*="--USER__zoom"] caption,
36-
:root:not(:--iOS-patch)[style*="--USER__zoom"] td,
37-
:root:not(:--iOS-patch)[style*="--USER__zoom"] th {
34+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] figcaption,
35+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] caption,
36+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] td,
37+
:root:--experimental-zoom:not(:--iOS-patch)[style*="--USER__zoom"] th {
3838
zoom: var(--USER__zoom) !important;
3939
}
4040
}

0 commit comments

Comments
 (0)