Skip to content

Commit

Permalink
[#58] Fixed pieces taking more space than they should
Browse files Browse the repository at this point in the history
  • Loading branch information
Ido-Barnea committed Oct 18, 2023
1 parent 9f84333 commit 666ce64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion development/src/board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export function destroyPieceOnBoard(targetPiece: Piece) {
}

export function highlightSquare(target: HTMLElement, shouldHighlight: boolean) {
const targetParentElement = target.parentNode as HTMLElement;
while (!target.classList.contains("square")) {
target = target.parentNode as HTMLElement;
}
Expand Down
2 changes: 2 additions & 0 deletions development/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ path {
}

.piece {
height: var(--square-size);
width: var(--square-size);
position: relative;
z-index: 1;
}
Expand Down

0 comments on commit 666ce64

Please sign in to comment.