scratch-www/src/components/navigation/dropdown.scss

82 lines
1.8 KiB
SCSS
Raw Normal View History

2015-09-11 20:29:12 -04:00
@import 'colors';
.dropdown {
position: absolute;
right: 0;
min-width: 160px;
2015-09-21 09:18:00 -04:00
max-width: 260px;
2015-09-11 20:29:12 -04:00
background-color: $base-background-color;
2015-09-21 09:18:00 -04:00
overflow: visible;
border-radius: 0 0 5px 5px;
padding: 10px;
2015-09-11 20:29:12 -04:00
color: white;
font-weight: normal;
font-size: 0.8125rem;
2015-09-21 09:18:00 -04:00
border: 1px solid $active-background-color;
2015-09-11 20:29:12 -04:00
display: none;
&.open {
display: block;
}
a {
color: white;
2015-09-21 09:18:00 -04:00
background-color: transparent;
2015-09-11 20:29:12 -04:00
}
input {
// 100% minus border and padding
2015-09-21 09:18:00 -04:00
width: calc(100% - 30px);
margin-bottom: 12px;
2015-09-11 20:29:12 -04:00
}
label {
display: block;
margin-bottom: 5px;
}
> li {
display: block;
line-height: 30px;
&.divider {
border-top: 1px solid #149acb;
margin-top: 10px;
}
a {
display: block;
padding: 0 10px;
&:hover {
2015-09-21 09:18:00 -04:00
background-color: $active-background-color;
text-decoration: none;
2015-09-11 20:29:12 -04:00
}
}
}
&.with-arrow {
2015-09-21 09:18:00 -04:00
$arrow-border-width: 14px;
2015-09-11 20:29:12 -04:00
margin-top: $arrow-border-width;
2015-09-21 09:18:00 -04:00
border-radius: 5px;
overflow: visible;
&:before {
2015-09-11 20:29:12 -04:00
position: absolute;
display: block;
top: -$arrow-border-width/2;
right: 10%;
height: $arrow-border-width;
width: $arrow-border-width;
content: '';
transform: rotate(45deg);
background-color: $base-background-color;
border-top: 1px solid $active-background-color;
border-left: 1px solid $active-background-color;
border-radius: 5px;
2015-09-11 20:29:12 -04:00
}
}
}