From af7476f79a209b6e05453e0b8bc03d7ffaec4764 Mon Sep 17 00:00:00 2001 From: Dick Choi Date: Tue, 19 Jul 2016 13:28:18 +0900 Subject: [PATCH] use flex layout to center modal --- browser/main/global.styl | 4 ++++ browser/styles/index.styl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/browser/main/global.styl b/browser/main/global.styl index cfeb0495..1dee7526 100644 --- a/browser/main/global.styl +++ b/browser/main/global.styl @@ -65,6 +65,10 @@ modalBackColor = transparentify(white, 65%) .ModalBase fixed top left bottom right z-index modalZIndex + display flex + align-items center + justify-content center + &.hide display none .modalBack diff --git a/browser/styles/index.styl b/browser/styles/index.styl index 9322259f..6a911bae 100644 --- a/browser/styles/index.styl +++ b/browser/styles/index.styl @@ -123,7 +123,7 @@ $modal-border-radius = 5px modal() position relative z-index $modal-z-index - margin $modal-margin + width 100% background-color $modal-background overflow hidden border-radius $modal-border-radius