-
Notifications
You must be signed in to change notification settings - Fork 0
/
board.css
100 lines (83 loc) · 1.87 KB
/
board.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
:root {
--board-bg-color: rgb(255, 233, 200);
--next-piece: url(cross.svg);
}
.cell {
width: 4vw;
aspect-ratio: 1;
cursor: pointer;
background-color: var(--board-bg-color);
background-size: cover;
}
.cell:hover {
background-color: #ebcaff;
background-image: var(--next-piece);
}
.small-board[data-placeable="true"] {
background-color: #a8fac7;
}
.small-board {
background-color: var(--board-bg-color);
padding: 0.5vw;
aspect-ratio: 1;
position: relative;
}
.small-board-grid {
width: min-content;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, 1fr);
column-gap: 0.25vw;
row-gap: 0.25vw;
background-color: black;
}
.big-board {
padding: 0.5vw;
aspect-ratio: 1;
width: min-content;
background-color: var(--board-bg-color);
border-radius: 1vw;
}
.big-board-grid {
display: grid;
width: min-content;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, 1fr);
column-gap: 0.5vw;
row-gap: 0.5vw;
background-color: black;
}
.winner-overlay {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
pointer-events: none;
background-size: cover;
}
.cell[data-content="o"] {
background-image: url(nought.svg);
pointer-events: none;
}
.cell[data-content="x"] {
background-image: url(cross.svg);
pointer-events: none;
}
.small-board:not([data-content=""]) .small-board-grid {
filter: blur(3px);
opacity: 0.8;
pointer-events: none;
}
.small-board[data-content="x"] .winner-overlay {
background-image: url(cross.svg);
}
.small-board[data-content="o"] .winner-overlay {
background-image: url(nought.svg);
}
.small-board:not([data-content=""]) .cell {
pointer-events: none;
}
.small-board[data-placeable="false"] .cell {
pointer-events: none;
}