Conversation
…ackground-size auto image-set() density descriptors were normalised to a fixed 1024px reference, so a background drawn at background-size: auto (or unset) rendered about 1024px wide whatever its real size. Under auto, descriptors are now relative to the asset's recorded width. Cover, contain and sized backgrounds keep the 1024px reference unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
A media-library image used as a background with
background-size: auto(or no size set) publishes at about 1024px wide, whatever its real size. A 400px decorative shape covers most of its section.The
image-set()descriptors are relative to a fixed 1024px reference, so the 400px variant gets0.39x. Underautothe browser draws it at 400 / 0.39 ≈ 1024 CSS px.background-sizelayer isauto(or the property is unset), descriptors are now relative to the asset's recorded width, so the drawn size matches the original.Verification
bun run buildbun run lintbun test- 7063 pass, 0 failThe new
auto/ unset tests insrc/__tests__/publisher/classStyleInjector.test.tsfail onmainand pass with this change. The new cover/contain/sized tests pass on both. The existing descriptor tests keep their expected values and now setbackground-size: cover.Checklist
docs/features/publisher.md.🤖 Generated with Claude Code