From a846327b17caba797b3ffb824b3a81edae66c14a Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 3 Jan 2017 16:06:53 +0100 Subject: [PATCH] Use flexbox for header and rearrange some elements Signed-off-by: Christoph Wurst --- core/css/header.scss | 23 +++++-- core/css/styles.scss | 2 - core/templates/layout.user.php | 111 +++++++++++++++++---------------- 3 files changed, 74 insertions(+), 62 deletions(-) diff --git a/core/css/header.scss b/core/css/header.scss index 8035f7e568a0f..a4b29c8a72401 100644 --- a/core/css/header.scss +++ b/core/css/header.scss @@ -27,6 +27,7 @@ /* HEADERS ------------------------------------------------------------------ */ #body-user #header, #body-settings #header, #body-public #header { + display: inline-flex; position: fixed; top: 0; left: 0; @@ -36,14 +37,12 @@ line-height: 2.5em; background-color: #0082c9; box-sizing: border-box; + justify-content: space-between; } /* LOGO and APP NAME -------------------------------------------------------- */ #nextcloud { - position: absolute; - top: 0; - left: 0; padding: 5px; padding-bottom: 0; height: 45px; @@ -82,8 +81,6 @@ } .header-appname-container { display: inline-block; - position: absolute; - left: 70px; height: 27px; padding-top: 18px; padding-right: 10px; @@ -341,7 +338,7 @@ } #settings { - float: right; + display: inline-block; color: #ddd; cursor: pointer; .icon-loading-small-dark { @@ -350,6 +347,7 @@ margin-right: 6px; background-size: 16px 16px; } + flex: 0 0 auto; } #expand { @@ -414,6 +412,19 @@ /* do not show display name when profile picture is present */ #header { + #header-left #header-right { + display: flex; + } + + div.header-left { + flex: 0 0 50%; + } + + #header-right { + display: flex; + justify-content: flex-end; + } + .avatardiv.avatardiv-shown + #expandDisplayName { display: none; } diff --git a/core/css/styles.scss b/core/css/styles.scss index affaec1434276..fd2af32845094 100644 --- a/core/css/styles.scss +++ b/core/css/styles.scss @@ -169,7 +169,6 @@ body { border: 0; border-radius: 3px; margin-top: 9px; - float: right; width: 0; cursor: pointer; -webkit-transition: all 100ms; @@ -179,7 +178,6 @@ body { &:focus, &:active, &:valid { color: #fff; width: 155px; - max-width: 50%; cursor: text; background-color: #0082c9; border: 1px solid rgba(255, 255, 255, 0.5); diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index c53e016c1c28a..05f71e4b68568 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -42,67 +42,70 @@