Skip to content

Commit 2533e3f

Browse files
committed
Fixes chopping (Settings Covering Screen)
Bug fix where the settings icon was covering the entire game-container, caused by two different elements having the 'grid' class name, changed to game-grid instead.
1 parent 3185145 commit 2533e3f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/puzzles/chopping/Chopping.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ const Chopping: FC = () => {
153153
<NPSettingsRange
154154
title={"Number of letters"}
155155
min={13}
156-
max={30}
156+
max={18}
157157
value={settingsNumLetters}
158158
setValue={setSettingsNumLetters}
159159
/>
@@ -182,10 +182,10 @@ const Chopping: FC = () => {
182182
statusMessage={getStatusMessage(gameStatus)}
183183
settings={settings}
184184
>
185-
<div className='grid'>
185+
<div className='game-grid'>
186186
{/* Dynamically create grid rows based on numLetters and defaultGridCols */}
187187
{Array.from({ length: Math.ceil(numLetters / defaultGridCols) }).map((_, rowIndex) => (
188-
<div key={rowIndex} className='grid-row' style={{ gridTemplateColumns: `repeat(${Math.min(numLetters - rowIndex * defaultGridCols, defaultGridCols)}, min-content)` }}>
188+
<div key={rowIndex} className='game-grid-row' style={{ gridTemplateColumns: `repeat(${Math.min(numLetters - rowIndex * defaultGridCols, defaultGridCols)}, min-content)` }}>
189189

190190
{/* Create grid columns within each row */}
191191
{Array.from({ length: defaultGridCols }).map((_, colIndex) => {

public/Chopping/Chopping.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
margin-top: 10%;
99
}
1010

11-
.grid {
11+
.game-grid {
1212
display: grid;
1313
grid-template-columns: repeat(1, 1fr);
1414
grid-template-rows: repeat(var(--grid-rows), 1fr);
1515
gap: 0.5rem;
1616
z-index: 1;
1717
}
1818

19-
.grid-row {
19+
.game-grid-row {
2020
display: grid;
2121
justify-content: center;
2222
grid-template-columns: repeat(var(--grid-columns), 1fr);

0 commit comments

Comments
 (0)