Use invisible triangle to prevent accidental hovers when mousing to a subnav item
parent
9459ff9745
commit
6f5b3bdd3c
|
@ -86,6 +86,7 @@ const NavBlock = React.createClass({
|
|||
{this.renderSquare()}
|
||||
<div className="sidebar-menu">
|
||||
{children}
|
||||
<div className="sidebar-menu--triangle" />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -93,6 +93,7 @@ $sidebar-menu--gutter: 18px;
|
|||
*/
|
||||
.sidebar--item:hover {
|
||||
cursor: pointer;
|
||||
z-index: 5;
|
||||
|
||||
.sidebar--square {background-color: $sidebar--item-bg-hover;}
|
||||
.sidebar--icon {color: $sidebar--icon-hover;}
|
||||
|
@ -187,3 +188,13 @@ $sidebar-menu--gutter: 18px;
|
|||
font-weight: 400;
|
||||
padding: 0px $sidebar-menu--gutter;
|
||||
}
|
||||
// Invisible triangle for easier mouse movement when navigating to sub items
|
||||
.sidebar-menu--item + .sidebar-menu--triangle {
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
z-index: -1;
|
||||
top: $sidebar--width;
|
||||
left: 0px;
|
||||
transform: translate(-50%,-50%) rotate(45deg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue