fix: fit landing card previews to a real stage instead of a flat scale#97
Merged
Conversation
Landing cards flat-scaled every preview by 0.8, so anything with a bigger natural footprint (or a w-full layout with no definite width to resolve against) got clipped or collapsed into a narrow column. PreviewFit now renders each preview at a fixed 460px stage, measures its natural height, and scales the whole stage to fit the card (still capped at 0.8 for normal-size previews). Also: autoplay the shader-background preview instead of sitting frozen on one variant, and stop stretching short testimonial cards to match a taller neighbor's height.
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.
What
Landing cards flat-scaled every preview by 0.8, so anything with a bigger natural footprint (or a
w-fulllayout with no definite width to resolve against) got clipped or collapsed into a narrow "mobile" column.PreviewFit: renders each preview at a fixed 460px stage (sow-full/flex-wraplayouts resolve exactly like they do on the component's own detail page), measures its natural height, and scales the whole stage to fit the card — still capped at the original 0.8 (0.84 on hover) for normal-size previews.getBoundingClientRect()on the same element the scale transform was applied to, which reflects the post-transform box and compounded into the wrong scale every render.h-fullin a marquee row).Test plan
bun run checkclean (typecheck, lint, registry — 42 components)