Skip to content

fix(wasm): frontend page overflows 40px and the title never scales (mirror of zackees/fastled-wasm#268) #4420

Closed

Description

@zackees

Context

Companion to FastLED/cli#268, which carries the full diagnosis, measurements and screenshots.

src/platforms/wasm/compiler/index.css has two rules that are byte-identical to the fastled-wasm frontend's, and they cause the same layout bug:

  1. The page is always 40 px wider than the window. #main-container is box-sizing: content-box with width: 100% plus padding: 20px, so every viewport narrower than about 1440 CSS px overflows horizontally and #ui-controls is pushed off the right edge.
  2. The title never scales. h1 { font-size: 6em; margin-top: 10vh } is a fixed 96 px at every viewport, and no media query touches it.

The FastLED copy is still live: ci/wasm_build.py bootstraps from src/platforms/wasm/compiler/index.ts. Users running the fastled CLI get fastled-wasm's copy instead, which is why the primary fix lands there.

Proposal

Apply the same two rules as FastLED/cli#268:

#main-container { box-sizing: border-box; }
h1 {
    font-size: clamp(2rem, 5vw, 6em);
    margin-top: clamp(12px, 4vh, 10vh);
    margin-bottom: clamp(12px, 2vh, 40px);
}

Acceptance criteria

  1. At a sub-1440 px viewport, document.documentElement.scrollWidth <= innerWidth and #ui-controls lies inside the viewport. Show it failing before the change (40 px overflow) and passing after.
  2. The rules match fastled-wasm's after fix(frontend): page overflows 40px and the title never scales, clipping the controls in the viewer cli#268 lands, so the two copies do not drift further (they already differ by 17 lines).
  3. No change to the mobile, tablet or desktop layouts beyond these two rules.

Decisions

  • Mirror, don't diverge. Same rules, same values, to keep the two frontends aligned.
  • Priority follows the primary issue (P2).

Activity

  1. added a commit that references this issue on Sep 18, 2026
    e2d34dc
  2. moved this from Triage to Done in FastLED Trackeron Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions