mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Book details panel: Fix metadata field titles not being top aligned
This commit is contained in:
parent
a4a70dc84c
commit
50785c72c8
@ -312,6 +312,6 @@ def mi_to_html(mi, field_list=None, default_author_link=None, use_roman_numbers=
|
|||||||
# print '\n'.join(ans)
|
# print '\n'.join(ans)
|
||||||
direction = 'rtl' if rtl else 'ltr'
|
direction = 'rtl' if rtl else 'ltr'
|
||||||
margin = 'left' if rtl else 'right'
|
margin = 'left' if rtl else 'right'
|
||||||
return u'<style>table.fields td { vertical-align:middle}</style>' + \
|
return u'<style>table.fields td { vertical-align:top}</style>' + \
|
||||||
u'<table class="fields" style="direction: %s; margin-%s:auto">%s</table>'%(
|
u'<table class="fields" style="direction: %s; margin-%s:auto">%s</table>'%(
|
||||||
direction, margin, u'\n'.join(ans)), comment_fields
|
direction, margin, u'\n'.join(ans)), comment_fields
|
||||||
|
@ -349,7 +349,7 @@ def render_metadata(mi, table, book_id): # {{{
|
|||||||
add_extra_css(def():
|
add_extra_css(def():
|
||||||
sel = '.' + CLASS_NAME + ' '
|
sel = '.' + CLASS_NAME + ' '
|
||||||
style = ''
|
style = ''
|
||||||
style += build_rule(sel + 'table.metadata td', vertical_align='middle')
|
style += build_rule(sel + 'table.metadata td', vertical_align='top')
|
||||||
style += build_rule(sel + 'table.metadata td:first-of-type', font_weight='bold', padding_right='1em', white_space='nowrap')
|
style += build_rule(sel + 'table.metadata td:first-of-type', font_weight='bold', padding_right='1em', white_space='nowrap')
|
||||||
style += build_rule(sel + 'table.metadata td:last-of-type', overflow_wrap='break-word')
|
style += build_rule(sel + 'table.metadata td:last-of-type', overflow_wrap='break-word')
|
||||||
style += build_rule(sel + 'table.metadata a[href]', color='blue')
|
style += build_rule(sel + 'table.metadata a[href]', color='blue')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user