This repository has been archived on 2024-06-14. You can view files and clone it, but cannot push or open issues or pull requests.
icynet-admin/components/common/Dropdown/Dropdown.module.scss

80 lines
1.5 KiB
SCSS
Raw Normal View History

.wrapper {
position: relative;
.toggle {
appearance: none;
2022-09-12 19:31:58 +00:00
border: 1px solid var(--container-main-border);
transition: background-color linear 0.15s;
background-color: var(--container-main);
border-radius: 4px;
width: 32px;
height: 32px;
cursor: pointer;
&.active,
&:hover,
&:focus-visible {
2022-09-12 19:31:58 +00:00
background-color: var(--container-main-secondary);
}
&.active {
border-bottom: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
&::after {
content: '';
font-weight: bold;
font-size: 1.25rem;
}
}
.dropdown {
position: absolute;
display: flex;
flex-direction: column;
top: 100%;
min-width: 140px;
2022-09-12 19:31:58 +00:00
background-color: var(--container-main);
border: 1px solid var(--container-main-border);
border-radius: 4px;
a,
button {
appearance: none;
border: 0;
background: transparent;
2022-09-12 19:31:58 +00:00
transition: background-color linear 0.15s;
font-size: 1rem;
text-align: left;
padding: 0.5rem 0.5rem;
2022-09-12 19:31:58 +00:00
border-bottom: 1px solid var(--container-main-border);
cursor: pointer;
&:hover,
&:focus-visible {
2022-09-12 19:31:58 +00:00
background-color: var(--container-main-secondary);
}
&:last-child {
border-bottom: 0;
}
}
}
&.right {
.dropdown {
right: 0;
border-top-right-radius: 0;
}
}
&.left {
.dropdown {
left: 0;
border-top-left-radius: 0;
}
}
}