UNPKG

animarte

Version:

Making the digital world a little more animated place

65 lines (63 loc) 1.74 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; justify-items: center; align-items: center; } .animarte-circles--pulsing-1 .animarte-circles__element { grid-area: 1/1; margin: 0; width: 100%; height: 100%; border-radius: 50%; background: transparent; border: 1px solid currentColor; animation-name: circlesPulsing1; animation-duration: var(--animarte-speed); animation-iteration-count: infinite; animation-timing-function: ease-in-out; } .animarte-circles--pulsing-1 .animarte-circles__element:nth-of-type(1) { width: calc(20% * 1); height: calc(20% * 1); animation-delay: calc(var(--animarte-speed) / 2 / 4 * 1); } .animarte-circles--pulsing-1 .animarte-circles__element:nth-of-type(2) { width: calc(20% * 2); height: calc(20% * 2); animation-delay: calc(var(--animarte-speed) / 2 / 4 * 2); } .animarte-circles--pulsing-1 .animarte-circles__element:nth-of-type(3) { width: calc(20% * 3); height: calc(20% * 3); animation-delay: calc(var(--animarte-speed) / 2 / 4 * 3); } .animarte-circles--pulsing-1 .animarte-circles__element:nth-of-type(4) { width: calc(20% * 4); height: calc(20% * 4); animation-delay: calc(var(--animarte-speed) / 2 / 4 * 4); } .animarte-circles--pulsing-1 .animarte-circles__element:nth-of-type(5) { width: calc(20% * 5); height: calc(20% * 5); animation-delay: calc(var(--animarte-speed) / 2 / 4 * 5); } @keyframes circlesPulsing1 { 0%, 100% { transform: scale(0.85); opacity: 0.2; } 50% { transform: scale(1); opacity: 1; } }