Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/frontend/Sudoku.React/src/components/CellInput.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,22 @@
}

.cell {
background-color: #FAEBD7;
position: relative;
}
Comment on lines 5 to 8
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#FAEBD7 is now duplicated as the background for both .cell and .cell input, .cell label. To reduce the risk of these drifting out of sync, consider defining a single source (e.g., a CSS variable on .cell and using background-color: inherit for the input/label default state).

Copilot uses AI. Check for mistakes.

.highlight {
background-color: #d8eef8 !important;
}

.selected {
background-color: #b8d8f0 !important;
}

.invalid {
background-color: #ffdddd !important;
}
Comment on lines +10 to +20
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new .highlight, .selected, and .invalid rules set background-color with !important, but they already come after .cell in the same CSS module and should win via normal cascade. Dropping !important here will make future overrides easier (and avoids needing even higher-specificity rules later).

Copilot uses AI. Check for mistakes.

.cell input,
.cell label {
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/Sudoku.React/src/components/CellInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default function CellInput({
value={cell.hasValue && cell.value !== null ? cell.value.toString() : ''}
onClick={handleClick}
onChange={() => {}}
style={cell.possibleValues.length > 0 && !cell.hasValue ? { opacity: 0 } : undefined}
style={cell.possibleValues.length > 0 && !cell.hasValue ? { backgroundColor: 'transparent' } : undefined}
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline backgroundColor: 'transparent' here will be overridden in the common “editing” case because the cell is usually also .selected (and .selected input sets background-color: ... !important in the CSS module). If the goal is to keep the input transparent while pencil values are shown/edited, consider toggling a dedicated CSS class (e.g., pencilActive) and applying background-color: transparent !important for pencilActive input, or remove the !important background rules and rely on the <td> background instead.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change introduces new UI behavior (special background handling when pencil values are present) but there’s no test coverage guarding against regression. Consider adding a CellInput test that renders a cell with possibleValues and asserts the input has the expected style/class in that state (and potentially when isSelected is true).

Copilot uses AI. Check for mistakes.
/>
</td>
);
Expand Down
Loading