Skip to content

fix(domino-maker): cuttable grid, printable divider, A4 print, hub dark sync - #52

Merged
pod-III merged 1 commit into
mainfrom
devin/1781762603-domino-maker-polish
Jun 18, 2026
Merged

fix(domino-maker): cuttable grid, printable divider, A4 print, hub dark sync#52
pod-III merged 1 commit into
mainfrom
devin/1781762603-domino-maker-polish

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Polishes the Domino Card Maker tool from #51 to address three asks: make it fit the KlassKit aesthetic (incl. hub dark-mode sync), lay tiles out as a gapless cuttable grid that still reads as a domino, and fix printing (divider line, A4 default, no extra blank pages). All edits are in apps/tools/domino-maker/index.html.

1. Hub dark-mode sync. The hub stores theme via Storage.setlocalStorage[theme_hub] = JSON.stringify('dark'), i.e. the quoted string "dark". The tool compared the raw value === 'dark', which never matched. Fixed with a defensive parse:

function readStoredTheme(key) {
  const raw = localStorage.getItem(key);
  if (raw == null) return null;
  try { return JSON.parse(raw); } catch (e) { return raw; }
}

The tool's own theme_domino-maker choice still takes precedence over the hub (unchanged precedence). Also forced tile text color to #1e293b so words stay readable on the always-white tiles in dark mode (previously inherited the light body text and became near-invisible).

2. Cuttable domino grid. .page grid gap: 9mm 5mm → 0 and .domino-tile border-radius: 9px → 0, so tiles sit edge-to-edge and their borders form one continuous grid you can cut in straight lines. Each tile is still a domino: two .domino-halfs split by a centre divider. Shared tile borders (between dominoes) read as 2px+2px cut lines while the single 2px centre divider reads as the domino hinge.

3. Print fixes.

  • Divider was background-color inside overflow:hidden → didn't print without Chrome's "Background graphics". Changed to border-left: 2px solid #1e293b (borders always print) + print-color-adjust: exact.
  • @page { size: A4; margin: 0 } enforces A4 by default (verified 2 pages under both "Default" and "None" margins).
  • Extra blank page per sheet was a sub-pixel overflow from height: 297mm on a 297mm box; print .page height set to 296mm, and on-screen container/gaps zeroed in print so nothing pushes content onto an extra sheet.

Verified in-browser: gapless grid, hub→tool dark sync, readable tiles in dark mode, and print preview showing exactly 2 A4 pages with visible dividers.

Link to Devin session: https://app.devin.ai/sessions/6a816cc7fd9a480a975d22ffdde85c3a
Requested by: @pod-III

…rk sync

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
klasskit Ready Ready Preview, Comment Jun 18, 2026 6:03am

@pod-III
pod-III merged commit db18a1c into main Jun 18, 2026
2 of 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.

1 participant