mirror of
https://github.com/Xevion/old.xevion.github.io.git
synced 2025-12-06 13:15:39 -06:00
44 lines
850 B
SCSS
44 lines
850 B
SCSS
// center vertically and/or horizontally an absolute positioned element
|
|
@mixin center($xy:xy) {
|
|
@if $xy==xy {
|
|
left: 50%;
|
|
top: 50%;
|
|
bottom: auto;
|
|
right: auto;
|
|
transform: translateX(-50%) translateY(-50%);
|
|
}
|
|
@else if $xy==x {
|
|
left: 50%;
|
|
right: auto;
|
|
transform: translateX(-50%);
|
|
}
|
|
@else if $xy==y {
|
|
top: 50%;
|
|
bottom: auto;
|
|
transform: translateY(-50%);
|
|
}
|
|
}
|
|
|
|
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
|
|
@if $inset {
|
|
box-shadow: inset $top $left $blur $color;
|
|
}
|
|
@else {
|
|
box-shadow: $top $left $blur $color;
|
|
}
|
|
}
|
|
|
|
// define different reveal animations
|
|
@mixin reveal($animation, $value) {
|
|
@include keyframes($animation) {
|
|
0% {
|
|
opacity: 1;
|
|
transform: translateY($value);
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
}
|