From 26eb18d101a281442f1d013fc103c9a342e96490 Mon Sep 17 00:00:00 2001 From: zombieFox Date: Tue, 18 Feb 2020 13:27:30 +0000 Subject: [PATCH] [design] improve menu grid and spacing --- src/css/menu.css | 82 ++++++++++++++++++++++------------- src/html/menu/menu-close.html | 2 +- 2 files changed, 53 insertions(+), 31 deletions(-) diff --git a/src/css/menu.css b/src/css/menu.css index 8fd55dea..548a1ab0 100755 --- a/src/css/menu.css +++ b/src/css/menu.css @@ -66,12 +66,26 @@ line-height: 1; } -.menu-nav-tab:after, .menu-nav-tab:after { background-color: transparent; border-radius: 0; } +.menu-close-tab { + background-color: transparent; + margin: 0; + padding: 0; + border-radius: 0; + height: 3.25em; + width: 3.25em; + line-height: 1; +} + +.menu-close-tab:after { + background-color: transparent; + border-radius: 0; +} + .menu-nav-body { display: none; } @@ -141,8 +155,9 @@ .menu-area { max-height: 100%; grid-template-rows: 1fr; - grid-template-columns: 2fr 4fr auto; + grid-template-columns: 15em 1fr calc(var(--menu-space) * 5); overflow: hidden; + position: relative; } .menu-nav { @@ -157,12 +172,40 @@ overflow-y: auto; } + .menu-close { + grid-column-start: 3; + grid-column-end: 4; + grid-row-start: 1; + grid-row-end: 2; + align-self: start; + position: absolute; + } + + .menu-content { + padding: 0 calc(var(--menu-space) * 5); + grid-column-start: 2; + grid-column-end: 4; + grid-row-start: 1; + grid-row-end: 2; + scroll-behavior: smooth; + overflow-y: auto; + } + + .menu-content-overscroll { + padding-bottom: calc(var(--menu-space) * 30); + } + + .menu-content-item { + padding-top: calc(var(--menu-space) * 5); + padding-bottom: calc(var(--menu-space) * 5); + } + .menu-nav-item { flex-grow: 0; flex-basis: auto; } - .menu-nav .menu-nav-tab { + .menu-nav-tab { padding-left: calc(var(--menu-space) * 2); padding-right: calc(var(--menu-space) * 2); justify-content: flex-start; @@ -186,32 +229,6 @@ background-color: rgba(var(--theme-color-02), 0.5); } - .menu-close { - grid-column-start: 3; - grid-column-end: 4; - grid-row-start: 1; - grid-row-end: 2; - } - - .menu-content { - padding: 0 calc(var(--menu-space) * 4); - grid-column-start: 2; - grid-column-end: 3; - grid-row-start: 1; - grid-row-end: 2; - overflow-y: auto; - scroll-behavior: smooth; - } - - .menu-content-overscroll { - padding-bottom: calc(var(--menu-space) * 30); - } - - .menu-content-item { - padding-top: calc(var(--menu-space) * 3); - padding-bottom: calc(var(--menu-space) * 3); - } - .menu-nav-sub { background-color: transparent; margin: 0; @@ -232,6 +249,11 @@ border-radius: 0; } + .menu-close-tab { + height: calc(var(--menu-space) * 5); + width: calc(var(--menu-space) * 5); + } + .menu-item-form { margin: 0 0 0 calc(var(--menu-space) * 3); } @@ -240,6 +262,7 @@ @media (min-width: 900px) { .menu { width: 80vw; + max-width: 60em; } } @@ -252,6 +275,5 @@ @media (min-width: 1600px) { .menu { width: 60vw; - max-width: 60em; } } diff --git a/src/html/menu/menu-close.html b/src/html/menu/menu-close.html index 5669095a..682a0b96 100644 --- a/src/html/menu/menu-close.html +++ b/src/html/menu/menu-close.html @@ -1,3 +1,3 @@