2020-08-04 10:57:10 +08:00
|
|
|
$d-popover-background: var(--secondary);
|
|
|
|
$d-popover-border: var(--primary-medium);
|
2019-03-26 22:43:27 +08:00
|
|
|
|
|
|
|
@-webkit-keyframes popoverFadeIn {
|
|
|
|
from {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
to {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes popoverFadeIn {
|
|
|
|
from {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
to {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#d-popover {
|
|
|
|
background-color: $d-popover-background;
|
|
|
|
position: absolute;
|
2019-04-02 20:39:20 +08:00
|
|
|
z-index: z("modal", "tooltip");
|
2019-03-26 22:43:27 +08:00
|
|
|
border-color: $d-popover-border;
|
|
|
|
border-style: solid;
|
|
|
|
border-width: 1px;
|
|
|
|
max-width: 300px;
|
|
|
|
-webkit-animation: popoverFadeIn 0.5s;
|
|
|
|
animation: popoverFadeIn 0.5s;
|
|
|
|
background-clip: padding-box;
|
|
|
|
display: block;
|
|
|
|
box-shadow: shadow("dropdown");
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
|
|
&.is-under {
|
|
|
|
margin-top: 0px;
|
|
|
|
|
|
|
|
.d-popover-top-arrow {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-popover-bottom-arrow {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-above {
|
|
|
|
margin-top: 0px;
|
|
|
|
|
|
|
|
.d-popover-bottom-arrow {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-popover-top-arrow {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.retina {
|
|
|
|
border-width: 0.5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-popover-content {
|
2019-03-26 23:34:27 +08:00
|
|
|
padding: 0.5em;
|
2019-03-26 22:43:27 +08:00
|
|
|
font-size: $font-down-1;
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
-webkit-animation: popoverFadeIn 0.5s;
|
|
|
|
animation: popoverFadeIn 0.5s;
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-popover-arrow {
|
|
|
|
border-style: solid;
|
|
|
|
color: transparent;
|
|
|
|
content: "";
|
|
|
|
position: absolute;
|
2020-05-31 18:25:49 +08:00
|
|
|
z-index: z("tooltip") - 100;
|
2019-03-26 22:43:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.d-popover-top-arrow {
|
|
|
|
border-color: transparent transparent $d-popover-border;
|
2020-06-01 22:31:53 +08:00
|
|
|
top: -8px;
|
2019-03-26 22:43:27 +08:00
|
|
|
border-width: 0 8px 8px;
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
border-color: transparent transparent $d-popover-background;
|
|
|
|
border-style: solid;
|
|
|
|
border-width: 0 7px 7px;
|
2020-06-01 22:31:53 +08:00
|
|
|
bottom: -8.5px;
|
2019-03-26 22:43:27 +08:00
|
|
|
margin-left: -7px;
|
|
|
|
position: absolute;
|
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-popover-bottom-arrow {
|
|
|
|
border-color: $d-popover-border transparent transparent;
|
2020-06-01 22:31:53 +08:00
|
|
|
top: 100%;
|
2019-03-26 22:43:27 +08:00
|
|
|
border-width: 8px 8px 0;
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
position: absolute;
|
|
|
|
content: "";
|
|
|
|
border-color: $d-popover-background transparent transparent;
|
|
|
|
border-style: solid;
|
|
|
|
border-width: 7px 7px 0;
|
2020-06-01 22:31:53 +08:00
|
|
|
bottom: 1.5px;
|
2019-03-26 22:43:27 +08:00
|
|
|
transform: translate(-7px, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|