17
17
/* This is the same color as the CWL website menu background. */
18
18
--medium-gray : rgb (244 , 244 , 244 );
19
19
--light-gray-color : # FAFAFA ;
20
+ --black-color : # 333333 ;
20
21
--font-family : 'Roboto' , sans-serif;
22
+ --font-size : 16px ;
21
23
}
22
24
23
25
body {
24
26
display : flex;
25
27
min-height : 100vh ;
26
28
flex-direction : column;
27
29
font-family : var (--font-family );
30
+ font-size : calc (var (--font-size ) + 0.390625vw );
31
+ color : var (--black-color );
28
32
}
29
33
30
34
/*
@@ -67,13 +71,13 @@ header div:nth-child(1) img {
67
71
/* Middle column and children elements. */
68
72
69
73
header div : nth-child (2 ) {
70
- width : 50 % ;
74
+ width : 100 % ;
71
75
}
72
76
73
77
header div : nth-child (2 ) h1 {
74
78
text-align : center;
75
79
font-weight : bold;
76
- font-size : 6 vw ;
80
+ font-size : 8 vw ;
77
81
font-family : 'Roboto Slab' , serif;
78
82
color : var (--warm-red-font-color );
79
83
text-shadow : var (--gray-color ) 1px 1px 3px ;
@@ -101,34 +105,6 @@ header div:nth-child(2) span:nth-child(3) {
101
105
102
106
header div : nth-child (3 ) {
103
107
width : 25% ;
104
- background-color : var (--warm-red-font-color );
105
- align-self : end;
106
- overflow : hidden;
107
- position : relative;
108
- }
109
-
110
- header div : nth-child (3 ): before {
111
- content : "" ;
112
- position : absolute;
113
- top : 0 ;
114
- left : 0 ;
115
- border-width : 0 0 16px 16px ;
116
- border-style : solid;
117
- border-color : var (--light-gray-color ) var (--cold-red-font-color ) var (--cold-red-font-color ) var (--light-gray-color );
118
- background : var (--cold-red-font-color );
119
- -webkit-box-shadow : 0 1px 1px rgba (0 , 0 , 0 , 0.3 ), -1px 1px 1px rgba (0 , 0 , 0 , 0.2 );
120
- -moz-box-shadow : 0 1px 1px rgba (0 , 0 , 0 , 0.3 ), -1px 1px 1px rgba (0 , 0 , 0 , 0.2 );
121
- box-shadow : 0 1px 1px rgba (0 , 0 , 0 , 0.3 ), -1px 1px 1px rgba (0 , 0 , 0 , 0.2 );
122
- /* Firefox 3.0 damage limitation */
123
- display : block; width : 0 ;
124
- }
125
-
126
- header div : nth-child (3 ) > span {
127
- margin : 0 auto;
128
- padding : 0.25rem 0 ;
129
- display : inline-block;
130
- color : white;
131
- font-size : 2vw ;
132
108
}
133
109
134
110
/*
@@ -164,11 +140,12 @@ nav > ol > li > a {
164
140
display : block;
165
141
}
166
142
167
- nav > ol > li > a . current {
143
+ nav > ol > li > a : hover {
168
144
color : var (--warm-red-font-color );
169
145
}
170
146
171
- nav > ol > li > a : hover {
147
+ /* TBD: This cannot be done via CSS-only; only with JavaScript. */
148
+ nav > ol > li > a .current {
172
149
color : var (--warm-red-font-color );
173
150
}
174
151
@@ -185,33 +162,34 @@ main {
185
162
}
186
163
187
164
main > article {
188
- max-width : 80% ;
189
- margin : 0 auto;
190
165
flex : 1 ;
191
166
}
192
167
193
168
main > article > section {
194
- margin : 4rem 0 ;
169
+ margin : 2rem auto;
170
+ width : 90% ;
171
+ max-width : 90% ;
172
+ overflow : hidden;
195
173
}
196
174
197
175
main > article > section > h1 ,
198
176
main > article > section > h2 ,
199
177
main > article > section > h3 ,
200
178
main > article > section > h4 {
201
179
color : var (--warm-red-font-color );
202
- margin : 1 rem 0 ;
180
+ margin : 0 0 1.5 rem 0 ;
203
181
}
204
182
205
183
main > article > section > h2 {
206
- font-size : 3vw ;
184
+ font-size : clamp ( 1.75 rem , 3vw , 3 rem ) ;
207
185
}
208
186
209
187
main > article > section > h3 {
210
- font-size : 2.5vw ;
188
+ font-size : clamp ( 1.5 rem , 2.5vw , 2.5 rem ) ;
211
189
}
212
190
213
191
main > article > section > h4 {
214
- font-size : 2vw ;
192
+ font-size : clamp ( 1.25 rem , 2vw , 2 rem ) ;
215
193
}
216
194
217
195
main > article > section > h1 > a ,
@@ -232,7 +210,7 @@ main > article > section > h4 > a:hover:after{
232
210
}
233
211
234
212
main > article > section > p {
235
- line-height : 1.5 rem ;
213
+ line-height : 1.5 ;
236
214
margin : 0.5rem 0 ;
237
215
text-align : justify;
238
216
}
@@ -290,10 +268,20 @@ footer ol, footer ul {
290
268
291
269
footer ol > li , footer ul > li {
292
270
display : inline list-item;
293
- list-style : circle ;
271
+ list-style : none ;
294
272
margin : 0.75rem 0 ;
295
273
}
296
274
275
+ footer ol > li ::after , footer ul > li ::after {
276
+ content : '/' ;
277
+ margin-left : 0.5rem ;
278
+ }
279
+
280
+ footer ol > li : last-child ::after , footer ul > li : last-child ::after {
281
+ content : '' ;
282
+ margin-left : 0 ;
283
+ }
284
+
297
285
footer a , footer a : active , footer a : visited {
298
286
color : gray;
299
287
}
@@ -323,3 +311,130 @@ strong {
323
311
flex-direction : column;
324
312
flex : 1 ;
325
313
}
314
+
315
+ /* The banner text. */
316
+
317
+ .banner-text {
318
+ background-color : var (--warm-red-font-color );
319
+ align-self : end;
320
+ overflow : hidden;
321
+ position : relative;
322
+ }
323
+
324
+ .banner-text : before {
325
+ content : "" ;
326
+ position : absolute;
327
+ top : 0 ;
328
+ left : 0 ;
329
+ border-width : 0 0 16px 16px ;
330
+ border-style : solid;
331
+ border-color : var (--light-gray-color ) var (--cold-red-font-color ) var (--cold-red-font-color ) var (--light-gray-color );
332
+ background : var (--cold-red-font-color );
333
+ -webkit-box-shadow : 0 1px 1px rgba (0 , 0 , 0 , 0.3 ), -1px 1px 1px rgba (0 , 0 , 0 , 0.2 );
334
+ -moz-box-shadow : 0 1px 1px rgba (0 , 0 , 0 , 0.3 ), -1px 1px 1px rgba (0 , 0 , 0 , 0.2 );
335
+ box-shadow : 0 1px 1px rgba (0 , 0 , 0 , 0.3 ), -1px 1px 1px rgba (0 , 0 , 0 , 0.2 );
336
+ /* Firefox 3.0 damage limitation */
337
+ display : block; width : 0 ;
338
+ }
339
+
340
+ .banner-text > * {
341
+ margin : 0 auto;
342
+ padding : 0.25rem 0 ;
343
+ display : inline-block;
344
+ color : white;
345
+ font-size : 1.5rem ;
346
+ }
347
+
348
+ /* Hide the second banner. This is displayed only on smaller viewports. */
349
+
350
+ main > article .banner-text {
351
+ display : none;
352
+ }
353
+
354
+ /*
355
+ For smaller viewports, like mobile.
356
+ */
357
+
358
+ @media only screen and (max-width : 768px ) {
359
+
360
+ header {
361
+ border : none;
362
+ }
363
+
364
+ header div : nth-child (1 ) {
365
+ width : 50% ;
366
+ }
367
+
368
+ header div : nth-child (2 ) {
369
+ width : 100% ;
370
+ text-align : right;
371
+ align-items : end;
372
+ margin-right : 1rem ;
373
+ }
374
+
375
+ header div : nth-child (2 ) h1 {
376
+ color : var (--warm-red-font-color );
377
+ }
378
+
379
+ /* Hide the first banner. This is displayed only on wider viewports. */
380
+ header div .banner-text {
381
+ display : none;
382
+ }
383
+
384
+ /* Instead of a burger menu (hard to make it accessible, correctly, we use a horizontal-to-vertical menu approach.
385
+ Ref: https://www.accede-web.com/en/guidelines/rich-interface-components/hamburger-menu/.
386
+ */
387
+ nav > ol {
388
+ max-width : 100% ;
389
+ display : block;
390
+ }
391
+
392
+ nav > ol > li + li : not (: first-child ) {
393
+ border-top : 1px solid var (--gray-color );
394
+ }
395
+
396
+ nav > ol > li : hover {
397
+ background-color : var (--light-gray-color );
398
+ }
399
+
400
+ nav > ol > li > a {
401
+ max-width : 90% ;
402
+ margin : 0 auto;
403
+ padding : 1rem 0 ;
404
+ background-color : transparent;
405
+ }
406
+
407
+ main > article .banner-text {
408
+ display : block;
409
+ margin : 0 ;
410
+ padding : 1rem 0 ;
411
+ }
412
+
413
+ main > article .banner-text > * {
414
+ display : block;
415
+ font-size : 1.5rem ;
416
+ width : 90% ;
417
+ margin : 0 auto;
418
+ }
419
+
420
+ main > article .banner-text : before {
421
+ display : none;
422
+ }
423
+
424
+ footer > * {
425
+ max-width : 100% ;
426
+ margin : 0 1rem ;
427
+ text-align : left;
428
+ }
429
+
430
+ footer ol > li , footer ul > li {
431
+ display : list-item;
432
+ list-style : circle;
433
+ margin : 0.75rem 1rem ;
434
+ }
435
+
436
+ footer ol > li ::after , footer ul > li ::after {
437
+ content : none;
438
+ margin : 0 ;
439
+ }
440
+ }
0 commit comments