UNPKG

animarte

Version:

Making the digital world a little more animated place

46 lines (44 loc) 1.1 kB
.animarte { position: relative; isolation: isolate; box-sizing: border-box; overflow: hidden; flex-shrink: 0; width: var(--animarte-size); height: var(--animarte-size); color: var(--animarte-color); } .animarte-circles { display: grid; } .animarte-circles--breathing .animarte-circles__element { grid-area: 1/1; width: 100%; height: 100%; border-radius: 50%; background: currentColor; opacity: 0.5; animation-name: blinkKeyframes; animation-duration: var(--animarte-speed); animation-iteration-count: infinite; } .animarte-circles--breathing .animarte-circles__element:nth-of-type(1) { animation-delay: calc(var(--animarte-speed) / 2 / 4 * 1); } .animarte-circles--breathing .animarte-circles__element:nth-of-type(2) { animation-delay: calc(var(--animarte-speed) / 2 / 4 * 2); } .animarte-circles--breathing .animarte-circles__element:nth-of-type(3) { animation-delay: calc(var(--animarte-speed) / 2 / 4 * 3); } @keyframes blinkKeyframes { 0% { transform: scale(1); } 50% { transform: scale(0); } 100% { transform: scale(1); } }