@include keyframes(Scale){ 50%{ @include transform(scale(1.2)); } } @include keyframes(Rotate){ 50%{ @include transform(rotate(180deg) scale(1.2)); } 100%{ @include transform(rotate(360deg)); } } @include keyframes(ColorCycle){ 100%{ -webkit-filter: hue-rotate(360deg); -moz-filter: hue-rotate(360deg); -ms-filter: hue-rotate(360deg); -filter: hue-rotate(360deg); } } body{ @include radial-gradient(hsl(0, 100%, 0%) 20%, hsl(180deg, 50%, 10%)); background-size: 5px 5px; } main{ width: 400px; margin: 120px auto; } div.horizontal-bar{ @include linear-gradient(90deg, hsl(0deg, 100%, 50%) 0%, hsl(90deg, 100%, 50%) 25%, hsl(180deg, 100%, 50%) 50%, hsl(270deg, 100%, 50%) 75%, hsl(360deg, 100%, 50%) 100%); @include animation(ColorCycle .4s linear infinite); width: 100%; height: 20px; position: absolute; top: 220px; left: 0; box-shadow: 0 0 20px hsl(90deg, 100%, 50%); } .horizontal-bar.two{ top: 180px; @include animation(ColorCycle .4s linear infinite reverse); } div.rainbow{ @include animation(Rotate 3s linear infinite, ColorCycle 6s linear infinite); &.reverse{ @include animation-direction(reverse); } width: 200px; box-shadow: 0 0 200px hsl(0deg, 100%, 50%); height: 200px; float: left; position: relative; border-radius: 50%; overflow: hidden; background: #222; .inset{ display: inline-block; position: relative; z-index: 3; width: 160px; height: 160px; margin: 20px 0 0 20px; border-radius: 50%; background: black; } &::before{ @include linear-gradient(hsl(0, 100%, 50%) 0%, hsl(90deg, 100%, 50%) 50%, hsl(180deg, 100%, 50%) 100%); content: ""; top: 0; left: 100px; width: 100px; height: 200px; position: absolute; } &::after{ @include linear-gradient(hsl(360deg, 100%, 50%) 0%, hsl(270deg, 100%, 50%) 50%, hsl(180deg, 100%, 50%) 100%); content: ""; top: 0; left: 0px; width: 100px; height: 200px; position: absolute; } }