fix(docs): prevent squished puzzle canvases on narrow viewports - #8
Merged
Conversation
Closed
…nvases Agent-Logs-Url: https://github.com/ShadowNineX/headbreaker/sessions/c6691f3e-db39-4a29-8d12-5b390ba52ed2 Co-authored-by: ShadowNineX <223153516+ShadowNineX@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ShadowNineX/headbreaker/sessions/c6691f3e-db39-4a29-8d12-5b390ba52ed2 Co-authored-by: ShadowNineX <223153516+ShadowNineX@users.noreply.github.com>
|
Copilot
AI
changed the title
[WIP] Fix squished tiles on docs page
fix(docs): prevent squished puzzle canvases on narrow viewports
Apr 29, 2026
ShadowNineX
marked this pull request as ready for review
April 29, 2026 17:55
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.



Puzzle demos on the docs site rendered squished (compressed horizontally) on narrow viewports such as phones.
Root cause
docs/src/styles/demos.csssetmax-width: 100%on.demo-canvas .konvajs-content. When the viewport was narrower than a canvas's intrinsic width (e.g. 800px), the browser shrank the wrapper's CSS width while Konva's inlineheightstyle stayed fixed. Since Konva's layered<canvas>elements are absolutely positioned inside that wrapper, only one axis was scaled — distorting the aspect ratio.This is a docs-only issue; the library itself is unaffected.
Changes
docs/src/styles/demos.css— drop themax-width: 100%rule on.konvajs-content. The pre-existing.demo-canvas { overflow-x: auto }already provides a horizontal scrollbar on narrow viewports without distorting aspect ratio.Notes for reviewers
responsive.resize(container.offsetWidth, …)onresize/DOMContentLoaded, and.demo-canvas(the container it measures) still hasmax-width: 100%, sooffsetWidthcontinues to clamp to viewport width./samples/basic/and friends before merging.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
iojs.org/usr/bin/curl curl -q --fail --compressed -L -s REDACTED -o -(dns block)telemetry.astro.build/home/REDACTED/.nvm/versions/node/v22.22.2/bin/node node /home/REDACTED/work/headbreaker/headbreaker/docs/node_modules/.bin/astro dev(dns block)If you need me to access, download, or install something from one of these locations, you can either: