Skip to content

Instantly share code, notes, and snippets.

@ducks
Last active October 22, 2015 19:58
Show Gist options
  • Save ducks/845f50482bc8f5c337f5 to your computer and use it in GitHub Desktop.
Save ducks/845f50482bc8f5c337f5 to your computer and use it in GitHub Desktop.
making bootstrap drop down menus opened with a sliding animation
.open > .dropdown-menu {
@include transform(scale(1, 1));
}
.open > .dropdown-menu li a {
color: #000;
}
.dropdown-menu li a{
color: #fff;
}
.dropdown-menu {
@include transform-origin(top);
@include animation-fill-mode(forwards);
@include transform(scale(1, 0));
display: block;
@include transition(all 0.2s ease-out);
}
.dropup .dropdown-menu {
@include transform-origin(bottom);
}
.dropup > .dropdown-menu:after {
border-bottom: 0;
border-top: 6px solid rgba(39, 45, 51, 0.9);
top: auto;
display: inline-block;
bottom: -6px;
content: '';
position: absolute;
left: 50%;
border-right: 6px solid transparent;
border-left: 6px solid transparent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment