-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
81 lines (70 loc) · 1.66 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
@import url('https://fonts.googleapis.com/css2?family=Ubuntu+Sans:ital,wght@0,100..800;1,100..800&display=swap');
* {
font-family: 'Ubuntu Sans', sans-serif;
}
html {
background-color: beige;
}
#allFlexContainer {
display: flex;
flex-direction: column;
justify-content: center;
align-items: space-between;
}
#pageTitle {
font-size: 3rem;
text-align: center;
margin: 0 auto;
padding: 10px;
}
#squareContainer {
display: flex;
border: 2px solid purple;
display: flex;
flex-wrap: wrap;
width: 600px; /* fixed width */
height: 600px;
max-width: 100%; /* responsiveness */
max-height: 100%;
margin: 0 auto;
padding: 0;
}
#resize-btn {
font-size: 32px;
margin: 0 auto;
padding: 10px;
background-color: yellowgreen;
color: black;
box-shadow: -2px 2px 2px black;
text-shadow: 1px 1px 2px red, 0 0 1em blue, 0 0 0.2em blue;
border: 0;
border-radius: 5px;
cursor: pointer;
}
#resize-btn:hover {
background-color: green;
color: white;
animation: bigToSmall 0.3s forwards;
}
@keyframes bigToSmall {
0% {
transform: scale(1);
}
100% {
transform: scale(0.8);
}
}
.square {
background-color: azure;
text-shadow: 1px 1px 2px red, 0 0 1em blue, 0 0 0.2em blue;
margin: 0;
padding: 0;
border: 0;
}
/* TODO: Add borders for container visualization
Know that the grid can't be created statically i.e. using a loop that takes in a fixed number
The squares change sizes: how? `calc()`? Variables?
Functions? Unknown methods?
But the container stays fixed.
Read all the briefing before attempting project. */
/* My mistake was that the borders were altering the size of the squares and messing everything up. */