-
Notifications
You must be signed in to change notification settings - Fork 0
/
elm-chess.css
executable file
·76 lines (65 loc) · 1.08 KB
/
elm-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
html, body {
margin: 0;
padding: 0;
}
.chess-board {
display: flex;
margin: auto;
width: 100vmin;
height: 100vmin;
flex-flow: column-reverse nowrap;
}
.chess-row {
display: flex;
flex: 1;
flex-flow: row nowrap;
}
.chess-square {
background-color: #C78F54;
display: flex;
flex: 1;
font-size: 10vmin;
line-height: 10vmin;
align-items: center;
justify-content: center;
}
.chess-square--odd {
background-color: #F8D0A5;
}
.chess-square--selected {
background-image: radial-gradient(
circle,
rgba(0, 100, 200, .5),
rgba(0, 100, 200, .5) 33%,
rgba(0, 100, 200, 0)
);
}
.chess-piece {
position: relative;
}
.chess-piece::before {
content: attr(data-fill);
position: absolute;
}
.chess-piece--white::before {
color: white;
}
.chess-piece--black::before {
color: black;
}
.chess-piece::after {
content: attr(data-stroke);
color: #676767;
position: relative;
}
.chess-piece-text {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
left: -200vw;
}