Fix locked dice jumping to fill new grid slot - #84
Open
radiantnode wants to merge 1 commit into
Open
Conversation
.zone-matched used justify-content: flex-end in a flexbox fixed to exactly 2 columns wide. A lone die in a row was packed into the right/2nd slot; when a second die locked into that row, both got re-packed together, shoving the first die from the right slot to the left slot. Left-aligning fills rows left-to-right instead, so an already-locked die keeps its slot when a new one locks in beside it.
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
.zone-matchedinstatic/css/game.css) usedjustify-content: flex-endin a flexbox fixed to exactly 2 columns' width. When a row held a single locked die, it was packed into the right (2nd) column slot; when a second die locked into that row, both got re-packed to the end, causing the already-locked die to visibly jump from the right slot to the left slot.justify-content: flex-end→flex-startso dice fill left-to-right and a lone die in a row stays in the first slot permanently — a newly locked die just fills the next empty slot instead of displacing existing ones.Test plan
game-harnessprimitives: rolled dice across two rounds, capturing.zone-matchedchildgetBoundingClientRect()at 1/2/3/4 locked dice.x=259, y=252) at every subsequent count — no jump — with new dice correctly filling the next slot left-to-right, top-to-bottom.🤖 Generated with Claude Code
https://claude.ai/code/session_01QGfpfoZgKmJTiwUzPxo7mt
Generated by Claude Code