php-chess/html/static/styles.css

58 lines
No EOL
966 B
CSS

* {
box-sizing: border-box;
}
.board {
width: 400px;
height: 400px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content: flex-start;
}
.square {
width: 12.5%;
height: 12.5%;
position: relative;
}
.square.black {
background-color: brown;
}
.square.white {
background-color: lightgoldenrodyellow;
}
.square.movePossible:after {
content: "";
display: block;
position: absolute;
top: 50%;
left: 50%;
background: green;
width: 25%;
height: 25%;
border-radius: 50%;
transform: translate(-50%, -50%);
}
.board.interactive:not(.moveSelection) .square.black.hasMoves, .square.black.source {
background-color: green;
}
.board.interactive:not(.moveSelection) .square.white.hasMoves, .square.white.source {
background-color: greenyellow;
}
.piece {
width: 100%;
height: 100%;
position: relative;
}
.piece img {
width: 100%;
z-index: 10;
}