/* Adapted from HeroUI v3, ce90ea3. Copyright 2025 NextUI Inc. * See third-party/HEROUI-LICENSE. Modified: hv- class prefix. */ .hv-skeleton { @apply pointer-events-none relative overflow-hidden rounded-sm bg-surface-tertiary/70; } /* Animation types */ .hv-skeleton--shimmer { &::after { @apply absolute inset-0 -translate-x-full animate-skeleton bg-linear-to-r from-transparent via-surface-tertiary to-transparent content-['']; } /* When applied to a parent container with multiple skeletons */ &:has(.hv-skeleton) { &::after { content: none; } /* Single synchronized shimmer that passes over all children */ &::before { @apply absolute inset-0 -translate-x-full animate-skeleton content-['']; background: linear-gradient( 90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100% ); z-index: 10; pointer-events: none; /* Use mix-blend-mode to only show over skeleton elements */ mix-blend-mode: overlay; } /* Ensure children don't have their own shimmer */ & .hv-skeleton { &::after { content: none; } } } } .hv-skeleton--pulse { @apply animate-pulse; } .hv-skeleton--none { } /* Also covers the synchronized parent shimmer pseudo-elements. */ .hv-skeleton { @apply motion-reduce:animate-none; }