-
Notifications
You must be signed in to change notification settings - Fork 0
/
chess.css
78 lines (66 loc) · 1.35 KB
/
chess.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
@import url(http://fonts.googleapis.com/css?family=Raleway:400,300,600);
/*#7D9FBA*/
body {
font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: bolder;
font-size: 3.5em;
}
.grid {
margin-left: auto;
margin-right: auto;
max-width: 700px;
}
.grid > div {
display: flex;
width: 100%;
border-left: 1px solid #555;
border-right: 1px solid #555;
}
.grid > div:first-child {
border-top: 1px solid #555;
}
.grid > div:last-child {
border-bottom: 1px solid #555;
}
/*Cell level*/
.grid > div > div {
position: relative;
flex: 1;
background-color: #ecf0f1;
display: inline-block;
}
.grid > div > div:before {
content: "";
display: block;
padding-top: 100%; /* initial ratio of 1:1*/
}
.grid > div:nth-child(odd) > div:nth-child(even),
.grid > div:nth-child(even) > div:nth-child(odd) {
background-color: black;
}
/*Piece level*/
.grid > div > div > div {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
text-align: center;
margin: 0;
cursor: pointer;
}
.black {
color: #1abc9c;
}
.white {
color: #2980b9;
}
.highlight {
background-color: rgba(41, 128, 185, .5);
}
.attack {
background-color: rgba(192, 57, 43, .5);
}
.active {
background-color: rgba(127, 140, 141, .5);
}