2016-03-23 05:26:27 +00:00
|
|
|
@import '../constants/colors';
|
2016-03-21 05:47:49 +00:00
|
|
|
@import '../constants/dimensions';
|
2016-07-21 21:55:03 +00:00
|
|
|
@import '../constants/fonts';
|
2016-03-21 05:47:49 +00:00
|
|
|
|
|
|
|
.dropdown {
|
|
|
|
position: relative;
|
2016-04-04 07:15:30 +00:00
|
|
|
display: inline-block;
|
2016-11-11 22:01:21 +00:00
|
|
|
box-sizing: border-box;
|
2016-11-25 19:01:41 +00:00
|
|
|
text-align: left;
|
2016-03-21 05:47:49 +00:00
|
|
|
|
2016-07-06 20:18:26 +00:00
|
|
|
&:focus {
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
2016-06-20 06:05:40 +00:00
|
|
|
.dropdown__backdrop {
|
|
|
|
position: fixed;
|
2017-03-12 00:31:23 +00:00
|
|
|
z-index: 999;
|
2017-03-09 06:23:23 +00:00
|
|
|
display: none;
|
2016-06-20 06:05:40 +00:00
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
content: ' ';
|
|
|
|
}
|
|
|
|
|
2016-03-21 05:47:49 +00:00
|
|
|
ul {
|
2017-03-09 06:23:23 +00:00
|
|
|
z-index: 1000;
|
2017-03-09 07:38:48 +00:00
|
|
|
display: none;
|
2016-03-21 05:47:49 +00:00
|
|
|
position: absolute;
|
2016-04-07 01:11:16 +00:00
|
|
|
top: 100%;
|
2016-03-21 06:36:39 +00:00
|
|
|
left: 0;
|
2016-08-29 17:58:59 +00:00
|
|
|
min-width: @dropdown-min-width;
|
2017-03-09 06:23:23 +00:00
|
|
|
border: 1px solid @hl-sm;
|
2017-01-20 21:54:03 +00:00
|
|
|
box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.1);
|
2016-11-25 19:01:41 +00:00
|
|
|
box-sizing: border-box;
|
2017-01-23 22:41:31 +00:00
|
|
|
background: var(--color-bg);
|
2016-08-15 17:04:36 +00:00
|
|
|
|
2016-04-10 06:37:22 +00:00
|
|
|
// Separate it from the button a bit
|
2016-08-29 17:58:59 +00:00
|
|
|
margin-top: @padding-xxs;
|
|
|
|
margin-bottom: @padding-xxs;
|
2016-08-15 17:04:36 +00:00
|
|
|
|
2016-08-29 17:58:59 +00:00
|
|
|
padding-top: @radius-md;
|
|
|
|
padding-bottom: @radius-md;
|
2016-08-15 17:04:36 +00:00
|
|
|
|
2016-08-29 17:58:59 +00:00
|
|
|
border-radius: @radius-md;
|
2016-11-25 19:01:41 +00:00
|
|
|
overflow: auto;
|
2016-04-10 06:37:22 +00:00
|
|
|
|
2016-04-04 07:15:30 +00:00
|
|
|
li {
|
|
|
|
& > button {
|
2016-08-29 17:58:59 +00:00
|
|
|
font-size: @font-size-md;
|
2016-04-04 07:15:30 +00:00
|
|
|
text-align: left;
|
2017-04-21 04:30:52 +00:00
|
|
|
padding-right: @padding-md;
|
|
|
|
padding-left: @padding-sm;
|
|
|
|
height: @line-height-xs;
|
2016-04-04 07:15:30 +00:00
|
|
|
width: 100%;
|
|
|
|
display: block;
|
2017-01-23 22:41:31 +00:00
|
|
|
color: var(--color-font) !important;
|
2016-07-19 16:59:26 +00:00
|
|
|
white-space: nowrap;
|
2016-11-29 20:55:31 +00:00
|
|
|
margin: 0;
|
2016-04-04 07:15:30 +00:00
|
|
|
|
2016-11-12 00:58:23 +00:00
|
|
|
&:hover:not(:disabled),
|
|
|
|
&:focus:not(:disabled) {
|
2017-01-23 22:41:31 +00:00
|
|
|
background: @hl-sm;
|
2016-04-04 07:15:30 +00:00
|
|
|
}
|
|
|
|
|
2016-11-12 00:58:23 +00:00
|
|
|
&:active:not(:disabled) {
|
2016-08-29 17:58:59 +00:00
|
|
|
background: @hl-md;
|
2016-04-04 07:15:30 +00:00
|
|
|
}
|
|
|
|
|
2017-03-29 02:21:49 +00:00
|
|
|
i.fa:first-child {
|
2016-04-04 07:15:30 +00:00
|
|
|
display: inline-block;
|
2016-08-15 17:04:36 +00:00
|
|
|
width: 2.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-07-20 19:09:21 +00:00
|
|
|
&.dropdown--up ul {
|
|
|
|
top: auto;
|
|
|
|
bottom: 100%;
|
|
|
|
}
|
|
|
|
|
2016-11-29 20:55:31 +00:00
|
|
|
.dropdown__inner {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown__text {
|
|
|
|
white-space: nowrap;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
& > *:not(:first-child) {
|
|
|
|
margin-left: 0.3em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown__hint,
|
|
|
|
.dropdown__right {
|
2017-01-23 22:41:31 +00:00
|
|
|
color: @hl-xl;
|
2016-11-29 20:55:31 +00:00
|
|
|
margin-left: auto;
|
|
|
|
padding-left: @padding-lg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-23 06:53:22 +00:00
|
|
|
li.dropdown__divider {
|
2016-08-29 17:58:59 +00:00
|
|
|
border-bottom: 1px solid @hl-lg;
|
2016-04-23 06:53:22 +00:00
|
|
|
overflow: visible !important;
|
|
|
|
height: 0;
|
2016-08-29 17:58:59 +00:00
|
|
|
margin: @padding-md @padding-md @padding-md @padding-md;
|
2016-12-30 23:06:27 +00:00
|
|
|
min-width: @dropdown-min-width - @padding-md * 2;
|
2016-04-23 06:53:22 +00:00
|
|
|
|
|
|
|
.dropdown__divider__label {
|
|
|
|
position: relative;
|
2016-08-29 17:58:59 +00:00
|
|
|
left: -@padding-sm / 2;
|
2016-08-15 17:04:36 +00:00
|
|
|
top: -0.7rem;
|
2016-08-29 17:58:59 +00:00
|
|
|
color: @hl;
|
2016-04-23 06:53:22 +00:00
|
|
|
padding-right: 1em;
|
2017-01-23 22:41:31 +00:00
|
|
|
background: var(--color-bg);
|
2016-08-29 17:58:59 +00:00
|
|
|
font-size: @font-size-xs;
|
2016-04-23 06:53:22 +00:00
|
|
|
text-transform: uppercase;
|
|
|
|
}
|
2016-08-15 17:04:36 +00:00
|
|
|
|
|
|
|
&.dropdown__divider--no-name {
|
2016-08-29 17:58:59 +00:00
|
|
|
margin: @padding-xs 0;
|
2016-08-15 17:04:36 +00:00
|
|
|
|
|
|
|
.dropdown__divider__label {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2016-04-23 06:53:22 +00:00
|
|
|
}
|
|
|
|
|
2016-04-07 01:11:16 +00:00
|
|
|
&.dropdown--flip ul {
|
|
|
|
bottom: 100%;
|
|
|
|
top: auto;
|
|
|
|
}
|
|
|
|
|
2016-06-20 06:05:40 +00:00
|
|
|
&.dropdown--open {
|
|
|
|
ul {
|
2017-03-09 07:38:48 +00:00
|
|
|
display: block;
|
|
|
|
animation: fadeIn 200ms ease-out;
|
2016-06-20 06:05:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown__backdrop {
|
|
|
|
display: block;
|
|
|
|
}
|
2016-04-05 05:35:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.dropdown--right ul {
|
|
|
|
right: 0;
|
|
|
|
left: auto;
|
|
|
|
}
|
2016-11-11 22:01:21 +00:00
|
|
|
|
|
|
|
&.dropdown--wide ul {
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
}
|
2016-03-21 05:47:49 +00:00
|
|
|
}
|