-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
290 lines (236 loc) · 4.74 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
/*
--building-colour1 is a variable
it can be used at any point in a selector with in it
means one change will alter all colours with that variable
Best to put variable declarations in the :root as they're accessible everywhere
*/
:root {
--building-color1: #aa80ff;
--building-color2: #66cc99;
--building-color3: #cc6699;
--building-color4: #538cc6;
--window-color1: black;
--window-color2: #8cd9b3;
--window-color3: #d98cb3;
--window-color4: #8cb3d9;
}
/*'border-box measures from the edge of the box so madding + border are included in the width*/
* {
border: 1px solid black;
box-sizing: border-box;
}
/*'overflow' hides scroll bar when something extends past viewport*/
body {
height: 100vh;
margin: 0;
overflow: hidden;
}
.background-buildings, .foreground-buildings {
width: 100%;
height: 100%;
position: absolute;
top: 0;
display: flex;
justify-content: space-evenly;
align-items: flex-end;
}
/*
common in all building classes so no need to repeat
'flex-direction: colomn;' means items fall underneath eachother
*/
.building-wrap{
display: flex;
flex-direction: column;
align-items: center;
}
/*
common in all window classes so no need to repeat
*/
.window-wrap {
display: flex;
justify-content: space-evenly;
align-items: center;
}
/*
Background buildings - 'bb' stand for background building
*/
.bb1 {
width: 10%;
height: 70%;
}
/*
Use of the --building-colour1 variable
*/
.bb1-window {
height: 10%;
background: linear-gradient(var(--building-color1), var(--window-color1))
}
.bb1a {
width: 70%;
}
.bb1b {
width: 80%;
}
.bb1c {
width: 90%;
}
/*
Transitions between 1st and 2nd color between 0 and 80% of the element then 3rd color for the rest.
*/
.bb1d {
width: 100%;
height: 70%;
background: linear-gradient(
purple,
var(--building-color1)80%,
var(--window-color1));
}
.bb2 {
width: 10%;
height: 50%;
}
.bb2a {
border-bottom: 5vh solid var(--building-color2);
border-left: 5vw solid transparent;
border-right: 5vw solid transparent;
}
.bb2b {
width: 100%;
height: 100%;
background: repeating-linear-gradient(
var(--building-color2),
var(--building-color2) 6%,
var(--window-color2) 6%,
var(--window-color2) 9%
);
}
.bb3 {
width: 10%;
height: 55%;
background: repeating-linear-gradient(
90deg,
var(--building-color3),
var(--building-color3),
var(--window-color3)15%
);
}
.bb4 {
width: 11%;
height: 58%;
}
.bb4-window {
width: 18%;
height: 90%;
background-color: var(--window-color4);
}
.bb4a {
width: 3%;
height: 10%;
background-color: var(--building-color4);
}
.bb4b {
width: 80%;
height: 5%;
background-color: var(--building-color4);
}
.bb4c {
width: 100%;
height: 85%;
background-color: var(--building-color4);
}
/*
Foreground buildings - 'fb' stands for foreground building
*/
.fb1 {
width: 10%;
height: 60%;
}
/*
creates triangle
*/
.fb1a {
border-bottom: 7vh solid var(--building-color4);
border-right: 2vw solid transparent;
border-left: 2vw solid transparent;
}
.fb1b {
width: 60%;
height: 10%;
background-color: var(--building-color4);
}
/*
can use multiple gradients of any type by seperating them with ','
*/
.fb1c {
width: 100%;
height: 80%;
background: repeating-linear-gradient(
90deg,
var(--building-color4),
var(--building-color4)10%,
transparent 10%,
transparent 15%
),
repeating-linear-gradient(
var(--building-color4)0%,
var(--building-color4)10%,
var(--window-color4)10%,
var(--window-color4)90%
);
}
.fb2 {
width: 10%;
height: 40%;
}
.fb2-window {
width: 22%;
height: 100%;
background-color: var(--window-color3);
}
.fb2a {
width: 100%;
border-bottom: 10vh solid var(--building-color3);
border-left: 1vw solid transparent;
border-right: 1vw solid transparent;
}
.fb2b {
width: 100%;
height: 75%;
background-color: var(--building-color3);
}
.fb3 {
width: 10%;
height: 35%;
}
.fb3a {
width: 80%;
height: 15%;
background-color: var(--building-color1);
}
.fb3b {
width: 100%;
height: 35%;
background-color: var(--building-color1);
}
/*
position allows for each item to be moved seperately
*/
.fb4 {
width: 8%;
height: 45%;
background-color: var(--building-color1);
position: relative;
left: 10%;
}
.fb5 {
width: 10%;
height: 33%;
background-color: var(--building-color2);
position: relative;
right: 10%;
}
.fb6 {
width: 9%;
height: 38%;
background-color: var(--building-color3);
}