Skeleton loading states

Four skeletons that mirror the layout they stand in for, so content swaps in without a jump. Three use the shimmer sweep; the profile shows the quieter pulse variant. Skeletons are decorative — mark them aria-hidden and put aria-busy="true" on the region they stand in for.

1. Article card

Thumbnail, headline, two lines — same boxes as the real card.

View CSS
/* One shimmer to rule every bone */
.bone {
  background: #1E293B;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.bone::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
    transparent, rgba(148, 163, 184, 0.16), transparent);
  animation: skel-sweep 1.8s ease infinite;
}
@keyframes skel-sweep { to { transform: translateX(100%); } }

.skel-article { display: grid; gap: 10px; }
.skel-article .thumb { aspect-ratio: 16 / 9; }
.skel-article .title { height: 16px; width: 72%; }
.skel-article .line  { height: 10px; }

2. Data table

Header row darker, then uniform cells — rhythm reads as "table".

View CSS
/* The column template does the impersonation —
   bones are identical, the grid is the "table". */
.skel-table {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 0.8fr;
  gap: 8px 10px;
}
.skel-table .head { height: 12px; background: #2A3A55; }
.skel-table .cell { height: 10px; }

3. Profile (pulse variant)

No sweep — a quiet opacity heartbeat for dense skeletons.

View CSS
/* Pulse variant: same bones, quieter animation.
   Pick it when a sweep would strobe (tiny/dense UI). */
.sk.pulse .bone {
  animation: skel-pulse 1.6s ease-in-out infinite;
}
@keyframes skel-pulse { 50% { opacity: 0.55; } }

.skel-profile {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px 14px;
  align-items: center;
}
.skel-profile .avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
}

4. Dashboard

Stat tiles + a bar-chart silhouette promise what's coming.

View CSS
/* align-items: end grows the bars from the baseline —
   five heights are enough silhouette to say "chart". */
.skel-dash .chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
  height: 72px;
}
.skel-dash .vbar:nth-child(1) { height: 45%; }
.skel-dash .vbar:nth-child(2) { height: 80%; }
.skel-dash .vbar:nth-child(3) { height: 60%; }
.skel-dash .vbar:nth-child(4) { height: 100%; }
.skel-dash .vbar:nth-child(5) { height: 30%; }