forked from SallyMcGrath/HTML-CSS-W2-InClassProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
160 lines (148 loc) · 2.87 KB
/
styles.css
File metadata and controls
160 lines (148 loc) · 2.87 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
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
/* HTML/CSS W2 Project
* Work in pairs
* Mark up your content with semantic html
* Lay out your page using flexbox and grid
* Test your work with Devtools.
* You can get pictures and choose custom size in the download at
* https://www.pexels.com/
* If you want to use a different font, get them from
* https://fonts.google.com/
*/
/* Testing your work
== check your CSS
* uses grid
* uses flexbox
* uses at least one media query
== check your HTML
* uses semantic HTML
* has a Lighthouse Access score of 100 <--
* works on desktop and mobile
* works when you size the text up by 200%
== check your design
* follows the example
* you can choose your own colours and fonts if you like
* write your names at the bottom
* take a screenshot at laptop and Moto G4 device sizes in Devtools
*/
/* General styles */
:root {
--spacing: clamp(1vw, calc(10px + 1vw), 2vw);
--omercolor: #8a0012;
--seyedcolor: #004931;
--seancolor: #004a55;
--background: #eff6e0;
}
body {
font: 100% "Newsreader", "Poppins", sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: var(--background);
}
header {
margin-top: 2rem;
text-align: center;
}
header p {
font-weight: 600;
font-size: 1.1rem;
}
h1, h2, h3, h4 {
padding: 0;
}
/* Main */
main {
display: grid;
gap: var(--spacing);
grid-template-areas:
". . . . . ."
". omer omer seyed seyed ."
". . sean sean . ."
". . . . . ."
;
justify-items: stretch;
}
main > section {
display: flex;
flex-flow: column nowrap;
}
.title > h2 {
text-align: center;
}
.tl {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
}
.img-wrapper img {
max-width: 210px;
max-height: 140px;
border: 2px solid;
border-radius: 3%;
}
.omer, .sean, .seyed {
color: #fff;
font-weight: 500;
}
.img-wrapper {
margin-left: 0.5rem;
}
.omer {
background-color: var(--omercolor);
grid-area: omer;
transition: opacity 1s ease 0sn;
}
.seyed {
background-color: var(--seyedcolor);
grid-area: seyed;
}
.sean {
background-color: var(--seancolor);
grid-area: sean;
}
.tl ol {
margin: 0;
padding: 0;
padding-left: 1rem;
}
/* Footer */
footer {
text-align: center;
margin-bottom: 2rem;
}
/* Media queries */
@media screen and (min-width: 250px) and (max-width: 600px) {
main {
grid-template-areas:
". . . . . . "
". omer omer omer omer ."
". seyed seyed seyed seyed ."
". sean sean sean sean ."
". . . . . ."
;
}
.img-wrapper img {
max-width: 120px;
max-height: auto;
}
.tl ol {
padding-left: 0.5rem;
}
}
@media screen and (min-width: 601px) and (max-width: 800px) {
main {
display: flex;
flex-flow: column wrap;
}
.img-wrapper img {
max-width: 135px;
max-height: auto;
}
}
@media screen and (min-width: 801px) and (max-width: 1100px) {
.img-wrapper img {
max-width: 150px;
max-height: auto;
}
}