Skip to content

Commit

Permalink
Merge pull request #304 from BSmick6/coord-color-css
Browse files Browse the repository at this point in the history
Improve CSS for coordinate text placement and color
  • Loading branch information
ornicar authored Nov 26, 2024
2 parents 159be6f + d8dc789 commit 4f82d64
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions assets/chessground.brown.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,20 @@ cg-board square.current-premove {
}

/** Alternating colors in rank/file/square labels */
.cg-wrap coords:nth-child(odd) coord:nth-child(even),
.cg-wrap coords.squares:nth-child(even) coord:nth-child(odd),
.cg-wrap.orientation-black coords.files:nth-child(even) coord:nth-child(odd),
.cg-wrap coords.files:nth-child(even) coord:nth-child(even) {
.orientation-white .ranks :nth-child(odd),
.orientation-white .files :nth-child(even),
.orientation-black .ranks :nth-child(even),
.orientation-black .files :nth-child(odd),
coords.squares:nth-of-type(odd) :nth-child(even),
coords.squares:nth-of-type(even) :nth-child(odd) {
color: rgba(72, 72, 72, 0.8);
}

.cg-wrap coords:nth-child(odd) coord:nth-child(odd),
.cg-wrap coords.squares:nth-child(even) coord:nth-child(even),
.cg-wrap.orientation-black coords.files:nth-child(even) coord:nth-child(even),
.cg-wrap coords.files:nth-child(even) coord:nth-child(odd) {
.orientation-white .ranks :nth-child(even),
.orientation-white .files :nth-child(odd),
.orientation-black .ranks :nth-child(odd),
.orientation-black .files :nth-child(even),
coords.squares:nth-of-type(odd) :nth-child(odd),
coords.squares:nth-of-type(even) :nth-child(even) {
color: rgba(255, 255, 255, 0.8);
}

0 comments on commit 4f82d64

Please sign in to comment.