@illinois-toolkit/ilw-header-megamenu 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,348 @@
1
+ ilw-header-megamenu-section[linked] a[slot="link"] {
2
+ all: initial;
3
+ box-sizing: border-box;
4
+ height: 100%;
5
+ display: flex;
6
+ align-items: center;
7
+ text-indent: var(--ilw-header-megamenu-section--anchor--text-indent);
8
+ position: relative;
9
+ font: var(--ilw-header-megamenu--font);
10
+ background: var(--ilw-header-megamenu--link-background);
11
+ color: var(--ilw-header-megamenu--link-color);
12
+ outline: 0;
13
+ cursor: pointer;
14
+ padding: 9px 2px 6px 20px;
15
+ border-width: 0 0 3px 0;
16
+ border-style: solid;
17
+ border-color: transparent;
18
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight);
19
+
20
+ &:hover {
21
+ background: var(--ilw-header-megamenu--link-background--hover);
22
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--hover);
23
+ color: var(--ilw-header-megamenu--link-color--hover);
24
+ text-decoration: underline;
25
+ }
26
+
27
+ &:focus {
28
+ background: var(--ilw-header-megamenu--link-background--focus);
29
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--focus);
30
+ }
31
+ }
32
+
33
+ ilw-header-megamenu-section[linked][aria-current="page"] a[slot="link"] {
34
+ border-color: var(--il-blue);
35
+
36
+ &:hover {
37
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--hover);
38
+ }
39
+
40
+ &:focus {
41
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--focus);
42
+ }
43
+ }
44
+
45
+ ilw-header-megamenu-section {
46
+
47
+
48
+
49
+ img{
50
+ margin: 30px;
51
+ object-fit: cover;
52
+ width: 90%;
53
+ height: auto;
54
+ border-radius: 30px;
55
+ grid-column: 4;
56
+ justify-self: right;
57
+ }
58
+
59
+ img.span-2, span[slot="action"].span-2{
60
+ grid-column: 3 / span 2;
61
+ }
62
+ img.span-3, span[slot="action"].span-3{
63
+ grid-column: 2 / span 3;
64
+ }
65
+
66
+ img.align-left, span[slot="action"].align-left{
67
+ grid-column: 1;
68
+ justify-self: left;
69
+ }
70
+ img.span-2.align-left, span[slot="action"].span-2.align-left{
71
+ grid-column: 1 / span 2;
72
+ justify-self: left;
73
+
74
+ }
75
+ img.span-3.align-left, span[slot="action"].span-3.align-left{
76
+ grid-column: 1 / span 3;
77
+ justify-self: left;
78
+
79
+ }
80
+
81
+ span[slot="action"] {
82
+ margin: auto;
83
+ position: relative;
84
+ width: 100%;
85
+ height: 100%;
86
+ display: flex;
87
+ justify-content: center;
88
+ flex-direction: column;
89
+ }
90
+
91
+ span[slot="action"] * {
92
+ display: none;
93
+ }
94
+
95
+ span[slot="action"] button:first-of-type {
96
+ display: block;
97
+ position: relative;
98
+ z-index: 1;
99
+ margin:0 auto;
100
+ }
101
+
102
+ span[slot="action"] p:first-of-type {
103
+ display: block;
104
+ text-align: center;
105
+ font-size: 21px;
106
+ font-weight: bold;
107
+ color: var(--il-blue);
108
+ font-family: "Source Sans", sans-serif;
109
+ position: relative;
110
+ z-index: 1;
111
+ }
112
+
113
+ span[slot="action"] img:first-of-type {
114
+ display: block;
115
+ position: absolute;
116
+ top: 0;
117
+ left: 0;
118
+ width: 100%;
119
+ height: 85%;
120
+ object-fit: cover;
121
+ z-index: 0;
122
+ margin: 30px 0;
123
+ }
124
+
125
+ span[slot="action"].span-2 img:first-of-type, span[slot="action"].span-3 img:first-of-type {
126
+ width: 90%;
127
+ margin: 30px;
128
+ }
129
+
130
+
131
+
132
+
133
+ ul {
134
+
135
+ list-style: none;
136
+ margin: 30px 0;
137
+ padding-left: 0;
138
+ display: grid;
139
+ grid-template-columns: repeat(4, minmax(0, 320px));
140
+ grid-template-rows: repeat(5, 34px);
141
+ grid-auto-flow: column;
142
+ max-width: 100vw;
143
+
144
+
145
+
146
+
147
+ li {
148
+ list-style: none;
149
+ padding-left: 30px;
150
+
151
+
152
+ span {
153
+ display: inline-block;
154
+ text-indent: var(--ilw-header-megamenu-section--anchor--text-indent);
155
+ }
156
+
157
+ ul{
158
+ display: inherit;
159
+
160
+ a{
161
+ font-weight: normal;
162
+ }
163
+ }
164
+
165
+
166
+ a {
167
+ --ilw-header-megamenu--link-border-left-highlight: 4px solid transparent;
168
+ --ilw-header-megamenu--link-border-left-highlight--hover: 4px solid var(--il-orange);
169
+ --ilw-header-megamenu--link-border-left-highlight--focus: 4px solid var(--il-blue);
170
+ --ilw-header-megamenu--link-border-bottom-highlight: initial;
171
+ --ilw-header-megamenu--link-border-bottom-highlight--focus: initial;
172
+ --ilw-header-megamenu--link-border-bottom-highlight--hover: initial;
173
+
174
+ all: initial;
175
+ box-sizing: border-box;
176
+ text-indent: var(--ilw-header-megamenu-section--anchor--text-indent);
177
+ display: block;
178
+ position: relative;
179
+ padding: var(--ilw-header-megamenu-section--anchor--padding);
180
+ font: var(--ilw-header-megamenu--font);
181
+ font-weight: bold;
182
+ background: transparent;
183
+ color: var(--il-blue);
184
+ outline: 0;
185
+ cursor: pointer;
186
+ border-top: var(--ilw-header-megamenu-section--anchor--border);
187
+ /* border-left: var(--ilw-header-megamenu--link-border-left-highlight); */
188
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight);
189
+
190
+
191
+ &:hover {
192
+ background: var(--ilw-header-megamenu--link-background--hover);
193
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--hover);
194
+ color: var(--ilw-header-megamenu--link-color--hover);
195
+ text-decoration: underline;
196
+ }
197
+
198
+ &:focus {
199
+ background: var(--ilw-header-megamenu--link-background--sub--focus);
200
+ border-bottom: var(--ilw-header-megamenu--link-border-left-highlight--focus);
201
+ }
202
+ }
203
+ }
204
+ }
205
+
206
+
207
+ div ul:nth-child(n + 5), div img:nth-child(n + 5), div span:nth-child(n + 5), > ul > li > ul{
208
+ display: none;
209
+ }
210
+
211
+ div{
212
+ display: grid;
213
+ grid-template-columns: repeat(4, minmax(0,320px));
214
+ max-width: 100vw;
215
+ grid-auto-flow: column;
216
+
217
+
218
+
219
+ ul{
220
+ border-left: solid 2px var(--il-storm-85, #d5d3d3);
221
+ }
222
+ ul:first-child{
223
+ border: none;
224
+ }
225
+
226
+
227
+
228
+
229
+ ul{
230
+ display: block;
231
+
232
+ li {
233
+ border-right: none;
234
+
235
+ ul{
236
+ margin-top: 0;
237
+ margin-bottom: 0;
238
+ border: none;
239
+
240
+ li{
241
+ border-right: none;
242
+ }
243
+ }
244
+ }
245
+
246
+ }
247
+ }
248
+
249
+ }
250
+
251
+
252
+
253
+
254
+ ilw-header-megamenu-section {
255
+ ilw-header-megamenu-section {
256
+ --ilw-header-megamenu--items--top: 0;
257
+ --ilw-header-megamenu--items--left: 250px;
258
+ --ilw-header-megamenu--link-border-left-highlight: 4px solid transparent;
259
+ --ilw-header-megamenu--link-border-left-highlight--hover: 4px solid var(--il-orange);
260
+ --ilw-header-megamenu--link-border-left-highlight--focus: 4px solid var(--il-blue);
261
+ --ilw-header-megamenu--link-border-bottom-highlight: initial;
262
+ --ilw-header-megamenu--link-border-bottom-highlight--hover: initial;
263
+ --ilw-header-megamenu--link-border-bottom-highlight--focus: initial;
264
+ --ilw-header-megamenu--grid-template-columns: auto 55px;
265
+ --ilw-header-megamenu-section--transform: rotate(270deg);
266
+ --ilw-header-megamenu-section--transform--selected: rotate(90deg);
267
+ }
268
+ }
269
+
270
+ ilw-header-megamenu[compact] ilw-header-megamenu-section {
271
+ display: block;
272
+ border-bottom: 1px solid var(--il-storm-lighter-3);
273
+ a {
274
+ &:focus {
275
+ background: var(--ilw-header-megamenu--link-background--sub--focus);
276
+ border-left: var(--ilw-header-megamenu--link-border-left-highlight--focus);
277
+ }
278
+ }
279
+ span[slot="action"]{
280
+ grid-column: auto;
281
+ height: auto;
282
+ }
283
+ span[slot="action"] button{
284
+ margin-bottom: 20px;
285
+ }
286
+
287
+ span[slot="action"].span-3 img, span[slot="action"].span-2 img, span[slot="action"] img {
288
+ margin: auto 0;
289
+ width: 100%;
290
+ height: 100%;
291
+ }
292
+
293
+ img{
294
+ display: none;
295
+ }
296
+
297
+ div {
298
+ display: block;
299
+ }
300
+
301
+
302
+ ul{
303
+ display:inherit;
304
+ padding: 0;
305
+ margin: 0;
306
+ }
307
+ ul li {
308
+ --ilw-header-megamenu-section--anchor--text-indent: 20px;
309
+ border-top: 1px solid var(--il-storm-lighter-3);
310
+ background: var(--il-storm-lighter-4);
311
+ padding-left: 0;
312
+
313
+
314
+ a {
315
+
316
+
317
+ &:focus {
318
+ background: var(--ilw-header-megamenu--link-background--sub--focus);
319
+ border-left: var(--ilw-header-megamenu--link-border-left-highlight--focus);
320
+ border-bottom: none;
321
+ }
322
+ }
323
+
324
+ }
325
+ ul li ul li a{
326
+ padding-left: 45px;
327
+ }
328
+
329
+ }
330
+
331
+ ilw-header-megamenu[compact] ilw-header-megamenu-section ilw-header-megamenu-section {
332
+ border-bottom: none;
333
+ --ilw-header-megamenu-section--transform: none;
334
+ --ilw-header-megamenu-section--transform--selected: rotate(180deg);
335
+ --ilw-header-megamenu--grid-template-columns: auto 51px;
336
+
337
+ ul a, ul button {
338
+ --ilw-header-megamenu-section--anchor--text-indent: 40px;
339
+ }
340
+ }
341
+
342
+ ul > span[action], li > span[action], ul > img, li > img, ul li:nth-child(n+21){
343
+ display: none
344
+ }
345
+
346
+ .no-border{
347
+ border:none;
348
+ }
@@ -0,0 +1,163 @@
1
+ #items {
2
+ display: none;
3
+ }
4
+
5
+ #items.expanded {
6
+ all: initial;
7
+ box-sizing: border-box;
8
+ flex-direction: column;
9
+ border: var(--ilw-header-megamenu--items--border);
10
+ box-shadow: var(--ilw-header-megamenu--items--box-shadow);
11
+ width: var(--ilw-header-megamenu--items--width);
12
+ max-width: 100vw + 39px;
13
+ position: var(--ilw-header-megamenu--items--position);
14
+ display: grid;
15
+ left: var(--ilw-header-megamenu--items--left);
16
+ top: var(--ilw-header-megamenu--items--top);
17
+ z-index: 100;
18
+ background: white;
19
+ }
20
+
21
+ .parent {
22
+ height: 100%;
23
+ }
24
+
25
+
26
+
27
+
28
+ button, .link {
29
+ all: initial;
30
+ box-sizing: border-box;
31
+ display: block;
32
+ position: relative;
33
+ padding: var(--ilw-header-megamenu-section--anchor--padding);
34
+ font: var(--ilw-header-megamenu--font);
35
+ background: var(--ilw-header-megamenu--link-background);
36
+ color: var(--ilw-header-megamenu--link-color);
37
+ fill: var(--ilw-header-megamenu--link-color);
38
+ border-width: 0 0 3px 0;
39
+ border-style: solid;
40
+ border-color: transparent;
41
+ outline: 0;
42
+ cursor: pointer;
43
+ height: 100%;
44
+ width: 100%;
45
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight);
46
+
47
+ svg {
48
+ padding: 2px;
49
+ transform: var(--ilw-header-megamenu-section--transform);
50
+ }
51
+
52
+ &.current {
53
+ border-color: var(--il-blue);
54
+ }
55
+
56
+ &:hover {
57
+ background: var(--ilw-header-megamenu--link-background--hover);
58
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--hover);
59
+ color: var(--ilw-header-megamenu--link-color--hover);
60
+ fill: var(--ilw-header-megamenu--link-color--hover);
61
+ text-decoration: underline;
62
+
63
+ svg {
64
+ outline: 2px dotted var(--il-altgeld);
65
+ }
66
+ }
67
+
68
+ &:focus {
69
+ background: var(--ilw-header-megamenu--link-background--focus);
70
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--focus);
71
+ border-left: var(--ilw-header-megamenu--link-border-left-highlight--focus);
72
+ }
73
+ }
74
+
75
+ button[aria-expanded="true"] {
76
+ text-decoration: underline;
77
+ color: var(--ilw-header-megamenu--link-color--hover);
78
+ background: var(--ilw-header-megamenu--link-background--hover);
79
+
80
+ &:focus {
81
+ background: var(--ilw-header-megamenu--link-background--hover);
82
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--hover);
83
+ }
84
+
85
+ svg {
86
+ fill: var(--ilw-header-megamenu--link-color--hover);
87
+ transform: var(--ilw-header-megamenu-section--transform--selected);
88
+ background: var(--ilw-header-megamenu--link-background--hover);
89
+
90
+ &:focus {
91
+ background: var(--ilw-header-megamenu--link-background--hover);
92
+ }
93
+ }
94
+ }
95
+
96
+ .header {
97
+ position: relative;
98
+ display: grid;
99
+ grid-template-columns: var(--ilw-header-megamenu-section--grid-template-columns--header);
100
+ grid-template-areas: "label icon";
101
+ grid-gap: 4px;
102
+ }
103
+
104
+ .header-link.current button {
105
+ border-color: var(--il-blue);
106
+ }
107
+
108
+ .header-link {
109
+ position: relative;
110
+ display: grid;
111
+ grid-template-columns: var(--ilw-header-megamenu--grid-template-columns);
112
+ grid-template-areas: "label icon";
113
+ align-items: center;
114
+ height: 100%;
115
+
116
+ &.highlighted {
117
+ background: var(--ilw-header-megamenu--link-background--hover);
118
+ }
119
+
120
+ & .link {
121
+ padding: 6px 0px 6px 20px;
122
+ }
123
+ & button {
124
+ padding: 6px 20px 6px 8px;
125
+ }
126
+ }
127
+
128
+ .label, .link {
129
+ box-sizing: border-box;
130
+ display: block;
131
+ position: relative;
132
+ grid-area: label;
133
+ }
134
+ .icon, .header-link button {
135
+ align-self: center;
136
+ align-items: center;
137
+ justify-content: center;
138
+ grid-area: icon;
139
+ }
140
+ .icon {
141
+ display: flex;
142
+ }
143
+ .arrow {
144
+ display: block;
145
+ height: 14px;
146
+ width: 14px;
147
+ }
148
+
149
+ .submenu.parent button:hover .label ::slotted(span[slot="label"]), .submenu.parent button:focus .label ::slotted(span[slot="label"]) {
150
+ text-decoration: underline;
151
+ }
152
+
153
+ .menu.parent .header-link.highlighted button, .menu.parent .header-link.highlighted ::slotted(a[slot="link"]) {
154
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--focus) !important;
155
+ }
156
+
157
+ .submenu.parent button.arrow-only:hover, .submenu.parent button.arrow-only:focus {
158
+ border-left: 4px solid transparent !important;
159
+ }
160
+
161
+ .menu.parent .compact button.arrow-only:hover, .menu.parent .compact button.arrow-only:focus {
162
+ border-left: 4px solid transparent !important;
163
+ }