Prototyping priority disclosure + fit-to-box for pa-stat--square before touching the framework. Primary number = P0 (always shown, maxed, never overflows) → symbol P1 → label P2. All styles/scripts here are sfl- scoped and throwaway.

1 · Playground — drag the bottom-right corner

Resize to any width/height. The label drops, then the symbol, while the number always fits and stays as large as possible. Swap content to confirm it's char-count independent.

$847K
Monthly Revenue
12.5% vs last month
Updated 2 min ago · FY2026 Q2

What to look for

  • Grow the box → tiers appear in priority order: number → symbol → label → trend → context.
  • Shrink it → they drop in reverse. The live readout below the tile shows which tiers are currently on.
  • Disclosure needs both enough width and height — a wide but short banner won't show the tall-only tiers (trend / context).
  • The number always fits and stays maxed, whatever survives around it.
  • Swap content → fit is char-count independent.

1b · Real component — pa-stat--square[data-pa-stat-fit]

The actual framework component (theme CSS + pa-stat-fit.js), not the sfl- prototype. Minimal authored markup — the JS wraps __number + __symbol into the fit group at runtime. Drag the corner; behaviour should match the playground above.

$ 847K
Monthly Revenue
▲ 12.5% vs last month
Updated 2 min ago · FY2026 Q2

Authored markup (5 children, flat — JS does the wrapping):

<div class="pa-stat pa-stat--square pa-stat--info" data-pa-stat-fit>
  <span class="pa-stat__symbol">$</span>
  <span class="pa-stat__number">847K</span>
  <div class="pa-stat__label">Monthly Revenue</div>
  <div class="pa-stat__change pa-stat__change--positive">▲ 12.5% vs last month</div>
  <div class="pa-stat__context">Updated 2 min ago</div>
</div>

2 · Fixed-size matrix — eyeball the disclosure tiers

Identical content at decreasing box sizes. Note where label / symbol drop, and that the number is always maxed.

847K$
Monthly Revenue
300×140 (lg)
847K$
Monthly Revenue
200×96 (md)
847K$
Monthly Revenue
130×70 (sm)
847K$
Monthly Revenue
78×48 (xs)
847K$
Monthly Revenue
520×80 (banner)

3 · Char-count independence — same box, different content

All 200×96. With JS fit each number fills its box at the max size that fits — regardless of character count.

1
Res Version
"1"
92
Contracts
"92"
847K$
Revenue
"847K$"
¥12.4M
Tokyo Office
"¥12.4M"

4 · Why pure cqi can't do it

Both boxes are 160×90 with a pure-CSS clamp(2rem, 42cqi, 20rem) font. Short content is fine; longer content overflows — the font size knows the box width but not the character count.

92
cqi · "92" ✓
847K
cqi · "847K" ~
12.4M
cqi · "12.4M" ✗ spills
Type / for commands, : to search a category, or just start typing

Settings

Body text size. All elements scale proportionally.
👤

John Doe

Administrator
  • 📊 Dashboard
  • 📝 Forms
  • 📋 Tables
  • 📊 Data Grid