insomnia/app/css/components/dropdown.scss

73 lines
1.3 KiB
SCSS
Raw Normal View History

2016-03-23 05:26:27 +00:00
@import '../constants/colors';
2016-03-21 05:47:49 +00:00
@import '../constants/dimensions';
.dropdown {
position: relative;
2016-04-04 07:15:30 +00:00
display: inline-block;
2016-03-21 05:47:49 +00:00
ul {
position: absolute;
2016-04-07 01:11:16 +00:00
top: 100%;
2016-03-21 06:36:39 +00:00
left: 0;
2016-03-21 05:47:49 +00:00
display: none;
2016-04-06 04:25:47 +00:00
z-index: 100;
2016-04-10 05:03:18 +00:00
min-width: $dropdown-min-width;
2016-03-21 05:47:49 +00:00
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.15);
2016-04-10 06:37:22 +00:00
// Separate it from the button a bit
padding-top: 3px;
padding-bottom: 3px;
2016-04-04 07:15:30 +00:00
li {
background: $bg-super-light;
2016-03-23 05:26:27 +00:00
2016-04-04 07:15:30 +00:00
&:first-child {
border-top-left-radius: $radius-md;
border-top-right-radius: $radius-md;
2016-03-23 05:26:27 +00:00
}
2016-04-04 07:15:30 +00:00
&:last-child {
border-bottom-left-radius: $radius-md;
border-bottom-right-radius: $radius-md;
2016-03-23 05:26:27 +00:00
}
2016-03-23 18:34:39 +00:00
2016-04-04 07:15:30 +00:00
& > button {
font-size: $font-size-md;
text-align: left;
2016-04-15 02:13:49 +00:00
padding: 10px $padding-md 10px $padding-sm;
2016-04-04 07:15:30 +00:00
width: 100%;
display: block;
color: $font-light-bg !important;
&:hover {
background: $hl-sm;
}
&:active {
background: $hl-md;
}
i.fa {
display: inline-block;
2016-04-05 05:35:21 +00:00
width: 2em;
2016-04-15 02:13:49 +00:00
text-align: center;
2016-04-04 07:15:30 +00:00
}
2016-03-23 18:34:39 +00:00
}
2016-03-21 05:47:49 +00:00
}
}
2016-04-05 05:35:21 +00:00
2016-04-07 01:11:16 +00:00
&.dropdown--flip ul {
bottom: 100%;
top: auto;
}
2016-04-05 05:35:21 +00:00
&.dropdown--open ul {
display: block;
}
&.dropdown--right ul {
right: 0;
left: auto;
}
2016-03-21 05:47:49 +00:00
}