Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
280 lines (241 loc) · 5.34 KB
/
Copy pathstyle.css
File metadata and controls
280 lines (241 loc) · 5.34 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
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
/* JK Version */
/* Root variables are used so that we can have a single place
in our code to declare things like colours and fonts, as well as
values we reuse a lot (like our spacing scale). */
:root {
--brand: #8246af;
--action: #ffa300;
--white: #ffffff;
--base-light: #cdb5df;
--base-dark: #0d0711;
--black: #111111;
--font-default: "Inter", sans-serif;
--font-feature: "Rubik", sans-serif;
--space-small: 8px;
--space-medium: 16px;
--space-large: 32px;
--space-xl: 64px;
}
/* CSS Reset (Base Styles)
These are the styles we are applying to make sure that
browsers don't do silly or unexpected things, and our defaults are
just a BIT less ugly! */
html {
box-sizing: border-box;
font-size: var(--space-medium);
font-family: var(--font-default);
color: var(--black);
scroll-behavior: smooth;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--font-feature);
}
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
margin: 0;
padding: 0;
}
ol,
ul {
list-style: none;
;
}
img {
max-width: 100%;
height: auto;
}
input,
button,
textarea,
select {
font: inherit;
}
/* ---End CSS Reset --- */
/* Utility Classes -
reusable styles for styles you add
all the time to lots of different elements */
.flex {
display: flex;
}
.padding-small {
padding: var(--space-small);
}
.padding-medium {
padding: var(--space-medium);
}
.padding-large {
padding: var(--space-large);
}
.padding-xl {
padding: var(--space-xl);
}
/* ---End Utility Classes--- */
/* Component Classes - reusable styles for specific elements */
.icon {
width: var(--space-large);
}
.button {
border-radius: 4px;
background-color: #ffa300;
padding: var(--space-small) var(--space-medium);
text-decoration: none;
color: black;
border:none;
box-shadow: 0 0 var(--space-medium) rgba(0,0,0,0.1);
}
/* ---End Component Classes--- */
/* Page Styles */
header{
display:flex;
align-items:center;
justify-content:space-between;
/* I can combine root variables with combo rules!
Here I'm setting top/bottom to small, and left/right
to the medium space setting. */
padding: var(--space-small) var(--space-medium);
}
.mobile-nav a {
text-decoration: none;
color: var(--black);
display: block;
padding: 4px 16px;
}
.desktop-nav{
text-decoration: none;
color: var(--black);
display: block;
}
.logo {
max-height: 100px;
width: auto;
}
/* Add a margin around the outside of everything
and gaps in between our sections. */
main {
display: flex;
flex-direction: column;
gap: var(--space-medium);
justify-content: center;
padding:var(--space-medium);
}
/* Styles for hero section */
.hero {
background-color: var(--brand);
color: var(--white);
display: flex;
flex-direction: column;
align-items: flex-start;
border-radius: var(--space-small);
padding:var(--space-large);
gap:var(--space-medium);
/* This is an example of a NESTED CSS selector.
It's a different way of targeting children, by putting
the child inside the brackets for the parent rule.
This achieves the same result as adding a rule directly
for .hero .button {} */
.button{
margin-top: var(--space-small);
}
}
/* Styles for 3 boxes section */
.article-container { /* This is the invisible section around the articles */
display:flex;
/*We want the default to be column, then use a media query for larger screens*/
flex-direction: column;
gap: var(--space-medium);
}
article {
background-color: var(--base-light);
border-radius: var(--space-medium);
display:flex;
flex-direction:column;
align-items:flex-start;
gap:var(--space-small);
}
article .icon {
width: 24px;
}
article .button{
margin-top:var(--space-medium);
}
/* Contact Section */
.contact{
display:flex;
flex-direction:column;
align-items:center;
}
.contact-form{
display:flex;
flex-direction:column;
padding: 48px 16px;
border-radius: 10px;
margin: 5px 10px;
}
footer{
margin-top: var(--space-medium);
}
/* Note that here we are making the ul the flex container,
not the nav. This is because the items are the <li> elements,
and the parent of those elements is ul. This selector means
"ul elements that are inside nav elements that are inside footer elements" */
footer nav ul{
display:flex;
justify-content:center;
gap:var(--space-medium);
}
.copyright-bar{
background-color:var(--brand);
color:var(--white);
text-align:center;
padding:var(--space-small);
margin-top:var(--space-small);
}
/* .articles-container media */
@media (min-width: 768px) {
.article-container {
display: flex;
flex-direction: row;
}
article {
padding: 56px;
}
article .article-heading {
display: flex;
justify-content: flex-start;
}
article:hover {
filter: contrast(150%);
}
.contact-form h2 {
text-align: center;
font-size: 2.5rem;
}
.contact-form form {
max-width: 60%;
margin: 40px auto;
}
.desktop-nav{
display: flex;
flex-direction: row;
gap: 24px;
margin-right: 16px;
}
}