Skip to content

Instantly share code, notes, and snippets.

@keevitaja
Last active March 20, 2018 17:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save keevitaja/088fadbf0f12f9c2f4b98b09bfa71007 to your computer and use it in GitHub Desktop.
Save keevitaja/088fadbf0f12f9c2f4b98b09bfa71007 to your computer and use it in GitHub Desktop.
Bulma nav dropdown
.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>
@azimidev
Copy link

azimidev commented May 3, 2017

display: relative; ? also dropdown won't stay open!

@riseno
Copy link

riseno commented May 18, 2017

it doesn't work at all mate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment