-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathclicky-menus.css
50 lines (44 loc) · 995 Bytes
/
clicky-menus.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
/**
* Clicky Menus v1.2.0
*/
/**
* Initial state, hidden off screen
*/
.clicky-menu ul {
position: absolute;
top: 100%;
left: 0;
visibility: hidden; /*[1]*/
}
/* Contain position of submenu to parent list item. This is probably the 80% of the 80/20 use case */
.clicky-menu > li {
position: relative;
}
/**
* No JS fallback
*
* Triggers menus on hover rather than click. Supports keyboard navigation in modern browsers.
*/
.clicky-menu.no-js li:hover > ul {
visibility: visible;
}
.clicky-menu.no-js li:focus-within > ul { /*[2]*/
visibility: visible;
}
/**
* Open/Close Menu Behavior with JS
*/
.clicky-menu ul[aria-hidden="false"] {
visibility: visible;
}
/* Prevent offscreen-submenus */
.clicky-menu .sub-menu--right {
left: auto !important;
right: 0 !important;
}
/**
* Footnotes
*
* [1] Using visibility instead of display allows for easier transitions and animation of submenus
* [2] Must be a separate ruleset so that hover works in non-modern browsers
*/