-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
130 lines (120 loc) · 2.38 KB
/
styles.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
*
{
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
text-align: center;
box-sizing: border-box;
}
.heading
{
color: white;
font-size: 30px;
margin-top: 20px;
}
.mines
{
text-align: center;
color: white;
z-index: 2;
font-size: 25px;
}
#flagbutton
{
margin-top: 20px;
height: 45px;
width: 100px;
border: none;
font-size: 30px;
background-color: #b0b0b0;
color: white;
transition: background-color 0.3s; /* Added smooth transition */
bottom: 20px; /* Adjust the distance from the bottom */
border-radius: 8px; /* Add border radius to the flag button */
}
#flagbutton:hover
{
background-color: #979797;
cursor: pointer;
}
body
{
background-color: black;
height: 100vh;
margin: 0;
padding: 0;
}
#container
{
display: flex;
height: 100%;
flex-direction: column;
justify-content: center; /* Center elements horizontally */
align-items: center; /* Center elements vertically */
}
#board
{
width: 500px;
aspect-ratio: 1;
border: 10px solid #979797;
background-color: #b0b0b0;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(8, 1fr);
grid-template-rows: repeat(8, 1fr);
border-radius: 15px;
position: relative; /* Added position relative */
}
#board div
{
border: 1px solid #c0c0c0; /* Soft grey border color for tiles */
font-size: 30px;
display: flex;
justify-content: center;
align-items: center;
transition: background-color 0.3s; /* Added smooth transition */
border-radius: 8px;
}
.clickedTile
{
background-color: #979797;
color: white;
}
.x1
{
color: #e76346;
}
.x2
{
color: #4199d3;
}
.x3
{
color: #57da59;
}
.x4
{
color: #bb41d3;
}
@media (max-width: 768px)
{
#board
{
width: 90%; /* Adjust board width for smaller screens */
height: auto; /* Allow board height to adjust based on content */
aspect-ratio: 1;
max-width: 400px; /* Set maximum width for board */
}
.mines
{
top: 10px; /* Adjust the top position for smaller screens */
font-size: 12px; /* Adjust font size for smaller screens */
}
#flagbutton
{
bottom: 10px; /* Adjust the bottom position for smaller screens */
font-size: 20px; /* Adjust font size for smaller screens */
}
.clickedTile {
font-size: 10px;
}
}