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 {
|
2022-02-04 12:57:55 +01:00
|
|
|
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;
|
2022-02-04 12:57:55 +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;
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
|
|
|
|
2020-10-22 11:16:15 +02:00
|
|
|
.c-dropdown--large .c-dropdown__button {
|
2022-02-04 12:57:55 +01:00
|
|
|
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
|
|
|
|
2022-02-04 12:57:55 +01:00
|
|
|
.icon-site {
|
2022-03-15 14:21:06 +01:00
|
|
|
padding-inline-end: 0.2rem;
|
2022-02-04 12:57:55 +01:00
|
|
|
}
|
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 {
|
2022-02-04 12:57:55 +01:00
|
|
|
display: inline-block;
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
|
|
|
|
2020-06-15 14:03:33 +02:00
|
|
|
.c-dropdown__togle--icon {
|
2022-02-04 12:57:55 +01:00
|
|
|
&:before {
|
|
|
|
display: none; // TODO: remove when iconfont styles are removed
|
|
|
|
}
|
2020-06-15 14:03:33 +02:00
|
|
|
|
2022-02-04 12:57:55 +01:00
|
|
|
.icon {
|
|
|
|
@include svg-icon(1em, middle);
|
|
|
|
}
|
2020-06-15 14:03:33 +02:00
|
|
|
|
2022-02-04 12:57:55 +01:00
|
|
|
.icon-arrow-up {
|
|
|
|
display: none;
|
|
|
|
}
|
2020-06-15 14:03:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.is-open .c-dropdown__togle--icon {
|
2022-02-04 12:57:55 +01:00
|
|
|
.icon-arrow-up {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
2020-06-15 14:03:33 +02:00
|
|
|
|
2022-02-04 12:57:55 +01:00
|
|
|
.icon-arrow-down {
|
|
|
|
display: none;
|
|
|
|
}
|
2020-06-15 14:03:33 +02:00
|
|
|
}
|
|
|
|
|
2019-01-02 00:11:47 +01:00
|
|
|
.c-dropdown__menu.c-dropdown__menu {
|
2022-02-04 12:57:55 +01:00
|
|
|
margin-top: 0.75rem;
|
|
|
|
padding: 0.75rem 1rem;
|
|
|
|
min-width: 8rem;
|
|
|
|
position: absolute;
|
|
|
|
z-index: 1000;
|
|
|
|
animation: dropdownIn 0.1s ease-out backwards;
|
|
|
|
list-style: none;
|
|
|
|
// 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 {
|
2022-02-04 12:57:55 +01:00
|
|
|
margin-bottom: 0.375rem;
|
|
|
|
font-size: 0.8rem;
|
2019-01-02 00:11:47 +01:00
|
|
|
|
2022-02-04 12:57:55 +01:00
|
|
|
&:hover {
|
|
|
|
.c-dropdown__indicator {
|
|
|
|
opacity: 0.6;
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
2022-02-04 12:57:55 +01:00
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.c-dropdown__item:last-child {
|
2022-02-04 12:57:55 +01:00
|
|
|
margin-bottom: 0;
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes dropdownIn {
|
2022-02-04 12:57:55 +01:00
|
|
|
0% {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
|
2022-02-04 12:57:55 +01:00
|
|
|
100% {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|