Repository navigation
fix(core): logo, spinner and avatar sizing in Safari 27 - #115
Merged
Merged
Conversation
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>
✅ Deploy Preview for setds ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-ratiobox in set-core found three with in-flow content that can feed intrinsic sizing:contain: inline-size. The ratio tokens are slash forms (6714.6 / 1200), so an explicit width cannot be derived withcalc(). Containment keeps the width on the ratio transfer in every browser. Baseline widely available, matching the browserslist.contain: inline-size layout paint. Its SVG also has a viewBox only.inline-size: var(--set-avatar-size)andaspect-ratioremoved. 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
🤖 Generated with Claude Code