mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
110 lines
1.9 KiB
SCSS
110 lines
1.9 KiB
SCSS
@import '../constants/colors';
|
|
@import '../constants/dimensions';
|
|
|
|
.dropdown {
|
|
position: relative;
|
|
display: inline-block;
|
|
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.dropdown__backdrop {
|
|
display: none;
|
|
position: fixed;
|
|
z-index: 999;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
content: ' ';
|
|
}
|
|
|
|
ul {
|
|
display: none;
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0;
|
|
z-index: 1000;
|
|
min-width: $dropdown-min-width;
|
|
box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.25);
|
|
// Separate it from the button a bit
|
|
margin-top: 3px;
|
|
margin-bottom: 3px;
|
|
border-radius: $radius-md;
|
|
background: $bg-super-light;
|
|
overflow: hidden;
|
|
|
|
li {
|
|
& > button {
|
|
font-size: $font-size-md;
|
|
text-align: left;
|
|
padding: $padding-xs $padding-md $padding-xs $padding-sm;
|
|
width: 100%;
|
|
display: block;
|
|
color: $font-super-light-bg !important;
|
|
white-space: nowrap;
|
|
|
|
&:hover {
|
|
background: $hl-sm;
|
|
}
|
|
|
|
&:active {
|
|
background: $hl-md;
|
|
}
|
|
|
|
i.fa {
|
|
display: inline-block;
|
|
width: 2em;
|
|
text-align: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&.dropdown--up ul {
|
|
top: auto;
|
|
bottom: 100%;
|
|
}
|
|
|
|
li.dropdown__divider {
|
|
border-bottom: 1px solid $hl-lg;
|
|
overflow: visible !important;
|
|
margin: $padding-md $padding-md $padding-md $padding-sm;
|
|
min-width: $dropdown-min-width;
|
|
height: 0;
|
|
padding: 0;
|
|
|
|
.dropdown__divider__label {
|
|
position: relative;
|
|
top: -0.80rem;
|
|
// HACK: Fine adjustment
|
|
color: $hl;
|
|
padding-right: 1em;
|
|
background: #fff;
|
|
font-size: $font-size-xs;
|
|
text-transform: uppercase;
|
|
}
|
|
}
|
|
|
|
&.dropdown--flip ul {
|
|
bottom: 100%;
|
|
top: auto;
|
|
}
|
|
|
|
&.dropdown--open {
|
|
ul {
|
|
display: block;
|
|
}
|
|
|
|
.dropdown__backdrop {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
&.dropdown--right ul {
|
|
right: 0;
|
|
left: auto;
|
|
}
|
|
}
|