/* * Icon * * A sized box for any inline graphic. Color comes from `currentColor`, so * an icon always matches the text around it. */ @layer dou.components { .dou-icon { --dou-icon-size: 1em; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: var(--dou-icon-size); height: var(--dou-icon-size); line-height: 1; vertical-align: -0.125em; & > svg { width: 100%; height: 100%; /* the icon's size, for graphics that size their details in em */ font-size: var(--dou-icon-size); } &.is-spin { animation: dou-spin var(--dou-motion-loop-spin) linear infinite; } } @keyframes dou-spin { to { transform: rotate(1turn); } } }