-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
99 lines (89 loc) · 2.12 KB
/
style.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
*, *::before, *::after {
box-sizing: border-box;
font-family: Arial;
}
body {
background-color: #333;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
font-size: 7.5vmin;
}
#game-board {
--grid-size: 4;
--cell-size: 20vmin;
--cell-gap: 2vmin;
display: grid;
grid-template-columns: repeat(var(--grid-size), var(--cell-size));
grid-template-rows: repeat(var(--grid-size), var(--cell-size));
background-color: #CCC;
gap: var(--cell-gap);
border-radius: 1vmin;
padding: var(--cell-gap);
position: relative;
}
.cell {
background-color: #AAA;
border-radius: 1vmin;
}
.tile {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
width: var(--cell-size);
height: var(--cell-size);
background-color: red;
border-radius: 1vmin;
top: calc(var(--y) * (var(--cell-size) + var(--cell-gap)) + var(--cell-gap));
left: calc(var(--x) * (var(--cell-size) + var(--cell-gap)) + var(--cell-gap));
font-weight: bold;
background-color: hsl(200, 50%, var(--background-lightness));
color: hsl(200, 25%, var(--text-lightness));
animation: show 200ms ease-in-out; /* Added animation name */
transition: 100ms ease-in-out;
}
/* Modal Styles */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
/* Modal styles */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.4);
z-index: 1;
}
.modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #fefefe;
padding: 20px;
border: 1px solid #888;
border-radius: 5px;
text-align: center;
}
.close-modal {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}
.close-modal:hover {
color: black;
}