/* * RFC-0026: icons follow the text (1em, currentColor), sit on its baseline, flip right-to-left * when they point, and stay visible in forced colors. */ .ch-icon { display: inline-block; flex-shrink: 0; vertical-align: -0.125em; } [dir="rtl"] .ch-icon[data-ch-mirror] { transform: scaleX(-1); } @media (forced-colors: active) { .ch-icon { fill: CanvasText; } a .ch-icon, button .ch-icon { fill: currentColor; } } .ch-footer__social { @apply items-center; } .ch-social-link { @apply inline-flex size-8 items-center justify-center rounded-full text-lg; } .ch-social-link:hover { background: color-mix(in oklab, currentColor 12%, transparent); } /* RFC-0026: icons in surfaces — on their own, in buttons, badges and statistics. */ .ch-icon-box { /* w-fit: in a Stack or Card (a flex column) it keeps its own width, at the start. */ @apply inline-flex w-fit items-center justify-center text-2xl; } .ch-icon-box[data-size="s"] { @apply text-base; } .ch-icon-box[data-size="l"] { @apply text-4xl; } .ch-icon-box[data-size="xl"] { @apply text-6xl; } .ch-icon-box[data-tone="brand"] { color: var(--ch-color-brand); } .ch-icon-box[data-tone="accent"] { color: var(--ch-color-accent); } .ch-icon-box[data-tone="success"] { color: #15803d; } .ch-icon-box[data-tone="warning"] { color: #b45309; } .ch-icon-box[data-tone="danger"] { color: #b91c1c; } .ch-button:has(> .ch-button__icon) { @apply inline-flex items-center gap-2; } .ch-badge > .ch-icon { @apply mr-1; } .ch-stat__icon { @apply mb-2 block text-3xl; color: var(--ch-color-brand); }