Nicer button box for popup modals

This commit is contained in:
Kovid Goyal 2017-05-15 13:55:47 +05:30
parent 04d4cb923c
commit c77ffc6075
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 6 additions and 1 deletions

View File

@ -74,7 +74,7 @@ def on_fmt_click(ev):
parent.appendChild(E.div(
E.div(_('What would you like to do with the {} format?').format(fmt)),
E.div(style='margin:1ex auto; overflow: hidden; padding: 1em 1.5em; text-align: center',
E.div(class_='button-box',
create_button(_('Read {}').format(fmt), 'book', action.bind(None, read_format)),
'\xa0',
create_button(_('Download {}').format(fmt), 'cloud-download', action.bind(None, download_format)),

View File

@ -13,6 +13,7 @@ simple_vendor_prefixes = {
'animation-fill-mode': v"['webkit', 'moz', 'o']",
'animation-play-state': v"['webkit', 'moz', 'o']",
'transform': v"['webkit', 'ms', 'moz', 'o']",
'transform-origin': v"['webkit', 'ms', 'moz', 'o']",
'transition': v"['webkit', 'moz', 'o']",
'filter': v"['webkit']",
'user-select': v"['webkit', 'moz', 'ms']",

View File

@ -21,6 +21,10 @@ add_extra_css(def():
style += build_rule(
'#modal-container a.dialog-simple-link:hover', color='red !important'
)
style += build_rule(
'.button-box', display='flex', justify_content='flex-end', padding='1rem 0rem', overflow='hidden'
)
style += build_rule('.button-box .calibre-push-button', transform_origin='right')
return style
)