mirror of https://github.com/IanLunn/Hover.git
29 lines
609 B
SCSS
29 lines
609 B
SCSS
/* Outline Outward */
|
|
@mixin outline-outward {
|
|
display: inline-block;
|
|
$outerBorderWidth: 4px;
|
|
$innerBorderWidth: 4px;
|
|
|
|
position: relative;
|
|
|
|
@extend %hacks;
|
|
|
|
&:before {
|
|
content: '';
|
|
position: absolute;
|
|
border: $primaryColour solid $outerBorderWidth;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
transition-duration: .3s;
|
|
transition-property: top right bottom left;
|
|
}
|
|
|
|
&:hover:before {
|
|
top: -($outerBorderWidth + $innerBorderWidth);
|
|
right: -($outerBorderWidth + $innerBorderWidth);
|
|
bottom: -($outerBorderWidth + $innerBorderWidth);
|
|
left: -($outerBorderWidth + $innerBorderWidth);
|
|
}
|
|
} |