feat: fluid viewport canvas scaling and responsive hero margins - #76
Open
google-labs-jules[bot] wants to merge 1 commit into
Conversation
…ponsive hero top margins
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
This PR implements fluid viewport scaling for horizontal canvas drawing offsets and responsive hero overlay top spacing on the landing page.
Key Changes
scaleFactor = Math.min(1, w / 1024)in+page.sveltecanvas setup andresizeObserver. Horizontal offsets for both the bar chart and network graph elements scale dynamically based on active viewport width, ensuring canvas drawings render without passing through centered header text on viewports down to 320px width while preserving baseline desktop visual positioning at widths of 1024px and above.style="margin-top: 12rem;") on the hero text container with responsive utility classes (mt-16 sm:mt-24 md:mt-36 lg:mt-48). Top margins contract automatically on shorter screen heights (down to 560px), keeping primary navigation links unobstructed and easily targetable.src/routes/page.spec.tsverifying scale factor calculations across breakpoints and checking that responsive Tailwind margin utility classes are present without inline style overrides.Verification
bun run check: 0 errors, 0 warnings.bun run test: 16 passed, 61 passed tests.bun run build: Built successfully.