92 lines
1.8 KiB
SCSS
92 lines
1.8 KiB
SCSS
@forward '_vars.scss' show $namespace-prefix;
|
|
@use '_vars.scss';
|
|
@forward 'animations/fade.scss' show $namespace-prefix;
|
|
|
|
$color: #333;
|
|
|
|
[data-#{vars.$namespace-prefix}-root] {
|
|
max-width: calc(100vw - 10px);
|
|
}
|
|
|
|
.#{vars.$namespace-prefix}-box {
|
|
position: relative;
|
|
background-color: $color;
|
|
color: white;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
line-height: 1.4;
|
|
outline: 0;
|
|
transition-property: transform, visibility, opacity;
|
|
|
|
&[data-placement^='top'] > .#{vars.$namespace-prefix}-arrow {
|
|
bottom: 0;
|
|
|
|
&::before {
|
|
bottom: -7px;
|
|
left: 0;
|
|
border-width: 8px 8px 0;
|
|
border-top-color: initial;
|
|
transform-origin: center top;
|
|
}
|
|
}
|
|
|
|
&[data-placement^='bottom'] > .#{vars.$namespace-prefix}-arrow {
|
|
top: 0;
|
|
|
|
&::before {
|
|
top: -7px;
|
|
left: 0;
|
|
border-width: 0 8px 8px;
|
|
border-bottom-color: initial;
|
|
transform-origin: center bottom;
|
|
}
|
|
}
|
|
|
|
&[data-placement^='left'] > .#{vars.$namespace-prefix}-arrow {
|
|
right: 0;
|
|
|
|
&::before {
|
|
border-width: 8px 0 8px 8px;
|
|
border-left-color: initial;
|
|
right: -7px;
|
|
transform-origin: center left;
|
|
}
|
|
}
|
|
|
|
&[data-placement^='right'] > .#{vars.$namespace-prefix}-arrow {
|
|
left: 0;
|
|
|
|
&::before {
|
|
left: -7px;
|
|
border-width: 8px 8px 8px 0;
|
|
border-right-color: initial;
|
|
transform-origin: center right;
|
|
}
|
|
}
|
|
|
|
&[data-inertia][data-state='visible'] {
|
|
transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);
|
|
}
|
|
}
|
|
|
|
.#{vars.$namespace-prefix}-arrow {
|
|
& {
|
|
width: vars.$arrow-size;
|
|
height: vars.$arrow-size;
|
|
color: $color;
|
|
}
|
|
|
|
&::before {
|
|
content: '';
|
|
position: absolute;
|
|
border-color: transparent;
|
|
border-style: solid;
|
|
}
|
|
}
|
|
|
|
.#{vars.$namespace-prefix}-content {
|
|
position: relative;
|
|
padding: 5px 9px;
|
|
z-index: 1;
|
|
}
|