summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2018-02-16 02:19:25 -0700
committerDan Allen <dan.j.allen@gmail.com>2018-02-16 02:39:23 -0700
commit300689cb782d4355e5ac317d60e7a8b6488d7e31 (patch)
tree81254375278f7d1e2ad9bba07bc7f8f2c7a3cc1b /data
parent45b9dab196ba2d4ded590946dece5eba17ac59c6 (diff)
resolves #5 package inline images
* enable catalog_assets option on documents in spine * read images from catalog (i.e., references) table * move call to add_content_images method inside add_content method * add svg to epub properties list if an inline SVG image is detected * set width of inline image to value of scaledwidth attribute, if specified * if scaledwidth attribute is not specified and image is an SVG, set value to 100% * add inline class to inline image elements * add max-width: 100% style to all images (not just figures) * group figure.image styles together in stylesheet
Diffstat (limited to 'data')
-rw-r--r--data/styles/epub3.css23
1 files changed, 10 insertions, 13 deletions
diff --git a/data/styles/epub3.css b/data/styles/epub3.css
index c61435e..b2bb498 100644
--- a/data/styles/epub3.css
+++ b/data/styles/epub3.css
@@ -138,6 +138,7 @@ kbd {
img {
border: 0;
+ max-width: 100%;
}
mark {
@@ -729,7 +730,15 @@ figure.image {
}
figure.image img {
- max-width: 100%;
+ /* in the event the viewer adds display: block to the image */
+ /*max-width: 95%;*/
+ /* max-width not supported in Kindle, need to use a media query to add */
+ margin: 0 auto;
+}
+
+/* Kindle requires text-align: center on surrounding div to align image to center */
+figure.image div.content {
+ text-align: center;
}
figure.coalesce {
@@ -900,18 +909,6 @@ blockquote footer .context {
color: #666665;
}
-/* Kindle requires text-align: center on surrounding div to align image to center */
-figure.image div.content {
- text-align: center;
-}
-
-/* in the event the viewer adds display: block to the image */
-figure.image img {
- /* max-width not supported in Kindle, need to use a media query to add */
- /*max-width: 95%;*/
- margin: 0 auto;
-}
-
pre {
text-align: left; /* fix for Namo */
margin-top: 1em; /* 0.85rem */