animated-entrances.css 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. @charset "UTF-8";
  2. /* from: https://codepen.io/nonsalant/pen/poKdGKN/8cd36d806e3bcae07060ebb80533f88d */
  3. /* ---------------------------------------- */
  4. /* Quick SCSS System for Animated Entrances */
  5. /* ---------------------------------------- */
  6. /* Converted to SCSS by Ștefan Matei from:
  7. ---------------------------------------------------------------------------
  8. "System for Animated Entrances" by Neale Van Fleet
  9. https://css-tricks.com/a-handy-little-system-for-animated-entrances-in-css/
  10. ---------------------------------------------------------------------------
  11. */
  12. @media (prefers-reduced-motion: reduce) {
  13. .animate {
  14. animation: none !important;
  15. }
  16. }
  17. /* Animation delay classes. Eg: .delay-1 */
  18. .delay-1 {
  19. animation-delay: calc(0.5s + 1*0.1s);
  20. }
  21. .delay-2 {
  22. animation-delay: calc(0.5s + 2*0.1s);
  23. }
  24. .delay-3 {
  25. animation-delay: calc(0.5s + 3*0.1s);
  26. }
  27. .delay-4 {
  28. animation-delay: calc(0.5s + 4*0.1s);
  29. }
  30. .delay-5 {
  31. animation-delay: calc(0.5s + 5*0.1s);
  32. }
  33. .delay-6 {
  34. animation-delay: calc(0.5s + 6*0.1s);
  35. }
  36. .delay-7 {
  37. animation-delay: calc(0.5s + 7*0.1s);
  38. }
  39. .delay-8 {
  40. animation-delay: calc(0.5s + 8*0.1s);
  41. }
  42. .delay-9 {
  43. animation-delay: calc(0.5s + 9*0.1s);
  44. }
  45. .delay-10 {
  46. animation-delay: calc(0.5s + 10*0.1s);
  47. }
  48. .delay-11 {
  49. animation-delay: calc(0.5s + 11*0.1s);
  50. }
  51. .delay-12 {
  52. animation-delay: calc(0.5s + 12*0.1s);
  53. }
  54. .delay-13 {
  55. animation-delay: calc(0.5s + 13*0.1s);
  56. }
  57. .delay-14 {
  58. animation-delay: calc(0.5s + 14*0.1s);
  59. }
  60. .delay-15 {
  61. animation-delay: calc(0.5s + 15*0.1s);
  62. }
  63. .delay-16 {
  64. animation-delay: calc(0.5s + 16*0.1s);
  65. }
  66. :where(.animate) {
  67. animation-duration: 0.75s;
  68. animation-delay: 0.5s;
  69. animation-name: animate-fade;
  70. animation-timing-function: cubic-bezier(0.26, 0.53, 0.74, 1.48);
  71. animation-fill-mode: backwards;
  72. /* Fade In */
  73. /* Pop In */
  74. /* Blur In */
  75. /* Glow In */
  76. /* Grow In */
  77. /* Splat In */
  78. /* Roll In */
  79. /* Flip In */
  80. /* Spin In */
  81. /* Slide In */
  82. /* Drop In */
  83. /* Drop Up */
  84. }
  85. :where(.animate).fade {
  86. animation-name: animate-fade;
  87. animation-timing-function: ease;
  88. }
  89. :where(.animate).pop {
  90. animation-name: animate-pop;
  91. }
  92. :where(.animate).blur {
  93. animation-name: animate-blur;
  94. animation-timing-function: ease;
  95. }
  96. :where(.animate).glow {
  97. animation-name: animate-glow;
  98. animation-timing-function: ease;
  99. }
  100. :where(.animate).grow {
  101. animation-name: animate-grow;
  102. }
  103. :where(.animate).splat {
  104. animation-name: animate-splat;
  105. }
  106. :where(.animate).roll {
  107. animation-name: animate-roll;
  108. }
  109. :where(.animate).flip {
  110. animation-name: animate-flip;
  111. transform-style: preserve-3d;
  112. perspective: 1000px;
  113. }
  114. :where(.animate).spin {
  115. animation-name: animate-spin;
  116. transform-style: preserve-3d;
  117. perspective: 1000px;
  118. }
  119. :where(.animate).slide {
  120. animation-name: animate-slide;
  121. }
  122. :where(.animate).drop {
  123. animation-name: animate-drop;
  124. animation-timing-function: cubic-bezier(0.77, 0.14, 0.91, 1.25);
  125. }
  126. :where(.animate).drop-up {
  127. animation-name: animate-drop-up;
  128. animation-timing-function: cubic-bezier(0.77, 0.14, 0.91, 1.25);
  129. }
  130. @media screen {
  131. @keyframes animate-fade {
  132. 0% {
  133. opacity: 0;
  134. }
  135. 100% {
  136. opacity: 1;
  137. }
  138. }
  139. @keyframes animate-pop {
  140. 0% {
  141. opacity: 0;
  142. transform: scale(0.5, 0.5);
  143. }
  144. 100% {
  145. opacity: 1;
  146. transform: scale(1, 1);
  147. }
  148. }
  149. @keyframes animate-blur {
  150. 0% {
  151. opacity: 0;
  152. filter: blur(15px);
  153. }
  154. 100% {
  155. opacity: 1;
  156. filter: blur(0px);
  157. }
  158. }
  159. @keyframes animate-glow {
  160. 0% {
  161. opacity: 0;
  162. filter: brightness(3) saturate(3);
  163. transform: scale(0.8, 0.8);
  164. }
  165. 100% {
  166. opacity: 1;
  167. filter: brightness(1) saturate(1);
  168. transform: scale(1, 1);
  169. }
  170. }
  171. @keyframes animate-grow {
  172. 0% {
  173. opacity: 0;
  174. transform: scale(1, 0);
  175. visibility: hidden;
  176. }
  177. 100% {
  178. opacity: 1;
  179. transform: scale(1, 1);
  180. }
  181. }
  182. @keyframes animate-splat {
  183. 0% {
  184. opacity: 0;
  185. transform: scale(0, 0) rotate(20deg) translate(0, -30px);
  186. }
  187. 70% {
  188. opacity: 1;
  189. transform: scale(1.1, 1.1) rotate(15deg);
  190. }
  191. 85% {
  192. opacity: 1;
  193. transform: scale(1.1, 1.1) rotate(15deg) translate(0, -10px);
  194. }
  195. 100% {
  196. opacity: 1;
  197. transform: scale(1, 1) rotate(0) translate(0, 0);
  198. }
  199. }
  200. @keyframes animate-roll {
  201. 0% {
  202. opacity: 0;
  203. transform: scale(0, 0) rotate(360deg);
  204. }
  205. 100% {
  206. opacity: 1;
  207. transform: scale(1, 1) rotate(0deg);
  208. }
  209. }
  210. @keyframes animate-flip {
  211. 0% {
  212. opacity: 0;
  213. transform: rotateX(-120deg) scale(0.9, 0.9);
  214. }
  215. 100% {
  216. opacity: 1;
  217. transform: rotateX(0deg) scale(1, 1);
  218. }
  219. }
  220. @keyframes animate-spin {
  221. 0% {
  222. opacity: 0;
  223. transform: rotateY(-120deg) scale(0.9, 0.9);
  224. }
  225. 100% {
  226. opacity: 1;
  227. transform: rotateY(0deg) scale(1, 1);
  228. }
  229. }
  230. @keyframes animate-slide {
  231. 0% {
  232. opacity: 0;
  233. transform: translate(0, 20px);
  234. }
  235. 100% {
  236. opacity: 1;
  237. transform: translate(0, 0);
  238. }
  239. }
  240. @keyframes animate-drop {
  241. 0% {
  242. opacity: 0;
  243. transform: translate(0, -300px) scale(0.9, 1.1);
  244. }
  245. 95% {
  246. opacity: 1;
  247. transform: translate(0, 0) scale(0.9, 1.1);
  248. }
  249. 96% {
  250. opacity: 1;
  251. transform: translate(10px, 0) scale(1.2, 0.9);
  252. }
  253. 97% {
  254. opacity: 1;
  255. transform: translate(-10px, 0) scale(1.2, 0.9);
  256. }
  257. 98% {
  258. opacity: 1;
  259. transform: translate(5px, 0) scale(1.1, 0.9);
  260. }
  261. 99% {
  262. opacity: 1;
  263. transform: translate(-5px, 0) scale(1.1, 0.9);
  264. }
  265. 100% {
  266. opacity: 1;
  267. transform: translate(0, 0) scale(1, 1);
  268. }
  269. }
  270. @keyframes animate-drop-up {
  271. 0% {
  272. opacity: 0;
  273. transform: translate(0, 300px) scale(0.9, 1.1);
  274. }
  275. 95% {
  276. opacity: 1;
  277. transform: translate(0, 0) scale(0.9, 1.1);
  278. }
  279. 96% {
  280. opacity: 1;
  281. transform: translate(-10px, 0) scale(1.2, 0.9);
  282. }
  283. 97% {
  284. opacity: 1;
  285. transform: translate(10px, 0) scale(1.2, 0.9);
  286. }
  287. 98% {
  288. opacity: 1;
  289. transform: translate(-5px, 0) scale(1.1, 0.9);
  290. }
  291. 99% {
  292. opacity: 1;
  293. transform: translate(5px, 0) scale(1.1, 0.9);
  294. }
  295. 100% {
  296. opacity: 1;
  297. transform: translate(0, 0) scale(1, 1);
  298. }
  299. }
  300. }