From ed5bb517266c80904c44bf44a335f1003f5aa277 Mon Sep 17 00:00:00 2001 From: Kim <1877318+kimsible@users.noreply.github.com> Date: Thu, 23 Jul 2020 15:09:15 +0200 Subject: Improve navigation sub-menu and tabs effects (#2971) * Improve nav border and colors on active and non-active * Remove margin-top effect on active nav * Use opacity / bold instead of color change on nav * Remove dropdown items label in sub-menu and add a class active * Position sub-menu to fixed * Autoclose dropdown sub-menu only on outside click * Remove open dropdown on hover in sub-menu * Show reusable h1 for dropdown item in sub-menu * Put reusable sub-menu h1 styles to mixins * Add icons to sub-menu dropdown-item h1 * Make all the sub-menu accessible with focus Co-authored-by: kimsible --- client/src/sass/bootstrap.scss | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'client/src/sass/bootstrap.scss') diff --git a/client/src/sass/bootstrap.scss b/client/src/sass/bootstrap.scss index dd5824b7a..897182e53 100644 --- a/client/src/sass/bootstrap.scss +++ b/client/src/sass/bootstrap.scss @@ -161,9 +161,14 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; .nav.nav-pills { font-size: 16px !important; + font-weight: $font-semibold !important; - .nav-link.active { - font-weight: $font-semibold !important; + .nav-link { + opacity: 0.6 !important; + + &.active, &:hover, &:active, &:focus { + opacity: 1 !important; + } } a { @@ -173,29 +178,23 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; } } -.nav-tabs { - - .nav-link { - @include disable-default-a-behaviour; +.nav-tabs .nav-link { + @include disable-default-a-behaviour; - color: pvar(--mainForegroundColor) !important; - } -} + color: pvar(--mainForegroundColor); + font-weight: $font-semibold; + border: none; + border-bottom: 2px solid transparent; + opacity: 0.6; -.nav-tabs .nav-link { - &:not(.active) { - border-bottom: 3px solid transparent; - } &.active { - font-weight: $font-semibold; + color: pvar(--mainForegroundColor); background-color: pvar(--mainBackgroundColor) !important; - border: none; - border-bottom: 2px solid pvar(--mainColor); + border-bottom-color: pvar(--mainColor); } - &:hover { - border-top-color: transparent; - border-left-color: transparent; - border-right-color: transparent; + + &.active, &:hover, &:active, &:focus { + opacity: 1; } } -- cgit v1.2.3