From 65c2c18653feb5f6485710e9656b19e368bb2826 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 5 Sep 2016 17:34:11 -0700 Subject: [feature] webkit support: get the js and css working in older webkit engines --- www/app/components/center.js | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'www/app/components/center.js') diff --git a/www/app/components/center.js b/www/app/components/center.js index a3b6409..6fa6212 100644 --- a/www/app/components/center.js +++ b/www/app/components/center.js @@ -4,22 +4,6 @@ import React from 'react' -const CONTAINER_CSS = { - position: 'absolute', - display: 'flex', - justifyContent: 'center', - alignContent: 'center', - alignItems: 'center', - top: "0px", - left: "0px", - height: "100%", - width: "100%" -} - -const ITEM_CSS = { - flex: "0 1 auto" -} - class Center extends React.Component { static get defaultProps() {return{ @@ -31,9 +15,12 @@ class Center extends React.Component { } render() { - let style = this.props.width ? Object.assign({width: this.props.width + 'px'}, ITEM_CSS) : ITEM_CSS + let style = null + if (this.props.width) { + style = {width: this.props.width + 'px'} + } return ( -
+
{this.props.children}
-- cgit v1.2.3