-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.css
101 lines (84 loc) · 1.77 KB
/
game.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
:root {
--bg-color: antiquewhite;
}
.cell {
width: 9vw;
aspect-ratio: 1;
cursor: pointer;
background-color: var(--bg-color);
background-size: cover;
}
.cell:hover {
background-color: rgb(255, 142, 142);
}
.small-board:hover {
background-color: rgb(133, 133, 255);
}
.small-board {
background-color: var(--bg-color);
padding: 1vw;
aspect-ratio: 11;
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.5vw;
row-gap: 0.5vw;
background-color: black;
}
.big-board {
padding: 1vw;
aspect-ratio: 1;
width: min-content;
background-color: var(--bg-color);
border-radius: 2vw;
}
.big-board-grid {
display: grid;
width: min-content;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, 1fr);
column-gap: 1vw;
row-gap: 1vw;
background-color: black;
}
.winner-overlay {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
pointer-events: none;
background-size: cover;
}
html {
width: 100%;
height: 100%;
margin: 0;
position: relative;
}
.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;
}