0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 13:10:14 +01:00
wagtail/client/scss/components/_dropdown.scss
Albina 488c3583b7
'Prefers-contrast' admin theming (#12348)
Co-authored-by: Victoria Ottah <82820329+Toriasdesign@users.noreply.github.com>
2024-10-17 09:13:22 +01:00

57 lines
1.4 KiB
SCSS

.w-dropdown__toggle {
@apply w-px-2 w-text-text-label w-bg-transparent w-border-2 w-border-transparent;
}
.w-dropdown__toggle--icon {
@apply w-w-8 w-h-8 more-contrast:w-p-0 more-contrast:w-border more-contrast:w-rounded-sm more-contrast:w-border-border-interactive-more-contrast hover:more-contrast:w-border-border-interactive-more-contrast-hover;
}
.w-dropdown__toggle-icon {
@apply w-w-4 w-h-4 w-align-text-bottom w-transition motion-reduce:w-transition-none;
}
.w-dropdown__content {
@apply w-flex w-flex-col w-justify-start w-py-2;
max-height: 50vh;
overflow-y: auto;
}
.w-dropdown__content :where(a, button) {
@apply w-bg-transparent w-inline-flex w-items-center w-text-left w-font-bold w-text-text-label-menus-default w-py-3 w-px-6 w-no-underline w-transition w-outline-offset-inside w-w-full;
.icon {
@apply w-w-4 w-h-4 w-mr-3 w-transition w-shrink-0;
}
.icon-wrapper .icon {
@apply w-mr-0;
}
&:hover {
@apply w-text-text-label-menus-active w-bg-surface-menu-item-active;
}
}
/* Only apply the hover-opacity effect for the default "dropdown" theme */
.w-dropdown--dropdown .w-dropdown__content :where(a, button) {
.icon {
@apply w-opacity-50;
}
&:hover {
.icon {
@apply w-opacity-100;
}
}
}
.w-dropdown--popup {
.w-dropdown__content {
@apply w-p-4;
}
.w-dropdown__toggle {
@apply w-p-0;
}
}