2014-07-29 14:00:29 +04:00
|
|
|
//
|
|
|
|
// Dropdown Styles
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Wrapper
|
|
|
|
// Does nothing yet...
|
|
|
|
.dropdown {}
|
|
|
|
|
|
|
|
// List
|
|
|
|
.dropdown-menu {
|
2014-07-29 20:23:00 +04:00
|
|
|
position: relative;
|
2014-07-29 14:00:29 +04:00
|
|
|
display: inline-block;
|
2014-07-29 19:19:00 +04:00
|
|
|
min-width: 160px;
|
2014-07-29 14:00:29 +04:00
|
|
|
padding: 0.5rem 0;
|
|
|
|
margin: 0;
|
2014-07-29 20:23:00 +04:00
|
|
|
font-size: 1.4rem;
|
|
|
|
line-height: 1;
|
|
|
|
font-weight: normal;
|
|
|
|
text-transform: none;
|
|
|
|
letter-spacing: 0;
|
2014-07-29 19:19:00 +04:00
|
|
|
background: #fff;
|
2014-07-29 20:23:00 +04:00
|
|
|
border: #B0BEC4 1px solid;
|
|
|
|
box-shadow: rgba(0,0,0,0.175) 0 2px 6px;
|
2014-07-29 19:19:00 +04:00
|
|
|
border-radius: 2px;
|
2014-07-29 14:00:29 +04:00
|
|
|
|
2014-07-29 19:19:00 +04:00
|
|
|
// Item Resets - This means we can use any element
|
2014-07-29 14:00:29 +04:00
|
|
|
li {
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
} // .dropdown-menu
|
|
|
|
|
2014-07-29 15:46:19 +04:00
|
|
|
// Triangle & positioning placeholders
|
|
|
|
%triangle {
|
|
|
|
&:before {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
border-style: solid;
|
|
|
|
border-color: #fff transparent;
|
|
|
|
display: block;
|
|
|
|
width: 0;
|
|
|
|
} // :before
|
2014-07-29 14:00:29 +04:00
|
|
|
|
2014-07-29 15:46:19 +04:00
|
|
|
&:after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
2014-07-29 20:23:00 +04:00
|
|
|
width: 12px;
|
|
|
|
height: 12px;
|
2014-07-29 15:46:19 +04:00
|
|
|
background: #fff;
|
|
|
|
transform: rotate(45deg);
|
2014-07-29 20:23:00 +04:00
|
|
|
box-shadow: #B0BEC4 0 0 0 1px;
|
2014-07-29 15:46:19 +04:00
|
|
|
z-index: -1;
|
|
|
|
} // :after
|
|
|
|
} // %triangle
|
2014-07-29 14:00:29 +04:00
|
|
|
|
2014-07-29 15:46:19 +04:00
|
|
|
%triangle-top {
|
|
|
|
@extend %triangle;
|
2014-07-29 20:23:00 +04:00
|
|
|
|
2014-07-29 15:46:19 +04:00
|
|
|
&:before {
|
2014-07-29 20:23:00 +04:00
|
|
|
border-width: 0 6px 6px 6px;
|
|
|
|
top: -6px;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
2014-07-29 15:46:19 +04:00
|
|
|
&:after {
|
|
|
|
top: -5px;
|
|
|
|
}
|
|
|
|
} // %triangle-top
|
|
|
|
|
|
|
|
%triangle-bottom {
|
|
|
|
@extend %triangle;
|
2014-07-29 20:23:00 +04:00
|
|
|
|
2014-07-29 15:46:19 +04:00
|
|
|
&:before {
|
2014-07-29 20:23:00 +04:00
|
|
|
border-width: 6px 6px 0 6px;
|
|
|
|
bottom: -6px;
|
2014-07-29 15:46:19 +04:00
|
|
|
}
|
|
|
|
&:after {
|
|
|
|
bottom: -5px;
|
|
|
|
}
|
|
|
|
} // %triangle-bottom
|
|
|
|
|
|
|
|
.dropdown-menu {
|
|
|
|
|
|
|
|
&.triangle-top {
|
|
|
|
@extend %triangle-top;
|
2014-07-29 20:23:00 +04:00
|
|
|
|
2014-07-29 14:00:29 +04:00
|
|
|
&:before {
|
|
|
|
left: 50%;
|
2014-07-29 20:23:00 +04:00
|
|
|
margin-left: -6px;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
|
|
|
&:after {
|
|
|
|
left: 50%;
|
2014-07-29 20:23:00 +04:00
|
|
|
margin-left: -6px;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
2014-07-29 15:46:19 +04:00
|
|
|
} // &.triangle-top
|
2014-07-29 14:00:29 +04:00
|
|
|
|
2014-07-29 15:46:19 +04:00
|
|
|
&.triangle-top-left {
|
|
|
|
@extend %triangle-top;
|
2014-07-29 20:23:00 +04:00
|
|
|
|
2014-07-29 14:00:29 +04:00
|
|
|
&:before {
|
2014-07-29 20:23:00 +04:00
|
|
|
left: 1.2rem;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
|
|
|
&:after {
|
2014-07-29 20:23:00 +04:00
|
|
|
left: 1.2rem;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
2014-07-29 15:46:19 +04:00
|
|
|
} // &.triangle-top-left
|
|
|
|
|
|
|
|
&.triangle-top-right {
|
|
|
|
@extend %triangle-top;
|
2014-07-29 20:23:00 +04:00
|
|
|
|
2014-07-29 15:46:19 +04:00
|
|
|
&:before {
|
2014-07-29 20:23:00 +04:00
|
|
|
right: 1.2rem;
|
2014-07-29 15:46:19 +04:00
|
|
|
}
|
|
|
|
&:after {
|
2014-07-29 20:23:00 +04:00
|
|
|
right: 1.2rem;
|
2014-07-29 15:46:19 +04:00
|
|
|
}
|
|
|
|
} // &.triangle-top-right
|
|
|
|
|
|
|
|
&.triangle-bottom {
|
|
|
|
@extend %triangle-bottom;
|
2014-07-29 14:00:29 +04:00
|
|
|
&:before {
|
|
|
|
left: 50%;
|
2014-07-29 20:23:00 +04:00
|
|
|
margin-left: -6px;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
|
|
|
&:after {
|
|
|
|
left: 50%;
|
2014-07-29 20:23:00 +04:00
|
|
|
margin-left: -6px;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
2014-07-29 15:46:19 +04:00
|
|
|
} // &.triangle-bottom
|
2014-07-29 14:00:29 +04:00
|
|
|
|
|
|
|
&.triangle-bottom-left {
|
2014-07-29 15:46:19 +04:00
|
|
|
@extend %triangle-bottom;
|
2014-07-29 14:00:29 +04:00
|
|
|
&:before {
|
2014-07-29 20:23:00 +04:00
|
|
|
left: 1.2rem;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
|
|
|
&:after {
|
2014-07-29 20:23:00 +04:00
|
|
|
left: 1.2rem;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
|
|
|
} // &.triangle-bottom-left
|
2014-07-29 15:46:19 +04:00
|
|
|
|
2014-07-29 14:00:29 +04:00
|
|
|
&.triangle-bottom-right {
|
2014-07-29 15:46:19 +04:00
|
|
|
@extend %triangle-bottom;
|
2014-07-29 14:00:29 +04:00
|
|
|
&:before {
|
2014-07-29 20:23:00 +04:00
|
|
|
right: 1.2rem;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
|
|
|
&:after {
|
2014-07-29 20:23:00 +04:00
|
|
|
right: 1.2rem;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
|
|
|
} // &.triangle-bottom-right
|
|
|
|
} // .dropdown-menu
|
|
|
|
|
|
|
|
// List Item
|
|
|
|
.dropdown-item {
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
2014-07-29 20:23:00 +04:00
|
|
|
padding: 0.8rem 2rem;
|
2014-07-29 19:19:00 +04:00
|
|
|
font-size: 1.4rem;
|
|
|
|
line-height: 1;
|
|
|
|
color: #000;
|
2014-07-29 14:00:29 +04:00
|
|
|
|
|
|
|
&:not(.divider):hover,
|
|
|
|
&:not(.divider):focus {
|
2014-07-29 20:23:00 +04:00
|
|
|
color: #fff;
|
|
|
|
background: $blue;
|
2014-07-29 14:00:29 +04:00
|
|
|
}
|
2014-07-29 19:19:00 +04:00
|
|
|
} // .dropdown-item
|
2014-07-29 14:00:29 +04:00
|
|
|
|
2014-07-29 19:19:00 +04:00
|
|
|
// Divider
|
|
|
|
.dropdown-menu .divider {
|
|
|
|
display: block;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0.9rem 0;
|
|
|
|
height: 1px;
|
|
|
|
width: 100%;
|
|
|
|
position: relative;
|
2014-07-29 20:23:00 +04:00
|
|
|
background: #D0DADE;
|
2014-07-29 19:19:00 +04:00
|
|
|
overflow: hidden;
|
|
|
|
} // .dropdown-menu .divider
|
|
|
|
|
|
|
|
// Icons
|
|
|
|
.dropdown-with-icons {
|
|
|
|
.dropdown-item:not(.divider) {
|
|
|
|
padding: 0.6rem 3rem;
|
|
|
|
&[class*='icon-'] {
|
|
|
|
position: relative;
|
|
|
|
&:before {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
left: 1rem;
|
|
|
|
font-size: 1.2rem;
|
|
|
|
line-height: 1;
|
|
|
|
margin-top: -0.6rem;
|
|
|
|
}
|
|
|
|
} // &[class*='icon-']
|
|
|
|
} // .dropdown-item
|
|
|
|
} // .dropdown-with-icons
|