From 59f380d3fcc56bb3024dca4eb604144e7f616e7f Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Thu, 23 Jul 2015 01:33:10 -0700 Subject: [PATCH] fix dialog css --- skins/base/css/common.css | 23 ++++++++++++++++++----- skins/base/views/atoms/ImageView.js | 3 +++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/skins/base/css/common.css b/skins/base/css/common.css index 55b9a6db31..06fd4e39ff 100644 --- a/skins/base/css/common.css +++ b/skins/base/css/common.css @@ -60,28 +60,41 @@ html { left: 0; width: 100%; height: 100%; + + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-align-items: center; + align-items: center; + -webkit-justify-content: center; + justify-content: center; } .mx_Dialog { background-color: #fff; color: #747474; text-align: center; - margin: auto; - max-width: 500px; z-index: 2010; font-weight: 300; font-size: 16px; position: relative; border-radius: 8px; - top: 200px; +} + +.mx_ImageView { + margin: 6px; + /* hack: flexbox bug? */ + margin-bottom: 4px; } .mx_Dialog_content { - margin: 35px; + margin: 24px; } .mx_Dialog_buttons { - padding-bottom: 35px; + padding-bottom: 24px; } .mx_Dialog button { diff --git a/skins/base/views/atoms/ImageView.js b/skins/base/views/atoms/ImageView.js index 8f4b08d2ad..898187b324 100644 --- a/skins/base/views/atoms/ImageView.js +++ b/skins/base/views/atoms/ImageView.js @@ -25,6 +25,9 @@ module.exports = React.createClass({ mixins: [ImageViewController], render: function() { + + // XXX: can't we just do max-width: 80%, max-height: 80% on the CSS? + var width = this.props.width || 500; var height = this.props.height || 500;