Skip to content

fix(core): logo, spinner and avatar sizing in Safari 27 - #115

Merged
monospaced merged 1 commit into
mainfrom
fix/safari-27-aspect-ratio-boxes
Oct 22, 2026
Merged

monospaced merged 1 commit into
mainfrom
fix/safari-27-aspect-ratio-boxes

Conversation

@monospaced

Copy link
Copy Markdown
Owner

Summary

Follow-up to #113. A consuming site hit the same Safari 27 intrinsic-sizing change on the animated primary logo: the SVG is emitted with a viewBox only and sized 100% in both axes inside a box whose inline size comes from aspect-ratio. Safari 27 feeds the SVG's 300px fallback width into the box's intrinsic size, so the logo's flex item claimed about 130px more than it painted and the header wrapped early.

A sweep of every aspect-ratio box in set-core found three with in-flow content that can feed intrinsic sizing:

  • Logo: contain: inline-size. The ratio tokens are slash forms (6714.6 / 1200), so an explicit width cannot be derived with calc(). Containment keeps the width on the ratio transfer in every browser. Baseline widely available, matching the browserslist.
  • Spinner: contain: inline-size layout paint. Its SVG also has a viewBox only.
  • Avatar: explicit inline-size: var(--set-avatar-size) and aspect-ratio removed. The image inside is sized by percentage.

Checked and left alone: Icon (the SVG itself is replaced, and its viewBox matches the ratio), Radio and Checkbox (no children), Image cover mode (inline axis is explicit and the box is a scroll container), Prose colour chip (empty).

Test plan

  • set-core tests, stylelint and prettier pass
  • Safari 27: animated primary and graphic logo in a flex header, all sizes
  • Safari 27: standalone spinner at every size, and the busy button
  • Safari 27: avatar with image, initials and entity icon at every size
  • Chrome and Firefox render identically to before

🤖 Generated with Claude Code

Each derived its inline size from aspect-ratio while holding content sized by percentage or an SVG with a viewBox only. Safari 27 feeds that content back into the box's intrinsic size, so the animated logo claimed its SVG's 300px fallback width in flex layouts.

Logo and Spinner gain inline-size containment, keeping the width on the ratio transfer in every browser; the ratio tokens are slash forms so no explicit width can be derived. Avatar sets both axes from its size variable directly.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for setds ready!

Name Link
🔨 Latest commit 563c929
🔍 Latest deploy log https://app.netlify.com/projects/setds/deploys/6ada208310eb37b1077de420
😎 Deploy Preview https://deploy-preview-115--setds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@monospaced
monospaced merged commit 58ed4db into main Oct 22, 2026
16 checks passed
@monospaced
monospaced deleted the fix/safari-27-aspect-ratio-boxes branch October 22, 2026 14:52
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