-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css (Snake)
69 lines (57 loc) · 1.31 KB
/
style.css (Snake)
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
/* varaible so the snake color can be changed at runtime */
:root {
--snake-color: purple;
}
/* all of the text is centered */
body {
text-align: center;
}
/* making the table have no spaces between cells (for smooth grass look) */
table {
border-collapse: collapse;
margin: auto;
}
/* the size of the cells */
td {
height: 25px;
width: 25px;
}
/* makes sure the apple image doesn't expand the cell */
td img {
display: block;
padding: 0;
margin: 0;
}
/* styles for certain types of cells */
.border {
background-color: gray;
border: 1px solid black;
width: 23px;
height: 23px;
}
.grass, .fruit {
background-color: lightgreen;
}
/* using a varaible allows this to change at runtime*/
.snake {
background-color: var(--snake-color);
}
/* pre-game styles to show what is selected and what isn't */
.selected-size {
background-color: lightcoral;
}
.unselected-color {
border: none;
}
.selected-color {
border: 1px solid black;
height: 23px;
width: 23px;
}
/* allowing the proper scores/instructions to show or hide */
.pregame #preGameInstructions, .postGame .scoring, .game #gameInstructions {
display: display;
}
.preGame .scoring, .preGame #gameInstructions, .game #preGameInstructions, .game .scoring, .postGame #preGameInstructions, .postGame #gameInstructions {
display: none;
}