Hover/scss/hover/_bubble-float-top.scss

32 lines
632 B
SCSS

/* Bubble Float Top */
@mixin bubble-float-top {
display: inline-block;
position: relative;
transition-duration: $defaultDuration;
transition-property: transform;
@extend %hacks;
&:before {
pointer-events: none;
position: absolute;
z-index: -1;
content: '';
left: calc(50% - #{$tipWidth});
top: 0;
border-style: solid;
border-width: 0 $tipWidth $tipHeight $tipWidth;
border-color: transparent transparent $tipColour transparent;
transition-duration: $defaultDuration;
transition-property: top;
}
&:hover {
transform: translateY(5px) translateZ(0);
}
&:hover:before {
top: -($tipHeight);
}
}