From ad902d6bea06ae147db72b8bf5e0dfe5166e9d1c Mon Sep 17 00:00:00 2001
From: Robin Appelman <robin@icewind.nl>
Date: Mon, 24 Oct 2016 13:54:56 +0200
Subject: [PATCH] center cropper vertically

Signed-off-by: Robin Appelman <robin@icewind.nl>
---
 settings/css/settings.css | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/settings/css/settings.css b/settings/css/settings.css
index 632162eafe2..2f0f4b23515 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -34,25 +34,23 @@ input#openid, input#webdav { width:20em; }
 	/* float cropper above settings page to prevent unexpected flowing from dynamically sized element */
 	position: fixed;
 	background-color: rgba(0, 0, 0, .2);
-	/*opacity: .20;*/
 	box-sizing: border-box;
-	top: 0;
+	top: 45px;
 	left: 0;
 	width: 100%;
-	height: 100%;
-	padding-top: 45px;
-	text-align: center;
+	height: calc(100% - 45px);
 }
 #avatar #cropper .inner-container {
-	display: inline-block;
-	margin-top: 160px;
-	margin-left: 30px;
+	z-index: 2001; /* above the top bar if needed */
+	position: absolute;
+	top: 50%;
+	left: 50%;
+	transform: translate(-50%, -50%);
 	background: #fff;
 	color: #333;
 	border-radius: 3px;
 	box-shadow: 0 0 7px #888;
 	padding: 15px;
-	text-align: left;
 }
 
 #avatar #cropper .inner-container .jcrop-holder {
-- 
GitLab