Book details panel: Fix metadata field titles not being top aligned

This commit is contained in:
Kovid Goyal 2017-10-31 12:01:21 +05:30
parent a4a70dc84c
commit 50785c72c8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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')