webapp/src/components/_shared/Popup/Popup.module.scss

147 lines
2.2 KiB
SCSS
Raw Normal View History

2022-10-25 15:36:32 +00:00
.container {
position: relative;
}
2023-04-17 10:31:20 +00:00
.trigger {
cursor: pointer;
}
2022-10-17 20:53:04 +00:00
.popup {
background: var(--background-color);
2024-05-06 22:01:20 +00:00
border: 1px solid rgb(0 0 0 / 15%);
border-radius: 1.6rem;
box-shadow: 0 8px 16px 0 rgb(0 0 0 / 5%);
color: var(--default-color);
2023-02-08 20:43:59 +00:00
cursor: default;
min-width: 144px;
opacity: 1;
2024-05-06 22:01:20 +00:00
overflow: hidden;
2022-12-17 03:27:00 +00:00
position: absolute;
2023-01-25 22:13:01 +00:00
text-align: left;
2024-01-22 21:53:50 +00:00
top: calc(100% + 11px);
z-index: 101;
2022-10-17 21:01:19 +00:00
2022-12-17 03:27:00 +00:00
ul {
margin-bottom: 0;
2022-12-17 03:27:00 +00:00
li {
2024-05-06 22:01:20 +00:00
margin: 0;
2022-12-17 03:27:00 +00:00
position: relative;
2022-12-17 03:27:00 +00:00
&:last-child {
margin-bottom: 0;
}
}
}
2022-12-17 03:27:00 +00:00
&.tiny {
@include font-size(1.4rem);
2024-05-06 22:01:20 +00:00
.action {
padding: 0.5rem 1rem;
}
2024-05-06 22:01:20 +00:00
li:first-child .action {
padding-top: 1rem;
}
2024-05-06 22:01:20 +00:00
li:last-child .action {
padding-bottom: 1rem;
2022-10-17 20:53:04 +00:00
}
}
2022-12-17 03:27:00 +00:00
&.horizontalAnchorCenter {
2023-11-28 18:10:00 +00:00
right: 0;
2023-10-25 21:41:04 +00:00
@include media-breakpoint-up(md) {
left: 50%;
2023-11-28 18:10:00 +00:00
right: auto;
2023-10-25 21:41:04 +00:00
transform: translateX(-50%);
}
2022-12-17 03:27:00 +00:00
}
&.horizontalAnchorRight {
right: 0;
}
2022-11-02 21:55:29 +00:00
.topBorderItem {
border-top: 2px solid;
}
2023-10-11 21:56:59 +00:00
a:link,
:global(.link) {
2022-10-17 20:53:04 +00:00
border: none;
2022-10-25 15:36:32 +00:00
white-space: nowrap;
2022-10-26 19:22:22 +00:00
2024-05-07 08:15:20 +00:00
&::before {
2024-05-06 22:01:20 +00:00
content: '';
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
2022-10-26 19:22:22 +00:00
}
2022-10-17 20:53:04 +00:00
}
.icon {
2022-10-26 19:22:22 +00:00
display: inline-block;
2024-05-06 22:01:20 +00:00
margin-right: 1rem;
width: 2.4rem;
img {
display: inline-block;
2024-05-06 22:01:20 +00:00
max-height: 2.4rem;
max-width: 2.4rem;
transition: filter 0.3s;
vertical-align: middle;
}
2022-10-17 20:53:04 +00:00
}
2024-05-06 22:01:20 +00:00
.action {
display: flex;
align-items: center;
width: 100%;
box-sizing: border-box;
padding: 8px 16px;
font-size: inherit;
font-weight: 500;
text-align: left;
white-space: nowrap;
&:hover {
background: var(--black-500);
color: var(--black-50) !important;
.icon img {
filter: invert(1);
}
}
}
li:first-child .action {
padding-top: 16px;
}
li:last-child .action {
padding-bottom: 16px;
}
2022-10-17 20:53:04 +00:00
}
.profilePopup {
@include media-breakpoint-up(sm) {
min-width: 22rem;
}
}
2022-10-25 15:36:32 +00:00
// TODO: animation
// .popup {
// opacity: 1;
// transition: opacity 0.3s;
// z-index: 1;
// &.visible {
// opacity: 0;
// transition: opacity 0.3s, z-index 0s 0.3s;
// z-index: -1;
// }
// }