fix(image): stop forcing object-fit on fill images - #3237
JamesbbBriz wants to merge 4 commits into
Conversation
Next.js builds its fill imgStyle from the legacy objectFit prop (usually undefined) and never sets an inline object-fit, leaving the value to the caller's style or stylesheet. vinext hardcoded objectFit: "cover", so fill images that need contain (logos, diagrams) rendered cropped from both top and bottom even though the docs pattern of passing objectFit through style is the supported escape hatch. Drop the hardcoded value so fill parity holds: the legacy objectFit prop still flows through style, explicit styles still win, and blur placeholder backgrounds keep their own cover sizing independent of this path.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
@vinext/cloudflare
create-vinext-app
@vinext/types
vinext
@cloudflare/workers-response-store
commit: |
Performance benchmarksCompared 1 improved · 0 regressed · 5 within ±1.5%
View detailed results and traces 🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head |
|
/bigbonk review for issues Time limit: 8 minutes. Complete the review and post all findings within that limit. |
|
@james-elicx Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
|
/bigbonk review for issues Time limit: 8 minutes. Complete the review and post all findings within that limit. |
|
LGTM! |
Next.js builds its fill
imgStylefrom the legacyobjectFitprop (usually undefined) and never sets an inlineobject-fit, leaving the value to the caller's style or stylesheet (get-img-props.jsassignsstylelast). vinext hardcodedobjectFit: "cover", so fill images that needcontain(logos, diagrams) rendered cropped even though passingobjectFitthroughstyleis the documented pattern.Drops the hardcoded value so fill parity holds: the legacy
objectFitprop still flows through style, explicit styles still win, and blur placeholder backgrounds keep their owncoversizing independent of this path.Fixes #3238