mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 03:32:06 +00:00
55 lines
3.5 KiB
CSS
55 lines
3.5 KiB
CSS
/* Hero Chessboard */
|
|
.board-shell { position: relative; z-index: 2; width: min(458px, 85vw); padding: 18px; border-radius: 12px; background: var(--color-canvas-raised); box-shadow: 0 26px 65px rgba(23, 53, 45, .25); transform: rotate(1.5deg); }
|
|
.board-topline, .board-caption { display: flex; align-items: center; justify-content: space-between; }
|
|
.board-topline { padding: 1px 1px 13px; }
|
|
.board-stage { position: relative; min-height: 580px; display: grid; place-items: center; }
|
|
.chessboard { aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr); overflow: hidden; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
|
|
.player { display: flex; align-items: center; gap: 9px; }
|
|
.player-piece { display: grid; place-items: center; width: 31px; height: 31px; background: var(--color-deep); border-radius: 50%; color: var(--color-on-deep); font-size: 20px; }
|
|
.player span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
|
|
.player small { color: var(--color-muted); font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
|
|
.player strong { font-size: 12px; }
|
|
.square { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 0; }
|
|
.square.light { background: var(--color-board-light); }
|
|
.square.dark { background: var(--color-board-dark); }
|
|
.piece { position: relative; z-index: 2; font-family: Georgia, serif; font-size: clamp(25px, 4vw, 42px); line-height: 1; transform: translateY(-1px); }
|
|
.white-piece { color: var(--color-piece-light); text-shadow: 0 2px 0 var(--color-piece-outline), 1px 0 0 var(--color-piece-outline), -1px 0 0 var(--color-piece-outline), 0 -1px 0 var(--color-piece-outline); }
|
|
.black-piece { color: var(--color-piece-outline); text-shadow: 0 1px 0 rgba(255,255,255,.25); }
|
|
.rank, .file { position: absolute; z-index: 3; color: rgba(23,53,45,.65); font-size: 7px; font-weight: 700; }
|
|
.rank { top: 3px; left: 4px; }
|
|
.file { right: 4px; bottom: 2px; }
|
|
.dark .rank, .dark .file { color: rgba(255,255,255,.65); }
|
|
.board-caption { padding: 14px 2px 0; }
|
|
.board-caption div { display: flex; flex-direction: column; }
|
|
.board-caption span { color: var(--color-muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
|
|
.board-caption strong { font-size: 13px; }
|
|
.board-caption button { color: var(--color-coral-text); font-size: 11px; font-weight: 700; }
|
|
.board-themes { color: var(--color-coral-text); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
|
|
|
|
@media (max-width: 900px) {
|
|
.board-stage { min-height: 620px; }
|
|
}
|
|
|
|
@media (max-width: 650px) {
|
|
.board-stage { min-height: 500px; }
|
|
.board-shell { width: min(390px, 92vw); padding: 12px; }
|
|
.piece { font-size: clamp(24px, 9vw, 38px); }
|
|
}
|
|
|
|
/* Admin Chessboard */
|
|
.bg-boardwhite { background-color: #f2f5f3; /* light square */ }
|
|
.bg-boardblack { background-color: #71828f; /* dark square */ }
|
|
|
|
/* Play board */
|
|
#endgame-board { position: relative; }
|
|
|
|
/* Chessground's stock stylesheet shifts the file labels 24px right of the
|
|
board, assuming a gutter we don't have, so they land on square boundaries
|
|
instead of under each file. Place the row on the board and right-justify
|
|
each label within its square; the row's width already matches the board
|
|
because the container is sized to whole squares. */
|
|
#endgame-board coords.files { left: 0; text-align: right; }
|
|
|
|
/* Chessground's wrapper has no intrinsic height; let it fill the sized
|
|
aspect-ratio container so the board scales with the viewport. */
|
|
#endgame-board .cg-wrap { width: 100%; height: 100%; } |