aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorShin Sang-jae <codelabor@gmail.com>2020-11-28 02:11:40 +0900
committerGitHub <noreply@github.com>2020-11-27 09:11:40 -0800
commit97b70d20bbd266d627a402360b0fd682f53355a3 (patch)
treeee8441c1d40dcbf1c8b2c04a8f5f07645586d4f4 /data
parenta9c766291f529ffe50c0415a03f06f9756a0a5f0 (diff)
downloadpandoc-97b70d20bbd266d627a402360b0fd682f53355a3.tar.gz
EPUB: use preserveAspectRatio="xMidYMid" for cover image (#6895)
This change affects both the epub2 and the epub3 templates. It avoids distortion of the cover image by requiring that the aspect ratio be preserved.
Diffstat (limited to 'data')
-rw-r--r--data/templates/default.epub22
-rw-r--r--data/templates/default.epub32
2 files changed, 2 insertions, 2 deletions
diff --git a/data/templates/default.epub2 b/data/templates/default.epub2
index f440134df..685d10208 100644
--- a/data/templates/default.epub2
+++ b/data/templates/default.epub2
@@ -48,7 +48,7 @@ $endif$
$else$
$if(coverpage)$
<div id="cover-image">
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 $cover-image-width$ $cover-image-height$" preserveAspectRatio="none">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 $cover-image-width$ $cover-image-height$" preserveAspectRatio="xMidYMid">
<image width="$cover-image-width$" height="$cover-image-height$" xlink:href="../media/$cover-image$" />
</svg>
</div>
diff --git a/data/templates/default.epub3 b/data/templates/default.epub3
index 4f5bd6641..fc4fa7620 100644
--- a/data/templates/default.epub3
+++ b/data/templates/default.epub3
@@ -49,7 +49,7 @@ $endif$
$else$
$if(coverpage)$
<div id="cover-image">
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 $cover-image-width$ $cover-image-height$" preserveAspectRatio="none">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 $cover-image-width$ $cover-image-height$" preserveAspectRatio="xMidYMid">
<image width="$cover-image-width$" height="$cover-image-height$" xlink:href="../media/$cover-image$" />
</svg>
</div>