From 639ec573275b3a03e39a43cb1dad376554cb540d Mon Sep 17 00:00:00 2001 From: TJ Date: Sun, 5 Jun 2016 16:50:04 +0530 Subject: [PATCH] Improving dropdown style inside collapsible navbar --- less/_navbar.less | 83 +++++++++++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 28 deletions(-) diff --git a/less/_navbar.less b/less/_navbar.less index e8efe92d..0e55e653 100755 --- a/less/_navbar.less +++ b/less/_navbar.less @@ -94,37 +94,59 @@ } // Dropdowns get custom display - .open .dropdown-menu { - > .dropdown-header { - border: 0; - color: inherit; - } - .divider { - border-bottom: 1px solid; - opacity: 0.08; - } - > li > a { - color: inherit; - &:hover, - &:focus { - color: inherit; - background-color: transparent; + .dropdown{ + .dropdown-toggle{ + .caret{ + display:none; + } + &:after{ + content: 'keyboard_arrow_right'; + font-family: 'Material Icons'; + font-size: 1.5em; + float:right; } } - > .active > a { - &, - &:hover, - &:focus { - color: inherit; - background-color: transparent; - } + .dropdown-menu{ + margin-left:20px; } - > .disabled > a { - &, - &:hover, - &:focus { - color: inherit; - background-color: transparent; + &.open{ + .dropdown-toggle:after{ + content: 'keyboard_arrow_down'; + } + .dropdown-menu { + > .dropdown-header { + border: 0; + color: inherit; + } + .divider { + border-bottom: 1px solid; + opacity: 0.08; + } + > li > a { + color: inherit; + font-size: inherit; + &:hover, + &:focus { + color: inherit; + background-color: transparent; + } + } + > .active > a { + &, + &:hover, + &:focus { + color: inherit; + background-color: transparent; + } + } + > .disabled > a { + &, + &:hover, + &:focus { + color: inherit; + background-color: transparent; + } + } } } } @@ -197,6 +219,11 @@ } .dropdown-menu { border-radius: @border-radius-base; + @media (max-width: @grid-float-breakpoint-max) { + .dropdown-header{ + background-color: lighten(@variation-color,5%); + } + } li > a { font-size: @mdb-dropdown-font-size; padding: 13px 16px;