144 lines
3.1 KiB
SCSS
144 lines
3.1 KiB
SCSS
.w-imap-wrapper {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
container-type: inline-size;
|
|
}
|
|
|
|
.w-imap-inner {
|
|
display: inline-block;
|
|
position: relative;
|
|
|
|
> img {
|
|
border-radius: $border-radius-base;
|
|
}
|
|
}
|
|
|
|
.w-imap-placeholder {
|
|
width: 50%;
|
|
}
|
|
|
|
.imap-close-button {
|
|
display: none;
|
|
}
|
|
|
|
.w-imap-points {
|
|
$imap-point-icon: url(iconUrl("plus")) !default;
|
|
$imap-point-font-size: 20px !default;
|
|
$imap-point-size: 52px !default;
|
|
$imap-point-bg: $brand-secondary !default;
|
|
$imap-point-radius: 50% !default;
|
|
$imap-point-bg-active: $brand-secondary !default;
|
|
$imap-content-bg: $body-bg !default;
|
|
$imap-content-box-shadow: $box-shadow !default;
|
|
$imap-content-padding: 25px !default;
|
|
|
|
width: 100%;
|
|
|
|
.icon {
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0;
|
|
position: relative;
|
|
width: $imap-point-size;
|
|
height: $imap-point-size;
|
|
z-index: 1;
|
|
border: 0;
|
|
border-radius: $imap-point-radius;
|
|
background: $imap-point-bg;
|
|
outline-offset: 0;
|
|
transition: background-color $transition-speed, transform $transition-speed, outline-offset $transition-speed;
|
|
|
|
&::before {
|
|
content: "";
|
|
background: $imap-point-icon;
|
|
background-size: contain;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
transform: translate(-50%, -50%);
|
|
display: inline-block;
|
|
width: $imap-point-font-size;
|
|
height: $imap-point-font-size;
|
|
filter: invert(1);
|
|
}
|
|
}
|
|
|
|
*:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
&.points-lg .point {
|
|
position: absolute;
|
|
}
|
|
|
|
&.points-sm {
|
|
display: none;
|
|
}
|
|
|
|
.w-imap-content {
|
|
background: $imap-content-bg;
|
|
box-shadow: $imap-content-box-shadow;
|
|
max-width: 45vw;
|
|
opacity: 0;
|
|
padding: $imap-content-padding;
|
|
position: absolute;
|
|
pointer-events: none;
|
|
transition: opacity $transition-speed;
|
|
width: 545px;
|
|
border-radius: $border-radius-base;
|
|
}
|
|
|
|
.icon:hover,
|
|
.active .icon {
|
|
background: $imap-point-bg-active;
|
|
outline: 1px solid $imap-point-bg-active;
|
|
outline-offset: 8px;
|
|
}
|
|
|
|
.active {
|
|
z-index: 51;
|
|
|
|
.icon {
|
|
z-index: 51;
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
.w-imap-content {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
z-index: 50;
|
|
}
|
|
}
|
|
|
|
@container (inline-size < 600px) {
|
|
@include container-query-selector('.w-imap-content') {
|
|
max-width: 60vw;
|
|
}
|
|
}
|
|
|
|
@container (inline-size < 544px) {
|
|
@include container-query-selector('.icon') {
|
|
width: 32px; // 24
|
|
height: 32px;
|
|
|
|
&::before {
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
}
|
|
|
|
@include container-query-selector('.icon:hover, .active .icon') {
|
|
outline-offset: 4px;
|
|
}
|
|
|
|
@include container-query-selector('.w-imap-content') {
|
|
padding: calc($imap-content-padding / 2);
|
|
}
|
|
}
|
|
}
|