Skip to content

Mobile: full-width dot background, figure at normal height#77

Merged
itamarwe merged 3 commits into
masterfrom
claude/dot-art-mobile-fullwidth
Jun 30, 2026
Merged

Mobile: full-width dot background, figure at normal height#77
itamarwe merged 3 commits into
masterfrom
claude/dot-art-mobile-fullwidth

Conversation

@itamarwe

@itamarwe itamarwe commented Jun 30, 2026

Copy link
Copy Markdown
Owner

On phones the dot-art canvas now goes full-bleed width and sits flush under the header hairline, but the figure keeps its normal height — only the programmatic dot background extends to fill the extra width on either side of the centred portrait.

Approach

The canvas becomes a fixed-height (300px) full-width band rather than a full-width square:

  • ProfileDots maps world coords (figure-square units in [0,1]²) to pixels via pixel = (originX + x*scale, y*scale), where scale = canvas height and originX centres the figure square horizontally.
  • The background fountain is allowed to roam an extra bgMarginX past the square's left/right edges, so it fills the whole width. Its initial spread, exit/recycle bounds, silhouette occlusion (applied only over the figure square), and pointer mapping all account for the offset.
  • On desktop the canvas is square, so originX = bgMarginX = 0 and behaviour is unchanged (verified: floated 300×300 portrait, text wraps as before).

CSS: the ≤600px rule makes the canvas width: calc(100% + spacing) with negative side margins (breaks out of the wrapper padding) and a fixed height: 300px (aspect-ratio: auto), pulled up flush to the header.

Verification (Playwright)

  • Mobile @390px: canvas left 0 → right 390, height 300, top 57 == header bottom 57 (flush), scrollWidth == 390 (no horizontal scroll). Figure centred at normal size; background dots fill the side wings to both edges.
  • Desktop @1000px: canvas 300×300, floated, text wrap intact.

🤖 Generated with Claude Code

On phones the About portrait now spans the entire viewport width instead
of a centered 220px block, and sits flush against the header's bottom
hairline. The canvas breaks out of the wrapper's side padding (width
calc(100% + spacing) with negative side margins) and is pulled up through
the .page-content top padding (negative top margin); border-radius is
dropped so it's edge-to-edge. Desktop layout is unchanged (the rule is
scoped to the <=600px media query).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017TDdCdTJbUkH7ZoWDhj7AV
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
itamarwe-github-io Ready Ready Preview, Comment Jun 30, 2026 5:38am

Reworks the previous full-bleed approach. Instead of scaling the whole
portrait to the viewport width, the canvas becomes a fixed-height (300px)
full-width band: the figure is drawn into a centred square of side =
canvas height, and the programmatic dot background fills the extra width
on either side, flush under the header.

ProfileDots now maps world coords (figure-square units in [0,1]^2) to
pixels via pixel = (originX + x*scale, y*scale), scale = canvas height and
originX centring the square. The background fountain roams an extra
bgMarginX past the square's sides so it fills the full width; its initial
spread, exit/recycle bounds, silhouette occlusion (only over the square),
and pointer mapping all account for the offset. On desktop the canvas is
square, so originX = bgMarginX = 0 and behaviour is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017TDdCdTJbUkH7ZoWDhj7AV
@itamarwe itamarwe changed the title Full-bleed dot-art portrait on mobile, flush to the header Mobile: full-width dot background, figure at normal height Jun 30, 2026
Make the canvas span the full viewport width explicitly (100vw centred
with calc(50% - 50vw) side margins) instead of breaking out of the wrapper
padding with calc(100% + spacing). Same visual result, but tied to the
screen rather than the container. Verified full-bleed with no horizontal
scroll at 360/390/414px.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017TDdCdTJbUkH7ZoWDhj7AV
@itamarwe itamarwe merged commit 83961c4 into master Jun 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants