diff --git a/kallithea/public/less/kallithea-select2.less b/kallithea/public/less/kallithea-select2.less --- a/kallithea/public/less/kallithea-select2.less +++ b/kallithea/public/less/kallithea-select2.less @@ -1,7 +1,3 @@ -#context-bar .select2-container .select2-choice .select2-chosen, -nav.navbar #quick .select2-container .select2-choice .select2-chosen { - margin-right: 0; -} .branch-switcher, .repo-switcher { .select2-choice { @@ -16,6 +12,10 @@ nav.navbar #quick .select2-container .se box-shadow: none !important; color: #FFFFFF !important; } + .select2-choice .select2-chosen { + margin-right: 0; + line-height: @line-height-computed; + } .select2-arrow { display: none !important; } @@ -33,7 +33,29 @@ nav.navbar #quick .select2-container .se } .repo-switcher-dropdown.select2-drop.select2-drop-active { color: black; + .select2-result.select2-highlighted { + color: @navbar-inverse-link-hover-color; + background-color: @navbar-inverse-link-hover-bg; + } + .select2-result-label { + color: white; + } } -.repo-switcher-dropdown.select2-drop.select2-drop-active .select2-result-label { - color: white; + +/* fix padding of select2 entries in navbar to match .navbar-nav > li > a */ +.navbar-inverse { + .navbar-nav { + > li > .select2-container a { + padding: @nav-link-padding; + padding-top: @navbar-padding-vertical; + padding-bottom: @navbar-padding-vertical; + } + li.active > .select2-container, + .select2-container:hover, + .select2-container:focus, + .select2-container-active { + color: @navbar-inverse-link-hover-color; + background-color: @navbar-inverse-link-hover-bg; + } + } } diff --git a/kallithea/public/less/style.less b/kallithea/public/less/style.less --- a/kallithea/public/less/style.less +++ b/kallithea/public/less/style.less @@ -1023,16 +1023,6 @@ div.annotatediv { .linenos a { text-decoration: none; } /* Stylesheets for the context bar */ -.repo-switcher-dropdown.select2-drop.select2-drop-active .select2-results .select2-highlighted, -ul.dropdown-menu li a:focus, -nav.navbar #quick li:hover, -#quick_login > .pull-right .list-group-item:hover, -#context-pages li:hover, -nav.navbar #quick li.active, -nav.navbar #quick li a.menu_link:focus, -#context-pages li.active { - background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%); /* W3C */ -} #quick_login > .pull-right .list-group-item { background-color: #577632; border: 0; @@ -1043,10 +1033,6 @@ nav.navbar #quick li a.menu_link:focus, } nav.navbar #quick > li > a, -nav.navbar #quick .select2-container .select2-choice .select2-chosen, -#context-pages > ul > li > a, -#context-pages .select2-container .select2-choice .select2-chosen { - padding: 0 15px 0 15px; - line-height: @navbar-height; +#context-pages > ul > li > a { height: @navbar-height; }