-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstyle.css
More file actions
118 lines (101 loc) · 2.63 KB
/
style.css
File metadata and controls
118 lines (101 loc) · 2.63 KB
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
html, body {
margin: 0;
padding: 0;
}
body {
background-color: rgb(171, 147, 151);
background-repeat: space;
background-size: cover;
border-radius: 4px;
text-align: center;
}
h1 {
font-family: 'Bungee Shade', cursive;
color: #4e1c4e;
background-color: rgb(254, 222, 227);
}
div#splash {
}
div#container {
}
main, #health, #health-box { /* Hidden by splash screen. */
/* display: none; */
/* display: block */
}
#container { /* For specifically just the container. */
background-color: pink;
border: 1px dashed magenta;
border-radius: 10px;
margin: 0 auto; /* Centers everything inside the container, needs to be used with a width value. */
max-width: 60em; /* So that gameplay screen doesn't take up entire width. */
text-align: center;
display: grid;
grid-gap: 0em; /* Margin between grid areas */
grid-template-columns: 2fr;
grid-template-rows: 1fr 10fr 1fr;
grid-template-areas: "top"
"game"
"bottom";
}
aside#top {
grid-area: top;
position: relative;
text-align: center;
/* Vertically center children. */
display: flex;
flex-direction: column;
justify-content: center;
}
div#health-box {
background-color: white;
border: 1px solid #265B5F;
border-radius: 3px;
height: 20px;
margin: 0 auto; /* Centers everything but has to be used with a width value. */
width: 100px;
}
div#health {
background-color: #42f59e;
border-radius: 3px 0px 0px 3px;
height: 20px;
margin-left: 0;
width: 50px; /* Health starts off at 50%. */
}
canvas#game {
background-color: #222;
background-image: url('./img/cyberpunk-street.png');
background-position: left;
background-size: cover;
height: 500px;
border: 2px solid black;
width: 700px; /* Having trouble having it fit inside of my container. How do I have everything line up and what does each line of CSS due to each item? */
grid-area: game;
}
div#instructions {
font-family: 'Saira Semi Condensed', sans-serif;
}
div.result {
font-family: 'Saira Semi Condensed', sans-serif;
}
aside#bottom {
display: flex;
flex-direction: row;
justify-content: center;
grid-area: bottom;
align-items: center;
}
button {
color: #4e1c4e;
border-radius: 5px;
font-family: 'Bungee Shade', cursive;
margin: 10px;
}
div.result {
background-color: pink;
border-radius: 5px;
display: none; /* Change to 'block' to show. */
left: 33%; /* We use left because of our absolute position. */
position: absolute;
top: 45%;
width: 33%;
}