mirror of https://github.com/IanLunn/Hover.git
32 lines
632 B
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);
|
|
}
|
|
} |