Skip to content

Commit

Permalink
more selector removing and nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
BSmick6 committed May 9, 2024
1 parent 6a73faf commit 7ae257f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 43 deletions.
62 changes: 31 additions & 31 deletions assets/chessground.base.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,52 +173,52 @@ piece.fading {
transform: translateY(39%);
}

.cg-wrap coords.squares {
coords.squares {
bottom: 0;
left: 0;
text-transform: uppercase;
text-align: right;
flex-flow: column-reverse;
height: 100%;
width: 12.5%;
}

.cg-wrap coords.squares.black {
flex-flow: column;
}
&.black {
flex-flow: column;
}

.cg-wrap coords.squares.left {
text-align: left;
}
&.left {
text-align: left;
}

.cg-wrap coords.squares coord {
padding: 6% 4%;
}
coord {
padding: 6% 4%;
}

.cg-wrap coords.squares.rank2 {
transform: translateX(100%);
}
&.rank2 {
transform: translateX(100%);
}

.cg-wrap coords.squares.rank3 {
transform: translateX(200%);
}
&.rank3 {
transform: translateX(200%);
}

.cg-wrap coords.squares.rank4 {
transform: translateX(300%);
}
&.rank4 {
transform: translateX(300%);
}

.cg-wrap coords.squares.rank5 {
transform: translateX(400%);
}
&.rank5 {
transform: translateX(400%);
}

.cg-wrap coords.squares.rank6 {
transform: translateX(500%);
}
&.rank6 {
transform: translateX(500%);
}

.cg-wrap coords.squares.rank7 {
transform: translateX(600%);
}
&.rank7 {
transform: translateX(600%);
}

.cg-wrap coords.squares.rank8 {
transform: translateX(700%);
&.rank8 {
transform: translateX(700%);
}
}
24 changes: 12 additions & 12 deletions assets/chessground.brown.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ cg-board square.current-premove {
}

/** Alternating colors in rank/file/square labels */
.cg-wrap.orientation-white coords.ranks coord:nth-child(odd),
.cg-wrap.orientation-white coords.files coord:nth-child(even),
.cg-wrap.orientation-black coords.ranks coord:nth-child(even),
.cg-wrap.orientation-black coords.files coord:nth-child(odd),
.cg-wrap coords.squares:nth-of-type(odd) coord:nth-child(even),
.cg-wrap coords.squares:nth-of-type(even) coord:nth-child(odd) {
.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.orientation-white coords.ranks coord:nth-child(even),
.cg-wrap.orientation-white coords.files coord:nth-child(odd),
.cg-wrap.orientation-black coords.ranks coord:nth-child(odd),
.cg-wrap.orientation-black coords.files coord:nth-child(even),
.cg-wrap coords.squares:nth-of-type(odd) coord:nth-child(odd),
.cg-wrap coords.squares:nth-of-type(even) coord:nth-child(even) {
.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 7ae257f

Please sign in to comment.