1
1
/*
2
2
Copyright © 2013 Adobe Systems Incorporated.
3
-
4
3
Licensed under the Apache License, Version 2.0 (the “License”);
5
4
you may not use this file except in compliance with the License.
6
5
You may obtain a copy of the License at
7
-
8
6
http://www.apache.org/licenses/LICENSE-2.0
9
-
10
7
Unless required by applicable law or agreed to in writing, software
11
8
distributed under the License is distributed on an “AS IS” BASIS,
12
9
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
10
See the License for the specific language governing permissions and
14
11
limitations under the License.
15
12
*/
16
13
14
+ .megamenu {
15
+ position : relative;
16
+ }
17
+
17
18
.accessible-megamenu {
18
19
position : relative;
19
20
display : block;
@@ -40,9 +41,10 @@ limitations under the License.
40
41
margin : 0 ;
41
42
padding : 0 ;
42
43
line-height : inherit;
44
+ border-bottom : 0 ;
43
45
}
44
46
45
- .accessible-megamenu .accessible-megamenu-top-nav-item {
47
+ .accessible-megamenu > .accessible-megamenu-top-nav-item {
46
48
position : relative;
47
49
display : block;
48
50
box-sizing : border-box;
@@ -63,7 +65,7 @@ limitations under the License.
63
65
-moz-outline-radius : 3px ;
64
66
}
65
67
66
- .accessible-megamenu .accessible-megamenu-top-nav-item a [aria-expanded ] {
68
+ .accessible-megamenu > .accessible-megamenu-top-nav-item a [aria-expanded ] {
67
69
position : relative;
68
70
display : block;
69
71
line-height : 3em ;
@@ -77,15 +79,15 @@ limitations under the License.
77
79
}
78
80
79
81
80
- .accessible-megamenu .accessible-megamenu-top-nav-item a [aria-expanded ]: hover ,
81
- .accessible-megamenu .accessible-megamenu-top-nav-item a [aria-expanded ]: focus {
82
+ .accessible-megamenu > .accessible-megamenu-top-nav-item a [aria-expanded ]: hover ,
83
+ .accessible-megamenu > .accessible-megamenu-top-nav-item a [aria-expanded ]: focus {
82
84
color : # 333 !important ;
83
85
outline-offset : -1px ;
84
86
}
85
87
86
- .accessible-megamenu .accessible-megamenu-top-nav-item a [aria-expanded ]: hover ,
87
- .accessible-megamenu .accessible-megamenu-top-nav-item a [aria-expanded ]: focus ,
88
- .accessible-megamenu .accessible-megamenu-top-nav-item a [aria-expanded ].open {
88
+ .accessible-megamenu > .accessible-megamenu-top-nav-item a [aria-expanded ]: hover ,
89
+ .accessible-megamenu > .accessible-megamenu-top-nav-item a [aria-expanded ]: focus ,
90
+ .accessible-megamenu > .accessible-megamenu-top-nav-item a [aria-expanded ].open {
89
91
margin-left : 0 ;
90
92
background : # f5f8fa none;
91
93
background : -webkit-gradient (linear, left top, left bottom, from (# f5f8fa ), to (# e3e5e5 ));
@@ -95,16 +97,16 @@ limitations under the License.
95
97
z-index : 1002 ;
96
98
}
97
99
98
- .accessible-megamenu .accessible-megamenu-top-nav-item a [aria-expanded ].open {
100
+ .accessible-megamenu > .accessible-megamenu-top-nav-item a [aria-expanded ].open {
99
101
background : # f5f8fa none;
100
102
padding-bottom : 2px ;
101
103
}
102
104
103
- .accessible-megamenu .accessible-megamenu-top-nav-item : first-child a [aria-expanded ] {
105
+ .accessible-megamenu > .accessible-megamenu-top-nav-item : first-child a [aria-expanded ] {
104
106
border-bottom-left-radius : 3px ;
105
107
}
106
108
107
- .accessible-megamenu .accessible-megamenu-top-nav-item : first-child a [aria-expanded ].open {
109
+ .accessible-megamenu > .accessible-megamenu-top-nav-item : first-child a [aria-expanded ].open {
108
110
border-bottom-left-radius : 0px ;
109
111
border-left : 1px solid # b3b3b3 ;
110
112
border-left-color : rgba (0 , 0 , 0 , 0.3 );
@@ -264,6 +266,18 @@ limitations under the License.
264
266
text-decoration : underline;
265
267
}
266
268
269
+ .accessible-megamenu .accessible-megamenu-panel > h2 > a {
270
+ font-weight : bold;
271
+ color : # 454545 ;
272
+ font-size : 1.5em ;
273
+ margin-bottom : 0 ;
274
+ margin-top : .8em ;
275
+ padding-bottom : 0 ;
276
+ line-height : 1.4em ;
277
+ }
278
+
279
+ .accessible-megamenu .accessible-megamenu-panel > h2 > a : hover ,
280
+ .accessible-megamenu .accessible-megamenu-panel > h2 > a : focus ,
267
281
.accessible-megamenu .accessible-megamenu-panel > ol > li > h3 > a : hover ,
268
282
.accessible-megamenu .accessible-megamenu-panel > ol > li > h3 > a : focus {
269
283
color : # 333 ;
@@ -275,3 +289,197 @@ limitations under the License.
275
289
border-top-color : rgba (0 , 0 , 0 , 0.3 );
276
290
border-bottom-color : # fff ;
277
291
}
292
+
293
+ /* hides redundant header links in panel when megamenu is not initialized */
294
+ .accessible-megamenu : not (.js-accessible-megamenu ) .accessible-megamenu-panel > h2 {
295
+ display : none;
296
+ }
297
+
298
+ .accessible-megamenu-toggle {
299
+ display : none;
300
+ background : none;
301
+ border : 0 ;
302
+ padding : 0 ;
303
+ position : absolute;
304
+ z-index : 1 ;
305
+ top : 3px ;
306
+ right : 1em ;
307
+ width : 33px ;
308
+ height : 33px ;
309
+ }
310
+
311
+ .accessible-megamenu-toggle > span : not (.sr-only ) {
312
+ display : block;
313
+ width : 33px ;
314
+ height : 4px ;
315
+ margin-bottom : 5px ;
316
+ position : relative;
317
+
318
+ background : # 000 ;
319
+ border-radius : 3px ;
320
+
321
+ z-index : 1 ;
322
+
323
+ transform-origin : 0 0 ;
324
+
325
+ transition : transform 0.5s cubic-bezier (0.77 , 0.2 , 0.05 , 1.0 ),
326
+ background 0.5s cubic-bezier (0.77 , 0.2 , 0.05 , 1.0 ),
327
+ margin 0.5s cubic-bezier (0.77 , 0.2 , 0.05 , 1.0 ),
328
+ opacity 0.55s ease;
329
+ }
330
+
331
+ .accessible-megamenu-toggle > span {
332
+ margin-top : 5px ;
333
+ }
334
+
335
+ .accessible-megamenu-toggle > span : nth-last-child (1 ) {
336
+ transform-origin : 0% 100% ;
337
+ }
338
+
339
+ /*
340
+ * Transform all the slices of hamburger
341
+ * into a crossmark.
342
+ */
343
+ .accessible-megamenu-toggle [aria-expanded = true ] > span
344
+ {
345
+ margin-top : 0 ;
346
+ opacity : 1 ;
347
+ transform : rotate (45deg ) translate (4px , -3px );
348
+ background : # 000 ;
349
+ border-radius : 0 ;
350
+ }
351
+
352
+ /*
353
+ * But, hide the middle one.
354
+ */
355
+ .accessible-megamenu-toggle [aria-expanded = true ] > span : nth-last-child (2 )
356
+ {
357
+ opacity : 0 ;
358
+ transform : rotate (0deg ) scale (0.2 , 0.2 );
359
+ }
360
+
361
+ /*
362
+ * the last one should go the other direction.
363
+ */
364
+ .accessible-megamenu-toggle [aria-expanded = true ] > span : nth-last-child (1 )
365
+ {
366
+ transform : rotate (-45deg ) translate (0px , 7px );
367
+ }
368
+
369
+ @media (max-width : 920px ) {
370
+ .accessible-megamenu > .accessible-megamenu-top-nav-item {
371
+ position : static;
372
+ }
373
+
374
+ .accessible-megamenu .accessible-megamenu-panel .cols-4 ,
375
+ .accessible-megamenu .accessible-megamenu-panel .cols-4b ,
376
+ .accessible-megamenu .accessible-megamenu-panel .cols-3 ,
377
+ .accessible-megamenu .accessible-megamenu-panel .cols-1 {
378
+ width : auto;
379
+ left : 0 ;
380
+ right : 0 ;
381
+ }
382
+
383
+ .accessible-megamenu .accessible-megamenu-panel .open {
384
+ max-height : inherit
385
+ }
386
+
387
+ .accessible-megamenu .accessible-megamenu-panel .cols-4 > ol > li ,
388
+ .accessible-megamenu .accessible-megamenu-panel .cols-4b > ol > li ,
389
+ .accessible-megamenu .accessible-megamenu-panel .cols-3 > ol > li {
390
+ width : 44% ;
391
+ }
392
+
393
+ .accessible-megamenu .accessible-megamenu-panel .cols-1 > ol > li {
394
+ width : 100% ;
395
+ }
396
+
397
+ .accessible-megamenu .accessible-megamenu-panel .cols-3 > ol > li {
398
+ min-height : 256px ;
399
+ }
400
+
401
+ .accessible-megamenu .accessible-megamenu-panel > ol > li {
402
+ float : left;
403
+ display : block;
404
+ margin-right : 1em ;
405
+ margin-bottom : 1em ;
406
+ }
407
+
408
+ .accessible-megamenu .accessible-megamenu-panel .cols-4 > ol > li : nth-of-type (3 ),
409
+ .accessible-megamenu .accessible-megamenu-panel .cols-4b > ol > li : nth-of-type (3 ),
410
+ .accessible-megamenu .accessible-megamenu-panel .cols-3 > ol > li : nth-of-type (3 ) {
411
+ padding-left : 0 ;
412
+ border-left : none;
413
+ box-shadow : none;
414
+ }
415
+ }
416
+
417
+ @media (max-width : 434px ) {
418
+ .accessible-megamenu-toggle {
419
+ display : block;
420
+ z-index : 3 ;
421
+ }
422
+
423
+ .accessible-megamenu-toggle ~ .accessible-megamenu > .accessible-megamenu-top-nav-item {
424
+ height : 0 ;
425
+ overflow : hidden;
426
+ visibility : collapse;
427
+ }
428
+
429
+ .accessible-megamenu-toggle [aria-expanded = true ] ~ .accessible-megamenu > .accessible-megamenu-top-nav-item {
430
+ height : auto;
431
+ overflow : visible;
432
+ visibility : visible;
433
+ }
434
+
435
+ .accessible-megamenu {
436
+ height : auto;
437
+ padding-top : 3.077em ;
438
+ z-index : 2 ;
439
+ }
440
+
441
+ .accessible-megamenu > .accessible-megamenu-top-nav-item {
442
+ border-right : 0 ;
443
+ float : none;
444
+ width : 100% ;
445
+ height : auto;
446
+ }
447
+
448
+ .accessible-megamenu > .accessible-megamenu-top-nav-item a [aria-expanded ] {
449
+ box-shadow : none;
450
+ }
451
+
452
+ .accessible-megamenu .accessible-megamenu-panel ,
453
+ .accessible-megamenu .accessible-megamenu-panel .open {
454
+ position : relative;
455
+ top : 0 ;
456
+ border : 0 ;
457
+ box-shadow : none;
458
+ padding-bottom : 0 ;
459
+ }
460
+
461
+ .accessible-megamenu .accessible-megamenu-panel .open {
462
+ padding-bottom : 0.769em ;
463
+ max-height : 350px ;
464
+ overflow : auto;
465
+ }
466
+
467
+
468
+ }
469
+
470
+ @media (max-width : 414px ) {
471
+ .accessible-megamenu .accessible-megamenu-panel .cols-4 > ol > li ,
472
+ .accessible-megamenu .accessible-megamenu-panel .cols-4b > ol > li ,
473
+ .accessible-megamenu .accessible-megamenu-panel .cols-3 > ol > li ,
474
+ .accessible-megamenu .accessible-megamenu-panel .cols-1 > ol > li {
475
+ width : 100% ;
476
+ }
477
+
478
+ .accessible-megamenu .accessible-megamenu-panel .cols-4 > ol > li ,
479
+ .accessible-megamenu .accessible-megamenu-panel .cols-4b > ol > li ,
480
+ .accessible-megamenu .accessible-megamenu-panel .cols-3 > ol > li {
481
+ padding-left : 0 ;
482
+ border-left : none;
483
+ box-shadow : none;
484
+ }
485
+ }
0 commit comments