2019-01-02 00:11:47 +01:00
|
|
|
// =============================================================================
|
|
|
|
// Listing view smaller dropdowns
|
|
|
|
// =============================================================================
|
2022-04-25 15:53:13 +02:00
|
|
|
.c-dropdown.hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
|
|
|
|
.c-dropdown__button {
|
|
|
|
display: inline-block;
|
|
|
|
box-sizing: border-box;
|
2022-03-15 14:21:06 +01:00
|
|
|
padding-inline-start: 0.5rem;
|
|
|
|
padding-inline-end: 0.25rem;
|
2019-01-02 00:11:47 +01:00
|
|
|
// Make this the same as the other buttons
|
|
|
|
line-height: 1.85;
|
|
|
|
border: solid 1px transparent;
|
|
|
|
border-radius: 2px;
|
|
|
|
font-size: 0.95em;
|
|
|
|
cursor: pointer;
|
|
|
|
-webkit-font-smoothing: subpixel-antialiased;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
2020-10-22 11:16:15 +02:00
|
|
|
.c-dropdown--large .c-dropdown__button {
|
|
|
|
line-height: 2.9em;
|
2022-03-15 14:21:06 +01:00
|
|
|
padding-inline-start: 0.5rem;
|
|
|
|
padding-inline-end: 0.5rem;
|
2020-10-22 11:16:15 +02:00
|
|
|
|
|
|
|
.icon-site {
|
2022-03-15 14:21:06 +01:00
|
|
|
padding-inline-end: 0.2rem;
|
2020-10-22 11:16:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-16 12:15:34 +01:00
|
|
|
.c-dropdown__icon {
|
2022-03-15 14:21:06 +01:00
|
|
|
padding-inline-start: 0.4rem;
|
|
|
|
padding-inline-end: 0.4rem;
|
2021-12-16 12:15:34 +01:00
|
|
|
}
|
|
|
|
|
2019-01-02 00:11:47 +01:00
|
|
|
.c-dropdown__toggle {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
2020-06-15 14:03:33 +02:00
|
|
|
.c-dropdown__togle--icon {
|
|
|
|
&:before {
|
|
|
|
display: none; // TODO: remove when iconfont styles are removed
|
|
|
|
}
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
@include svg-icon(1em, middle);
|
|
|
|
}
|
|
|
|
|
|
|
|
.icon-arrow-up {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.is-open .c-dropdown__togle--icon {
|
|
|
|
.icon-arrow-up {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.icon-arrow-down {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-02 00:11:47 +01:00
|
|
|
.c-dropdown__menu.c-dropdown__menu {
|
|
|
|
margin-top: 0.75rem;
|
|
|
|
padding: 0.75rem 1rem;
|
|
|
|
min-width: 8rem;
|
|
|
|
position: absolute;
|
2020-10-22 11:25:02 +02:00
|
|
|
z-index: 1000;
|
2019-01-02 00:11:47 +01:00
|
|
|
animation: dropdownIn 0.1s ease-out backwards;
|
|
|
|
list-style: none;
|
2020-10-22 11:16:15 +02:00
|
|
|
// Override any right alignment that might've been set by a parent element
|
|
|
|
// (such as the snippets header)
|
2022-03-15 14:21:06 +01:00
|
|
|
text-align: start;
|
2022-07-23 18:55:36 +02:00
|
|
|
|
|
|
|
@media (forced-colors: active) {
|
|
|
|
border: 2px solid transparent;
|
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.c-dropdown__item {
|
|
|
|
margin-bottom: 0.375rem;
|
2021-12-15 17:33:05 +01:00
|
|
|
font-size: 0.8rem;
|
2019-01-02 00:11:47 +01:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
.c-dropdown__indicator {
|
|
|
|
opacity: 0.6;
|
|
|
|
}
|
2022-02-04 12:57:55 +01:00
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.c-dropdown__item:last-child {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes dropdownIn {
|
|
|
|
0% {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
100% {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|