Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/components/RatingHistogram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,13 @@ export default function RatingHistogram({
marginBottom: "12px",
}}
>
<strong style={{ fontSize: "1.5rem", color: "var(--text)" }}>
<strong
style={{
fontSize: "1.5rem",
color: "var(--text)",
fontVariantNumeric: "tabular-nums",
}}
>
{rating.toFixed(1)}
</strong>
<div style={{ color: "var(--muted)", fontSize: "0.85rem" }}>
Expand All @@ -192,6 +198,7 @@ export default function RatingHistogram({
marginLeft: "auto",
color: "var(--muted)",
fontSize: "0.75rem",
fontVariantNumeric: "tabular-nums",
}}
>
{total} {total === 1 ? "review" : "reviews"}
Expand Down Expand Up @@ -220,6 +227,7 @@ export default function RatingHistogram({
textAlign: "right",
color: "var(--text)",
whiteSpace: "nowrap",
fontVariantNumeric: "tabular-nums",
}}
>
{star} ★
Expand Down Expand Up @@ -248,6 +256,7 @@ export default function RatingHistogram({
width: "28px",
textAlign: "right",
color: "var(--muted)",
fontVariantNumeric: "tabular-nums",
}}
>
{count}
Expand Down
1 change: 1 addition & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2206,6 +2206,7 @@ code,
color: var(--text);
font-size: 1rem;
font-weight: 700;
font-variant-numeric: tabular-nums;
line-height: 1.3;
white-space: nowrap;
}
Expand Down
21 changes: 1 addition & 20 deletions src/styles/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@
font-variant-numeric: tabular-nums;
}

/* Ensure amounts/counts inside TagChip use tabular-nums */
.tag-chip {
font-variant-numeric: tabular-nums;
}

/* ── MarketplacePage count bar ──────────────────────────────────────────────
Belt-and-suspenders container rule so every numeric descendant inside the
"Showing X–Y of N APIs" label is automatically tabular, even if a span is
added in the future without the explicit .numeric-tabular class.
Individual <span class="numeric-tabular"> wrappers remain the canonical
mechanism — this rule is a defensive fallback (GrantFox FWC26). */
.marketplace-count {
font-variant-numeric: tabular-nums;
}

/* ── Marketplace filter-active badge ────────────────────────────────────────
The numeric count of active filters shown on the mobile "Filters" button
must also use tabular numerals so single-digit and double-digit counts
don't shift the badge width unexpectedly. */
.marketplace-filter-badge {
.numeric-tabular {
font-variant-numeric: tabular-nums;
}
Loading