-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathchessground.css
193 lines (162 loc) · 3.34 KB
/
chessground.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
/*
* Chessground base css properties.
*
* You need to include the css files in themes folder in order to have the
* board and pieces displayed!
*/
.cg-wrap {
width: 320px;
height: 320px;
position: relative;
display: block;
}
cg-helper {
position: absolute;
width: 12.5%;
padding-bottom: 12.5%;
display: table;
/* hack: round to full pixel size in chrome */
bottom: 0;
}
cg-container {
position: absolute;
width: 800%;
height: 800%;
display: block;
bottom: 0;
}
cg-board {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
line-height: 0;
background-size: cover;
cursor: pointer;
}
cg-board square {
position: absolute;
top: 0;
left: 0;
width: 12.5%;
height: 12.5%;
pointer-events: none;
}
cg-board 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);
pointer-events: auto;
}
cg-board 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);
}
cg-board square.oc.move-dest {
background: radial-gradient(transparent 0%, transparent 80%, rgba(20, 85, 0, 0.3) 80%);
}
cg-board square.oc.premove-dest {
background: radial-gradient(transparent 0%, transparent 80%, rgba(20, 30, 85, 0.2) 80%);
}
cg-board square.move-dest:hover {
background: rgba(20, 85, 30, 0.3);
}
cg-board square.premove-dest:hover {
background: rgba(20, 30, 85, 0.2);
}
cg-board square.last-move {
will-change: transform;
background-color: rgba(155, 199, 0, 0.41);
}
cg-board square.selected {
background-color: rgba(20, 85, 30, 0.5);
}
cg-board 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%);
}
cg-board square.current-premove {
background-color: rgba(20, 30, 85, 0.5);
}
.cg-wrap piece {
position: absolute;
top: 0;
left: 0;
width: 12.5%;
height: 12.5%;
background-size: cover;
z-index: 2;
will-change: transform;
pointer-events: none;
}
cg-board piece.dragging {
cursor: move;
z-index: 10;
}
cg-board piece.anim {
z-index: 8;
}
cg-board piece.fading {
z-index: 1;
opacity: 0.5;
}
.cg-wrap square.move-dest:hover {
background-color: rgba(20, 85, 30, 0.3);
}
.cg-wrap piece.ghost {
opacity: 0.3;
}
.cg-wrap .cg-shapes,
.cg-wrap .cg-custom-svgs {
overflow: hidden;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
pointer-events: none;
}
.cg-wrap .cg-shapes {
opacity: 0.6;
z-index: 2;
}
.cg-wrap .cg-custom-svgs {
/* over piece.anim = 8, but under piece.dragging = 10 */
z-index: 9;
}
.cg-wrap coords {
position: absolute;
display: flex;
pointer-events: none;
opacity: 0.8;
font-size: 9px;
}
.cg-wrap coords.ranks {
right: -15px;
top: 0;
flex-flow: column-reverse;
height: 100%;
width: 12px;
}
.cg-wrap coords.ranks.black {
flex-flow: column;
}
.cg-wrap coords.files {
bottom: -16px;
left: 0;
flex-flow: row;
width: 100%;
height: 16px;
text-transform: uppercase;
text-align: center;
}
.cg-wrap coords.files.black {
flex-flow: row-reverse;
}
.cg-wrap coords coord {
flex: 1 1 auto;
}
.cg-wrap coords.ranks coord {
transform: translateY(39%);
}