UNPKG

animarte

Version:

Making the digital world a little more animated place

52 lines (49 loc) 1.29 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-ellipsis { display: flex; justify-content: space-between; align-items: center; } .animarte-ellipsis__element { --width: 20%; --height: 20%; width: var(--width); height: var(--height); border-radius: 100vw; background: currentColor; animation-iteration-count: infinite; } .animarte-ellipsis--growing-1 .animarte-ellipsis__element { animation-name: ellipsisGrowing1; animation-timing-function: linear; animation-iteration-count: infinite; animation-duration: var(--animarte-speed); } .animarte-ellipsis--growing-1 .animarte-ellipsis__element:nth-of-type(1) { transform-origin: left 100%; } .animarte-ellipsis--growing-1 .animarte-ellipsis__element:nth-of-type(2) { transform-origin: center 100%; animation-delay: calc(var(--animarte-speed) * 0.1); } .animarte-ellipsis--growing-1 .animarte-ellipsis__element:nth-of-type(3) { transform-origin: right 100%; animation-delay: calc(var(--animarte-speed) * 0.2); } @keyframes ellipsisGrowing1 { 0%, 20%, 100% { transform: scale(1); } 10% { transform: scale(1.5); } }