From 666ce6487055ab11e957666baca658df5fcca31b Mon Sep 17 00:00:00 2001 From: Ido-Barnea Date: Wed, 18 Oct 2023 08:58:01 +0300 Subject: [PATCH] [#58] Fixed pieces taking more space than they should --- development/src/board.ts | 1 - development/styles/styles.css | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/development/src/board.ts b/development/src/board.ts index ecdfd97a..46c0bf7b 100644 --- a/development/src/board.ts +++ b/development/src/board.ts @@ -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; } diff --git a/development/styles/styles.css b/development/styles/styles.css index 041f5bf2..abb41977 100644 --- a/development/styles/styles.css +++ b/development/styles/styles.css @@ -87,6 +87,8 @@ path { } .piece { + height: var(--square-size); + width: var(--square-size); position: relative; z-index: 1; }