Skip to content

Commit f3f1b90

Browse files
authored
Merge pull request #215 from readium/safeguards-compensation
Add Zoom compensation for viewport units
2 parents aa61484 + 3641f39 commit f3f1b90

16 files changed

Lines changed: 75 additions & 18 deletions

css/dist/ReadiumCSS-after.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.25
2+
* Readium CSS v.2.0.0
33
* Copyright (c) 2017–2026. 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-before.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.25
2+
* Readium CSS v.2.0.0
33
* Copyright (c) 2017–2026. 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.
@@ -400,6 +400,15 @@ img, svg|svg, video{
400400
break-inside:avoid;
401401
}
402402

403+
@supports (zoom: 1) and (not ((-webkit-column-axis: horizontal) and (-webkit-column-progression: normal))){
404+
405+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] img,
406+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] svg|svg,
407+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] video{
408+
zoom:calc(100% / var(--USER__fontSize));
409+
}
410+
}
411+
403412
audio{
404413
max-width:100%;
405414
-webkit-column-break-inside:avoid;

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.25
2+
* Readium CSS v.2.0.0
33
* Copyright (c) 2017–2026. 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: 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.25
2+
* Readium CSS v.2.0.0
33
* Copyright (c) 2017–2026. 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-before.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.25
2+
* Readium CSS v.2.0.0
33
* Copyright (c) 2017–2026. 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.
@@ -400,6 +400,15 @@ img, svg|svg, video{
400400
break-inside:avoid;
401401
}
402402

403+
@supports (zoom: 1) and (not ((-webkit-column-axis: horizontal) and (-webkit-column-progression: normal))){
404+
405+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] img,
406+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] svg|svg,
407+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] video{
408+
zoom:calc(100% / var(--USER__fontSize));
409+
}
410+
}
411+
403412
audio{
404413
max-width:100%;
405414
-webkit-column-break-inside:avoid;

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.25
2+
* Readium CSS v.2.0.0
33
* Copyright (c) 2017–2026. 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: 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.25
2+
* Readium CSS v.2.0.0
33
* Copyright (c) 2017–2026. 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-before.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Readium CSS v.2.0.0-beta.25
2+
* Readium CSS v.2.0.0
33
* Copyright (c) 2017–2026. 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.
@@ -400,6 +400,16 @@ img, svg|svg, video{
400400
break-inside:avoid;
401401
}
402402

403+
@supports (zoom: 1) and (not ((-webkit-column-axis: horizontal) and (-webkit-column-progression: normal))){
404+
405+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] img,
406+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] svg|svg,
407+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] video,
408+
:root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div{
409+
zoom:calc(100% / var(--USER__fontSize));
410+
}
411+
}
412+
403413
audio{
404414
max-width:100%;
405415
-webkit-column-break-inside:avoid;
@@ -409,5 +419,5 @@ audio{
409419

410420
table{
411421
max-height:var(--RS__maxMediaWidth);
412-
box-sizing:var(--RS__boxSizingTable)
422+
box-sizing:var(--RS__boxSizingTable);
413423
}

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.25
2+
* Readium CSS v.2.0.0
33
* Copyright (c) 2017–2026. 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/rtl/ReadiumCSS-after.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.25
2+
* Readium CSS v.2.0.0
33
* Copyright (c) 2017–2026. 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)