Commit 1b09a424 authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: chess board ACTUALLY visible now

Two problems:
1. --board-light and --board-dark CSS vars were in deleted app.css
   → Added all chess board CSS vars to el3ab.css :root

2. .board-wrapper layout broken in our flex context
   → Added explicit override: aspect-ratio:1, position:relative
   → Kill the ::before padding hack (use aspect-ratio)
   → Force .board to position:absolute;inset:0;width:100%;height:100%
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 677320c2
......@@ -45,6 +45,28 @@
--font: 'IBM Plex Sans Arabic', system-ui, sans-serif;
--ease: cubic-bezier(0.2, 0, 0, 1);
--ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
/* Chess board colors (needed by chessboard.css) */
--board-light: #EBECD0;
--board-dark: #779556;
--board-selected: rgba(255, 255, 50, 0.5);
--board-legal: rgba(0, 0, 0, 0.15);
--board-last-move: rgba(255, 255, 50, 0.4);
--board-check: rgba(255, 0, 0, 0.6);
--board-premove: rgba(21, 180, 240, 0.3);
--board-highlight-green: rgba(21, 180, 90, 0.4);
--board-highlight-red: rgba(220, 50, 50, 0.4);
--board-highlight-yellow: rgba(220, 180, 30, 0.4);
/* Other vars chessboard.css references */
--bg-3: #182B42;
--text-inverse: #0F172A;
--border: rgba(255, 255, 255, 0.08);
--radius-md: 12px;
--radius-sm: 8px;
--font-en: 'Inter', system-ui, sans-serif;
--error: #EF4444;
--eval-label-light: #fff;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
......@@ -288,7 +310,24 @@ img { display: block; max-width: 100%; }
}
/* === RESPONSIVE GAME BOARD === */
/* board-wrapper is styled in chessboard.css — we just constrain its width inline */
/* Override chessboard.css board-wrapper to work in our layout */
.chess-game-wrap .board-wrapper {
position: relative;
width: min(calc(100vw - 24px), 400px) !important;
aspect-ratio: 1;
margin: 0 auto;
flex: none !important;
}
.chess-game-wrap .board-wrapper::before {
display: none !important; /* Kill the padding-top hack, use aspect-ratio instead */
}
.chess-game-wrap .board-wrapper > .board,
.chess-game-wrap .board-wrapper > #board {
position: absolute !important;
inset: 0 !important;
width: 100% !important;
height: 100% !important;
}
/* === MATCHMAKING RADAR === */
.matchmaking-radar {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment