-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflexbox.css
249 lines (207 loc) · 3.71 KB
/
flexbox.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
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Font size system (use em or px, avoid em cause it compund)
12px 14px 16px 18px 20px 24px 30px 36px 48px 60px 72px */
body {
margin: 0;
font-size: 18px;
text-align: left;
font-weight: 400;
font-family: "Roboto", sans-serif;
line-height: 1.5;
}
/* Makes img responsive on flexbox */
img {
max-width: 100%;
}
/* line-height must be correlated to the line-length/width (greather the width, greather the line heigth) and
font-size (smaller the font-size greather the line height) */
p {
/* max-width: 28em; */
line-height: 1.3;
}
h1 {
margin-top: 0;
}
h2 {
font-weight: 700;
font-size: 36px;
}
.intro {
width: 100%;
background-color: #23424a;
color: #fafafa;
margin: 0 auto;
padding: 1rem 1rem 5rem 1rem;
}
/* Flex conatiner */
.row {
display: flex;
/* Only creates space if the items don't
fill all container's space */
justify-content: space-between;
}
/* Center the content and set witdh and max-width */
.container {
width: 80%;
max-width: 1500px;
margin: 0 auto;
}
/* Flex item */
.card {
padding-top: 1rem;
width: 52%;
}
/* Flex item */
.card-img {
width: 42%;
/* If don't set the img will be */
/* sctreched to the heigth of the conainer */
align-self: start;
padding-top: 1rem;
}
/* .card-img img {
object-fit: contain;
border: 3px solid #87629a;
} */
.intro-title {
font-style: normal;
font-weight: 900;
font-size: 48px;
padding-bottom: 0.3em;
}
/* Make line width 20-35em to fit between 45 and 75
characters per line */
.intro-text {
max-width: 28em;
line-height: 1.4;
}
/* To align text items the best approach is to align for baseline
align-items: baseline; cause if the has diferent size or prop they
don't would look at the same level */
.cta {
display: inline-block;
background-color: #38cfd9;
color: #23424a;
padding: 0.3em 1em;
border-radius: 100px;
font-weight: 400;
font-size: 1.5rem;
line-height: 150%;
letter-spacing: 0.05em;
text-decoration: none;
text-transform: uppercase;
}
/* Section Set padding and bgc */
.three {
padding: 1rem 1rem 5rem 1rem;
}
.three h2 {
color: #87629a;
}
/* Select element that has an element before/left */
.three-col + .three-col {
margin-left: 20px;
}
/* Section Set padding and bgc */
.two {
background-color: #136c72;
color: white;
padding: 1rem 1rem 5rem 1rem;
}
.two-col + .two-col {
margin-left: 30px;
}
/* 02-05 challege */
.five {
margin-top: 3rem;
margin-bottom: 8rem;
}
.left {
width: 52%;
color: #136c72;
/* padding: 1rem; */
}
.column {
display: flex;
flex-direction: column;
}
.rigth {
text-align: center;
width: 42%;
background-color: #136c72;
color: #fafafa;
}
.rigth-item {
padding: 0 4rem;
}
.rigth-item + .rigth-item {
margin-top: 0.5rem;
}
.left-item {
text-align: start;
}
.left h2 {
color: #87629a;
}
.left-item + .left-item {
margin-top: 1rem;
}
@media (max-width: 600px) {
.row {
display: block;
}
.card,
.card-img {
width: 100%;
}
.intro {
padding: 1rem;
}
.intro-title {
font-weight: 700;
font-size: 36px;
padding-bottom: 0.2em;
line-height: 1.2;
}
.cta {
padding: 0.1em 1em;
border-radius: 100px;
font-weight: 400;
font-size: 1.2rem;
line-height: 125%;
}
h2 {
font-weight: 400;
font-size: 30px;
margin: 0;
line-height: 120%;
}
.three {
padding: 1rem;
}
.three-col + .three-col {
margin-left: 0;
}
.two {
padding: 1rem;
}
.two-col + .two-col {
margin-left: 0;
}
.left,
.rigth {
width: 100%;
padding-top: 1rem;
padding-bottom: 1rem;
}
.left-item {
padding-bottom: 1rem;
}
.left-item + .left-item {
margin-top: 0;
}
}