JSFiddle - React, Tailwind, and code Playground
by Nick Hulea
SCSS
body {
overflow: hidden;
margin: 0px;
width: 100vw;
height: 100vh;
background: -webkit-gradient(linear, left top, left bottom, from(#ef31f9), to(rgba(125, 185, 232, 0)));
background: linear-gradient(180deg, #ef31f9, rgba(125, 185, 232, 0));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#ef31f9", endColorstr="#007db9e8", GradientType=0)
}
body,
html {
height: 100vh;
width: 100vw;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
margin: 0;
overflow: hidden;
font-family: "Lucida Sans Typewriter", "Lucida Console", Monaco, "Bitstream Vera Sans Mono", monospace;
}
.btn {
position: fixed;
top: 0;
margin: 1rem;
-webkit-appearance: none;
border: none;
outline: none;
padding: 10px 20px;
cursor: pointer;
background: none;
color: #fff;
font-weight: 900;
text-transform: uppercase;
font-family: "Lucida Sans Typewriter", "Lucida Console", Monaco, "Bitstream Vera Sans Mono", monospace;
}
#makeItRain {
right: 0;
}
#makeItRainbow {
left: 0;
}
/* SMARTPHONES LANDSCAPE */
@media only screen and (max-width: 414px) {
.italic {
font-size: 12px;
}
}
/*
* Animation module with all animation code
*/
.anim-text-flow,
.anim-text-flow-hover:hover {
/*
* Animation variables
*/
$animationSteps: 250;
$animationDuration: 10;
$animationElement: span;
$animationElementsCount: 100;
$delayBetweenLetters: 0.1;
/*
* Elements settings
*/
#{$animationElement} {
animation-name: anim-text-flow-keys;
animation-duration: #{$animationDuration}s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-fill-mode: forwards;
}
/*
* Keyframe loop
*/
@keyframes anim-text-flow-keys {
@for $i from 0 through $animationSteps {
#{percentage($i * (1 / $animationSteps))} {
color: hsla(random(365), 60, 60, 1);
}
}
}
/*
* Element animation delay loop
*/
...