2020-12-02 09:43:34 +00:00
|
|
|
.tippy-box {
|
|
|
|
@extend %overlay;
|
|
|
|
}
|
|
|
|
[data-tippy-root] {
|
|
|
|
@extend %overlay-layer;
|
|
|
|
}
|
|
|
|
%overlay-layer {
|
|
|
|
max-width: calc(100vw - 10px);
|
|
|
|
}
|
|
|
|
%overlay {
|
|
|
|
& {
|
|
|
|
position: relative;
|
|
|
|
outline: 0;
|
|
|
|
transition-property: transform, visibility, opacity;
|
|
|
|
}
|
2021-05-27 12:23:54 +00:00
|
|
|
&[data-animation='fade'][data-state='hidden'] {
|
2020-12-02 09:43:34 +00:00
|
|
|
opacity: 0;
|
|
|
|
}
|
2021-05-27 12:23:54 +00:00
|
|
|
&[data-inertia][data-state='visible'] {
|
|
|
|
transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);
|
2020-12-02 09:43:34 +00:00
|
|
|
}
|
2021-05-27 12:23:54 +00:00
|
|
|
&[data-animation='fade'][data-state='hidden'] {
|
2020-12-02 09:43:34 +00:00
|
|
|
opacity: 0;
|
|
|
|
}
|
2021-05-27 12:23:54 +00:00
|
|
|
&[data-inertia][data-state='visible'] {
|
|
|
|
transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);
|
2020-12-02 09:43:34 +00:00
|
|
|
}
|
|
|
|
& {
|
2021-11-23 18:32:11 +00:00
|
|
|
background-color: rgb(var(--tone-gray-000));
|
2021-10-07 18:21:11 +00:00
|
|
|
border-radius: var(--decor-radius-100);
|
|
|
|
box-shadow: var(--decor-elevation-400);
|
2020-12-02 09:43:34 +00:00
|
|
|
}
|
|
|
|
.tippy-arrow {
|
|
|
|
@extend %overlay-tail;
|
|
|
|
}
|
2021-05-27 12:23:54 +00:00
|
|
|
&[data-placement^='bottom'] > .tippy-arrow {
|
2020-12-02 09:43:34 +00:00
|
|
|
@extend %overlay-tail-bottom;
|
|
|
|
}
|
2021-05-27 12:23:54 +00:00
|
|
|
&[data-placement^='top'] > .tippy-arrow {
|
2020-12-02 09:43:34 +00:00
|
|
|
@extend %overlay-tail-top;
|
|
|
|
}
|
2021-05-27 12:23:54 +00:00
|
|
|
&[data-placement^='left'] > .tippy-arrow {
|
2020-12-02 09:43:34 +00:00
|
|
|
@extend %overlay-tail-left;
|
|
|
|
}
|
2021-05-27 12:23:54 +00:00
|
|
|
&[data-placement^='right'] > .tippy-arrow {
|
2020-12-02 09:43:34 +00:00
|
|
|
@extend %overlay-tail-right;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%overlay-tail {
|
|
|
|
--size: 5px;
|
|
|
|
&::before {
|
2021-05-27 12:23:54 +00:00
|
|
|
content: '';
|
2020-12-02 09:43:34 +00:00
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%overlay-tail-top {
|
|
|
|
& {
|
|
|
|
bottom: 0;
|
|
|
|
}
|
|
|
|
&::before {
|
|
|
|
left: 0;
|
|
|
|
bottom: calc(0px - var(--size));
|
|
|
|
transform-origin: center top;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%overlay-tail-bottom {
|
|
|
|
& {
|
2021-05-27 12:23:54 +00:00
|
|
|
top: 0;
|
2020-12-02 09:43:34 +00:00
|
|
|
}
|
|
|
|
&::before {
|
|
|
|
left: 0;
|
|
|
|
top: calc(0px - var(--size));
|
|
|
|
transform-origin: center bottom;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%overlay-tail-left {
|
|
|
|
& {
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
&::before {
|
|
|
|
right: calc(0px - var(--size));
|
|
|
|
transform-origin: center left;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%overlay-tail-right {
|
|
|
|
& {
|
2021-05-27 12:23:54 +00:00
|
|
|
left: 0;
|
2020-12-02 09:43:34 +00:00
|
|
|
}
|
|
|
|
&::before {
|
|
|
|
left: calc(0px - var(--size));
|
|
|
|
transform-origin: center right;
|
|
|
|
}
|
|
|
|
}
|