Skip to content

Keep ProfilePill immune to inherited text casing and tracking - #19

Merged
kualta merged 1 commit into
mainfrom
pill-inherit
Aug 7, 2026
Merged

Keep ProfilePill immune to inherited text casing and tracking#19
kualta merged 1 commit into
mainfrom
pill-inherit

Conversation

@kualta

@kualta kualta commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #18. App headers commonly set uppercase tracking-widest on the nav that wraps the account control — site's header does exactly this — and both properties inherit, so the pill would render UPPERCASE and letter-spaced in some apps and not others. That defeats the point of having one shared pill.

ProfilePill now restates the base layer's own defaults (normal-case tracking-tight) instead of accepting whatever it inherits, so it looks identical wherever it is mounted.

Note the baselines move by a hair: letter-spacing declared in em resolves against the element's own font size, while an inherited value arrives already computed at the ancestor's. Restating tracking-tight on the pill is the typographically correct one of the two.

Testing

  • bun run lint and bun run typecheck clean (same pre-existing warnings as Add ProfilePill component #18).
  • Baselines re-rendered through the pinned container; only the two #components snapshots changed.
  • Driven in Chrome against bun run dev: with text-transform: uppercase and letter-spacing: 0.1em applied to the pill's ancestor, the pill stays none / normal and its username keeps the exact same rendered width (45.13px before and after), while a plain sibling span in the same parent inherits both (uppercase, 1.6px) — confirming the parent really was leaking and the pill now resists it.

@kualta
kualta merged commit 437f150 into main Aug 7, 2026
3 checks passed
@kualta
kualta deleted the pill-inherit branch August 7, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant