From 4501c5d6500a926784fa32e7607065526f85e556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abra=C3=A3o=20Zaidan?= Date: Fri, 28 Feb 2020 10:24:17 -0300 Subject: Avoid unnecessary horizontal scrollbars (#160) * Avoid unnecessary horizontal scrollbars Fix long key values rendering with horizontal scrollbar; Fix keys folder with checkbox in one line and key name in another line. * Ellipsis replaced by horizontal scrollbar while keeping elements aligned https://github.com/erikdubbelboer/phpRedisAdmin/pull/160#issuecomment-589968360 * Fix missing padding on the right frame in Firefox for Mac https://github.com/erikdubbelboer/phpRedisAdmin/pull/160#issuecomment-590048242 --- css/common.css | 2 +- css/index.css | 15 ++++++++++++--- index.php | 5 +++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/css/common.css b/css/common.css index b2a8431..9dc6276 100644 --- a/css/common.css +++ b/css/common.css @@ -52,6 +52,6 @@ background: url(../images/add.png) left center no-repeat; .data { -white-space: pre; +white-space: pre-wrap; } diff --git a/css/index.css b/css/index.css index 7b898e5..4a56aa9 100644 --- a/css/index.css +++ b/css/index.css @@ -3,10 +3,14 @@ position: absolute; top: 0; bottom: 0; left: 0; +display: flex; +flex-direction: column; width: 290px; height: 100%; +} + +#header { padding-left: 10px; -border-right: 1px solid #000; } #sidebar a, #sidebar a:visited { @@ -23,7 +27,9 @@ text-decoration: underline; #keys { +flex-grow: 1; width: 290px; +margin-top: 10px; padding-left: 10px; overflow: auto; } @@ -36,6 +42,7 @@ padding: 0; #keys li { font-weight: normal; +white-space: nowrap; } #keys li.folder { @@ -115,6 +122,7 @@ background-color: #aaa; cursor: col-resize; padding: 0; margin: 0; +border-left: 1px solid #000; } #resize-layover { @@ -133,11 +141,12 @@ top: 0; left: 305px; right: 0; bottom: 0; -padding-left: 2em; } #frame iframe { -width: 100%; +width: calc(100% - 3em); height: 100%; +margin-left: 1.5em; +margin-right: 1.5em; } diff --git a/index.php b/index.php index 5ea3b25..933796a 100644 --- a/index.php +++ b/index.php @@ -108,7 +108,7 @@ if($redis) { ?> > - () + ()