grafana/public/sass/components/_sidemenu.scss
Alexander Zobnin 8bd3d106a2 Fix dashboard menu overlapping (#10044)
* dashboard menu: fix overlap by singlestat and panel link icon

* refactor: navbar z-index

* hide grafana icon in solo panel mode
2017-12-01 14:31:55 +01:00

173 lines
2.9 KiB
SCSS

.sidemenu {
position: fixed;
display: flex;
flex-flow: column;
flex-direction: column;
width: $side-menu-width;
background: $navbarBackground;
z-index: $zindex-sidemenu;
a:focus {
text-decoration: none;
}
}
.sidemenu-open {
.sidemenu {
background: $side-menu-bg;
position: initial;
height: auto;
box-shadow: $side-menu-shadow;
position: relative;
z-index: $zindex-sidemenu;
}
.sidemenu__top,
.sidemenu__bottom {
display: block;
}
}
.sidemenu__top {
padding-top: 3rem;
flex-grow: 1;
display: none;
}
.sidemenu__bottom {
padding-bottom: $spacer;
display: none;
}
.sidemenu-item {
position: relative;
@include left-brand-border();
&.active,
&:hover {
background-color: $side-menu-item-hover-bg;
@include left-brand-border-gradient();
.dropdown-menu {
margin: 0;
display: block;
opacity: 0;
top: 0px;
// important to overlap it otherwise it can be hidden
// again by the mouse getting outside the hover space
left: $side-menu-width - 2px;
@include animation('dropdown-anim 150ms ease-in-out 100ms forwards');
z-index: $zindex-sidemenu;
}
}
}
.dropup.sidemenu-item:hover .dropdown-menu {
top: auto !important;
}
.sidemenu-link {
color: $link-color;
line-height: 42px;
padding: 0px 10px 0px 10px;
display: block;
position: relative;
font-size: 16px;
border: 1px solid transparent;
text-align: center;
img {
border-radius: 50%;
width: 28px;
height: 28px;
box-shadow: 0 0 14px 2px rgba(255,255,255, 0.05);
}
}
@include keyframes(dropdown-anim) {
0% {
opacity: 0;
//transform: translate3d(-5%,0,0);
}
100% {
opacity: 1;
//transform: translate3d(0,0,0);
}
}
.icon-circle {
width: 35px;
height: 35px;
display: inline-block;
.fa, .icon-gf, .gicon {
color: $link-color;
position: relative;
opacity: .7;
font-size: 130%;
}
.fa {
top: 2px;
position: relative;
}
.icon-gf {
top: 5px;
}
img {
position: relative;
}
}
.side-menu-header {
padding: 10px 10px 10px 20px;
white-space: nowrap;
background-color: $side-menu-item-hover-bg;
font-size: 17px;
}
li.sidemenu-org-switcher {
border-bottom: 1px solid $dropdownDividerBottom;
}
.sidemenu-org-switcher__org-name {
font-size: $font-size-base;
}
.sidemenu-org-switcher__org-current {
font-size: $font-size-xs;
color: $text-color-weak;
position: relative;
top: -2px;
}
.sidemenu-org-switcher__switch {
font-size: $font-size-sm;
padding-left: 1.5rem;
display: flex;
align-items: center;
> i.fa.fa-random {
margin-right: 4px;
top: 1px;
}
}
.sidemenu__logo {
display: block;
padding: 0.4rem 1.0rem 0.4rem 0.65rem;
min-height: $navbarHeight;
position: relative;
&:hover {
background: $navbarButtonBackgroundHighlight;
}
img {
width: 30px;
position: relative;
top: 5px;
left: 4px;
}
}