rekt-theme/src/main/_smoke.scss

63 lines
1.8 KiB
SCSS
Raw Normal View History

2018-07-13 13:24:58 +00:00
// smoke effect
@if $icedream-fog-bg {
#main {
position: relative;
2018-07-13 13:54:11 +00:00
min-width: 100%;
max-width: 100%;
width: 100%;
overflow-x: hidden;
2018-07-13 13:24:58 +00:00
&::before {
2018-07-22 19:17:23 +00:00
opacity: $icedream-fog-base-opacity;
2018-07-13 13:54:11 +00:00
background-image: url('../images/whitefog.png');
2018-07-13 13:24:58 +00:00
background-attachment: fixed;
content: ' '; // sass-lint:disable-line variable-for-property
position: absolute;
left: 0;
top: 0;
height: 100%;
2018-07-13 13:54:11 +00:00
min-width: 100%;
@if $icedream-fog-bg-blur {
filter: blur(16px);
}
2018-07-13 13:24:58 +00:00
@if not($icedream-fog-bg-animated) {
2018-07-13 13:54:11 +00:00
background-size: 200% 100%;
2018-07-13 13:24:58 +00:00
}
// animate it so it moves right to left slowly?
@if $icedream-fog-bg-animated {
background-repeat: repeat-x;
background-size: 100% 100%;
animation: icedream-bg-slide linear $icedream-fog-bg-slide-animation-length infinite,
icedream-bg-pulse ease-in-out $icedream-fog-bg-pulse-animation-length infinite;
2018-07-13 13:54:11 +00:00
transform: scale(2, 1) translateX(0);
transform-origin: left;
@keyframes icedream-bg-pulse {
0% {
2018-07-22 19:17:23 +00:00
opacity: $icedream-fog-base-opacity - ($icedream-fog-base-opacity * .05);
}
22% {
2018-07-22 19:17:23 +00:00
opacity: $icedream-fog-base-opacity - ($icedream-fog-base-opacity * .12);
}
54% {
2018-07-22 19:17:23 +00:00
opacity: $icedream-fog-base-opacity + ($icedream-fog-base-opacity * .15);
}
77% {
2018-07-22 19:17:23 +00:00
opacity: $icedream-fog-base-opacity + ($icedream-fog-base-opacity * .5);
}
100% {
2018-07-22 20:27:34 +00:00
opacity: $icedream-fog-base-opacity - ($icedream-fog-base-opacity * .0.5);
}
}
2018-07-13 13:24:58 +00:00
@keyframes icedream-bg-slide {
to {
2018-07-13 13:54:11 +00:00
transform: scale(2, 1) translateX(-50%);
2018-07-13 13:24:58 +00:00
}
}
}
}
}
}