mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Fix small cover images not being vertically centered
This commit is contained in:
parent
1e57c4180e
commit
4e6353468b
@ -487,7 +487,7 @@ def set_epub_cover(container, cover_path, report, options=None):
|
||||
if wrapped_image is not None:
|
||||
# The cover page is a simple wrapper around a single cover image,
|
||||
# we can remove it safely.
|
||||
log('Existing cover page is a simple wrapper, removing it')
|
||||
log('Existing cover page {} is a simple wrapper, removing it'.format(cover_page))
|
||||
container.remove_item(cover_page)
|
||||
if wrapped_image != existing_image:
|
||||
container.remove_item(wrapped_image)
|
||||
|
@ -263,7 +263,9 @@ class Container(ContainerBase):
|
||||
img {
|
||||
width: auto; height: auto;
|
||||
margin-left: auto; margin-right: auto;
|
||||
max-width: 100vw; max-height: 100vh
|
||||
max-width: 100vw; max-height: 100vh;
|
||||
top: 50vh; transform: translateY(-50%%);
|
||||
position: relative;
|
||||
}
|
||||
</style></head><body><img src="%s"/></body></html>
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user