Last active
March 20, 2018 17:48
-
-
Save keevitaja/088fadbf0f12f9c2f4b98b09bfa71007 to your computer and use it in GitHub Desktop.
Bulma nav dropdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.has-dropdown { | |
display: relative; | |
.dropdown { | |
display: none; | |
position: absolute; | |
background-color: $white-bis; | |
padding: 14px; | |
border: 1px solid $grey-lighter; | |
border-radius: $radius; | |
margin-right: 0; | |
margin-left: 12px; | |
a { | |
display: block; | |
text-align: left; | |
color: $text-light; | |
&:hover { | |
color: $text-strong; | |
} | |
} | |
} | |
a.nav-item { | |
height: 52px; | |
} | |
&:hover .dropdown { | |
display: block; | |
} | |
&.is-rtl { | |
direction: rtl; | |
.dropdown { | |
margin-right: 12px; | |
margin-left: 0; | |
a { | |
text-align: right; | |
} | |
} | |
} | |
} | |
// <div class="nav-right nav-menu"> | |
// <div class="has-dropdown is-rtl"> | |
// <a class="nav-item" href="#">Admin</a> | |
// <div class="dropdown"> | |
// <a href="#">Accounts</a> | |
// <a href="#">Projects</a> | |
// <a href="#">Users</a> | |
// </div> | |
// </div> | |
// </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
display: relative;
? also dropdown won't stay open!