Loading { height: 25% display: flex align-items: center justify-content: center -inline { height: 16px width: 16px display: inline-block margin: -3px 3px ::before { display: block height: 16px width: 16px } } -large { ::before { height: 100px width: 100px } ::after { color: #CCC; content: 'Loading...' font-size: 200% } } ::before { content: ' ' height: 50px width: 50px background-image: svg(waitingIcon) background-repeat: no-repeat background-position: center background-size: contain animation: spin 3s infinite linear } } @svg waitingIcon { width: 30px height: 30px content: "" circle { stroke: #CCC stroke-width: 3px fill: none } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }