-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
55 lines (45 loc) · 1.11 KB
/
Copy pathstyle.css
File metadata and controls
55 lines (45 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<style>
.chessboard {
display: grid;
grid-template-columns: repeat(8, minmax(0, 1fr));
grid-template-rows: repeat(8, minmax(0, 1fr));
width: 400px;
height: 400px;
transform: rotate(0deg);
}
.piece.white {
color: white;
filter: drop-shadow(0 0 2px rgba(0, 0, 0, 1));
}
.piece.black {
color: black;
}
.flipped {
transform: rotate(180deg);
}
.square {
display: flex;
align-items: center;
justify-content: center;
}
.square.light {
background-color: #f0d9b5;
}
.square.dark {
background-color: #b58863;
}
.piece {
font-size: 36px;
cursor: pointer;
}
.piece.draggable {
cursor: grab;
}
.dragging {
opacity: 0.5;
}
/* Rotate pieces for black player */
.flipped .piece {
transform: rotate(180deg);
}
</style>