-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrwt-nested-menu.css
More file actions
131 lines (123 loc) · 3.08 KB
/
Copy pathrwt-nested-menu.css
File metadata and controls
131 lines (123 loc) · 3.08 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
/*=============================================================================
File: /node_modules/rwt-nested-menu/rwt-nested-menu.css
Language: CSS
Copyright: Read Write Tools © 2020
License: MIT
Initial date: Aug 22, 2020
Contents: Nested navigation menu with two entry levels
=============================================================================*/
:host {
--pure-black: #000;
--nav-black: #111;
--light-black: #171717;
--medium-black: #222;
--black: #333;
--dark-gray: #555;
--gray: #777;
--white: #ccc;
--pure-white: #fff;
--js-blue: #76afe8;
--title-blue: #42affa;
--yellow: #ffffa4;
--red: #ff3d3d;
/* custom element decorations */
--color: var(--pure-white);
--accent-color1: var(--title-blue);
--accent-color2: var(--yellow);
--menu-background: var(--medium-black);
--group-background: var(--medium-black);
--item-background: var(--black);
--hover-background: var(--form-gray);
--active-background: var(--pure-black);
--thick-border: var(--pure-black);
--thin-border: var(--light-black);
--item-border: var(--white);
/* custom element variables */
--menu-top: 0;
--font-size: 0.8rem;
--item-height: 2rem;
--item-width: 11rem;
--z-index: 1;
}
menu {
position: fixed;
top: var(--menu-top);
width: 100%;
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: start; /* main-axis */
align-content: center; /* cross-axis */
max-width: var(--columns-width);
overflow: hidden;
padding: 0;
margin: 0;
background-color: var(--menu-background);
box-sizing: border-box;
border-top: 1px solid var(--accent-color2);
border-bottom: 1px solid var(--accent-color2);
z-index: var(--z-index);
}
menu.show-menu {
display: flex;
}
menu.hide-menu {
display: none;
}
menu a {
font-family: 'Source Sans Pro', sans-serif;
font-size: var(--font-size);
display: block;
flex-shrink: 0;
flex-grow: 0;
height: var(--item-height);
width: var(--item-width);
color: var(--color);
background-color: var(--group-background);
text-align: center;
break-inside: avoid;
box-sizing: border-box;
text-decoration: none;
padding: calc((var(--item-height) - var(--font-size))/2) 0 0 0;
}
menu a:focus {
font-weight: bold;
outline-offset: -4px;
}
menu a:active {
border-left: 4px solid var(--accent-color1);
border-right: 4px solid var(--accent-color1);
}
menu a:hover {
font-weight: bold;
background-color: var(--hover-background);
}
.group {
display: block;
border-left: 4px solid var(--thick-border);
border-bottom: 1px dotted var(--thin-border);
border-right: 1px dotted var(--thin-border);
}
.activename.item {
background-color: var(--active-background);
color: var(--accent-color2);
}
.activename::before {
content: '►\00a0';
color: var(--accent-color2);
}
.activename::after {
content: '\00a0◀';
color: var(--accent-color2);
}
.open {
color: var(--accent-color1);
border-left: 4px solid var(--accent-color1);
}
.item {
background-color: var(--item-background);
border-left: 4px solid var(--item-border);
border-bottom: 1px dotted var(--thin-border);
border-right: 1px dotted var(--thin-border);
display: none;
}