-
Notifications
You must be signed in to change notification settings - Fork 3
/
base.css
88 lines (87 loc) · 1.81 KB
/
base.css
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* Chessground base css properties, for clarity.
*
* You can then include either desktop.css or mobile.css.
*
* And you need to include the css files in themes folder in order to have the
* board and pieces displayed!
*/
.cg-board-wrap {
width: 100%;
height: 100%;
}
.cg-board {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
line-height: 0;
background-size: cover;
position: relative;
width: 100%;
height: 100%;
}
square {
position: absolute;
width: 12.5%;
height: 12.5%;
}
square[data-coord-x]::after {
position: absolute;
left: 1px;
bottom: 1px;
font-size: 10px;
line-height: 10px;
content: attr(data-coord-x);
color: #fff;
opacity: 0.5;
}
square[data-coord-y]::before {
position: absolute;
right: 1px;
top: 1px;
font-size: 10px;
line-height: 10px;
content: attr(data-coord-y);
color: #fff;
opacity: 0.5;
}
square.move-dest {
background: radial-gradient(rgba(20, 85, 30, 0.5) 22%, #208530 0, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 0);
}
square.premove-dest {
background: radial-gradient(rgba(20, 30, 85, 0.5) 22%, #203085 0, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 0);
}
square.last-move {
background-color: rgba(155, 199, 0, 0.41);
}
square.selected {
background-color: rgba(20, 85, 30, 0.5);
}
square.check {
background: radial-gradient(ellipse at center, rgba(255, 0, 0, 1) 0%, rgba(231, 0, 0, 1) 25%, rgba(169, 0, 0, 0) 89%, rgba(158, 0, 0, 0) 100%);
}
square.current-premove {
background-color: rgba(20, 30, 85, 0.5);
}
piece {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover;
z-index: 2;
will-change: transform;
}
piece.dragging {
z-index: 9;
}
piece.ghost {
opacity: 0.3;
}
.minimal-dom piece {
position: absolute;
width: 12.5%;
height: 12.5%;
}