fix: resolve promotion dialog bugs and column resizing issues
Some checks failed
Some checks failed
This commit addresses Issue #7 and fixes the column resizing bug: 1. Issue #7 Fix (already implemented): - Added status-message element to index.html - Added CSS styling for status messages - Messages now display visually to users 2. Column Resizing Bug Fix: - Changed grid-template-columns from flexible minmax() to fixed widths - Changed from: minmax(200px, 250px) minmax(600px, 3fr) minmax(200px, 250px) - Changed to: 250px 600px 250px - Fixed sidebar widths to 250px (removed width: 100%, max-width) - Fixed board section width to 600px (removed min-width, width: 100%) - Fixed move-history width to 218px (accounting for padding) - Added justify-content: center to game-container Root cause: The minmax() function with fractional units (3fr) was causing the browser to recalculate column widths when sidebar content changed (captured pieces being added). Fixed widths prevent this reflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e88e67de4b
commit
df3735a8ec
19
css/main.css
19
css/main.css
@ -92,27 +92,26 @@ body {
|
|||||||
.game-container {
|
.game-container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(200px, 250px) minmax(600px, 3fr) minmax(200px, 250px);
|
grid-template-columns: 250px 600px 250px;
|
||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
max-width: 1600px;
|
max-width: 1600px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.board-section {
|
.board-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-width: 600px;
|
width: 600px;
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-sidebar {
|
.game-sidebar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
width: 100%;
|
width: 250px;
|
||||||
max-width: 250px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.captured-pieces {
|
.captured-pieces {
|
||||||
@ -120,8 +119,7 @@ body {
|
|||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
width: 100%;
|
width: 250px;
|
||||||
max-width: 250px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.captured-pieces h3 {
|
.captured-pieces h3 {
|
||||||
@ -136,7 +134,7 @@ body {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
min-height: 60px;
|
min-height: 60px;
|
||||||
max-width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,8 +144,7 @@ body {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 250px;
|
||||||
max-width: 250px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.move-history {
|
.move-history {
|
||||||
@ -156,7 +153,7 @@ body {
|
|||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
font-family: 'Courier New', monospace;
|
font-family: 'Courier New', monospace;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
width: 100%;
|
width: 218px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-controls {
|
.game-controls {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user