##// END OF EJS Templates
ux: fix: last navigation menu's submenu was going off page to right
dan -
r301:7dab65bc default
parent child Browse files
Show More
@@ -1,623 +1,628 b''
1 // navigation.less
1 // navigation.less
2 // For use in RhodeCode applications;
2 // For use in RhodeCode applications;
3 // see style guide documentation for guidelines.
3 // see style guide documentation for guidelines.
4
4
5 // HEADER NAVIGATION
5 // HEADER NAVIGATION
6
6
7 .horizontal-list {
7 .horizontal-list {
8 float: right;
8 float: right;
9 display: block;
9 display: block;
10 margin: 0;
10 margin: 0;
11 padding: 0;
11 padding: 0;
12 -webkit-padding-start: 0;
12 -webkit-padding-start: 0;
13 text-align: left;
13 text-align: left;
14 font-size: @navigation-fontsize;
14 font-size: @navigation-fontsize;
15 color: @grey6;
15 color: @grey6;
16 z-index:10;
16 z-index:10;
17
17
18 li {
18 li {
19 line-height: 1em;
19 line-height: 1em;
20 list-style-type: none;
20 list-style-type: none;
21
21
22 a {
22 a {
23 padding: 0 .5em;
23 padding: 0 .5em;
24
24
25 &.menu_link_notifications {
25 &.menu_link_notifications {
26 .pill(7px,@rcblue);
26 .pill(7px,@rcblue);
27 display: inline;
27 display: inline;
28 margin: 0 7px 0 .7em;
28 margin: 0 7px 0 .7em;
29 font-size: @basefontsize;
29 font-size: @basefontsize;
30 color: white;
30 color: white;
31
31
32 &.empty {
32 &.empty {
33 background-color: @grey4;
33 background-color: @grey4;
34 }
34 }
35
35
36 &:hover {
36 &:hover {
37 background-color: @rcdarkblue;
37 background-color: @rcdarkblue;
38 }
38 }
39 }
39 }
40 }
40 }
41 .pill_container {
41 .pill_container {
42 margin: 1.25em 0px 0px 0px;
42 margin: 1.25em 0px 0px 0px;
43 float: right;
43 float: right;
44 }
44 }
45
45
46 &#quick_login_li {
46 &#quick_login_li {
47 &:hover {
47 &:hover {
48 color: @grey5;
48 color: @grey5;
49 }
49 }
50
50
51 a.menu_link_notifications {
51 a.menu_link_notifications {
52 color: white;
52 color: white;
53 }
53 }
54
54
55 .user {
55 .user {
56 padding-bottom: 10px;
56 padding-bottom: 10px;
57 }
57 }
58
58
59 &.open {
59 &.open {
60 .user {
60 .user {
61 border-bottom: 5px solid @rcblue;
61 border-bottom: 5px solid @rcblue;
62 }
62 }
63 }
63 }
64 }
64 }
65
65
66 &:before { content: none; }
66 &:before { content: none; }
67
67
68 &:last-child {
68 &:last-child {
69 .menulabel {
69 .menulabel {
70 padding-right: 0;
70 padding-right: 0;
71 border-right: none;
71 border-right: none;
72
72
73 .show_more {
73 .show_more {
74 padding-right: 0;
74 padding-right: 0;
75 }
75 }
76 }
76 }
77
77
78 &> a {
78 &> a {
79 border-bottom: none;
79 border-bottom: none;
80 }
80 }
81 }
81 }
82
82
83 &.active {
83 &.active {
84 border-bottom: 5px solid @rcblue;
84 border-bottom: 5px solid @rcblue;
85 }
85 }
86
86
87 &.open {
87 &.open {
88
88
89 a {
89 a {
90 color: white;
90 color: white;
91 }
91 }
92 }
92 }
93
93
94 &:focus {
94 &:focus {
95 outline: none;
95 outline: none;
96 }
96 }
97
97
98 ul li {
98 ul li {
99 display: block;
99 display: block;
100
100
101 &:last-child> a {
101 &:last-child> a {
102 border-bottom: none;
102 border-bottom: none;
103 }
103 }
104
104
105 ul li:last-child a {
105 ul li:last-child a {
106 /* we don't expect more then 3 levels of submenu and the third
106 /* we don't expect more then 3 levels of submenu and the third
107 level can have different html structure */
107 level can have different html structure */
108 border-bottom: none;
108 border-bottom: none;
109 }
109 }
110 }
110 }
111 }
111 }
112
112
113 > li {
113 > li {
114 float: left;
114 float: left;
115 display: block;
115 display: block;
116 padding: 0;
116 padding: 0;
117
117
118 > a,
118 > a,
119 &.has_select2 a {
119 &.has_select2 a {
120 display: block;
120 display: block;
121 padding: 10px 0 2px;
121 padding: 10px 0 2px;
122
122
123 .show_more {
123 .show_more {
124 margin-top: -4px;
124 margin-top: -4px;
125 padding-right: .5em;
125 padding-right: .5em;
126 }
126 }
127 }
127 }
128
128
129 .menulabel {
129 .menulabel {
130 padding: 0 .5em;
130 padding: 0 .5em;
131 line-height: 1em;
131 line-height: 1em;
132 // for this specifically we do not use a variable
132 // for this specifically we do not use a variable
133 border-right: 1px solid @grey4;
133 border-right: 1px solid @grey4;
134 }
134 }
135
135
136 .pr_notifications {
136 .pr_notifications {
137 padding-left: .5em;
137 padding-left: .5em;
138 }
138 }
139
139
140 .pr_notifications + .menulabel {
140 .pr_notifications + .menulabel {
141 display:inline;
141 display:inline;
142 padding-left: 0;
142 padding-left: 0;
143 }
143 }
144
144
145 &:hover,
145 &:hover,
146 &.open,
146 &.open,
147 &.active {
147 &.active {
148 a {
148 a {
149 color: @grey1;
149 color: @grey1;
150 }
150 }
151 }
151 }
152 }
152 }
153
153
154 pre {
154 pre {
155 margin: 0;
155 margin: 0;
156 padding: 0;
156 padding: 0;
157 }
157 }
158
158
159 .select2-container,
159 .select2-container,
160 .menulink.childs {
160 .menulink.childs {
161 position: relative;
161 position: relative;
162 }
162 }
163
163
164 #quick_login {
164 #quick_login {
165
165
166 li a {
166 li a {
167 padding: .5em 0;
167 padding: .5em 0;
168 border-bottom: none;
168 border-bottom: none;
169 color: @grey2;
169 color: @grey2;
170
170
171 &:hover { color: @grey1; }
171 &:hover { color: @grey1; }
172 }
172 }
173
173
174 .show_more {
174 .show_more {
175 padding-left: .5em;
175 padding-left: .5em;
176 }
176 }
177 }
177 }
178
178
179 #quick_login_link {
179 #quick_login_link {
180 display: inline-block;
180 display: inline-block;
181
181
182 .gravatar {
182 .gravatar {
183 border: 1px solid @grey2;
183 border: 1px solid @grey2;
184 }
184 }
185
185
186 .gravatar-login {
186 .gravatar-login {
187 height: 20px;
187 height: 20px;
188 width: 20px;
188 width: 20px;
189 margin: -8px 0;
189 margin: -8px 0;
190 padding: 0;
190 padding: 0;
191 }
191 }
192
192
193 &:hover .user {
193 &:hover .user {
194 color: @grey6;
194 color: @grey6;
195 }
195 }
196 }
196 }
197 }
197 }
198 .header .horizontal-list {
198 .header .horizontal-list {
199
199
200 li {
200 li {
201
201
202 &#quick_login_li {
202 &#quick_login_li {
203 padding-left: .5em;
203 padding-left: .5em;
204
204
205 &:hover #quick_login_link {
205 &:hover #quick_login_link {
206 color: inherit;
206 color: inherit;
207 }
207 }
208 }
208 }
209
209
210 &:before { content: none; }
210 &:before { content: none; }
211 }
211 }
212
212
213 > li {
213 > li {
214
214
215 a {
215 a {
216 padding: 18px 0 12px 0;
216 padding: 18px 0 12px 0;
217 color: @nav-grey;
217 color: @nav-grey;
218
218
219 &.menu_link_notifications {
219 &.menu_link_notifications {
220 padding: 1px 8px;
220 padding: 1px 8px;
221 }
221 }
222 }
222 }
223
223
224 &:hover,
224 &:hover,
225 &.open,
225 &.open,
226 &.active {
226 &.active {
227 .pill_container a {
227 .pill_container a {
228 // don't select text for the pill container, it has it' own
228 // don't select text for the pill container, it has it' own
229 // hover behaviour
229 // hover behaviour
230 color: @nav-grey;
230 color: @nav-grey;
231 }
231 }
232 }
232 }
233
233
234 &:hover,
234 &:hover,
235 &.open,
235 &.open,
236 &.active {
236 &.active {
237 a {
237 a {
238 color: @grey6;
238 color: @grey6;
239 }
239 }
240 }
240 }
241
241
242 .select2-dropdown-open a {
242 .select2-dropdown-open a {
243 color: @grey6;
243 color: @grey6;
244 }
244 }
245
245
246 .repo-switcher {
246 .repo-switcher {
247 padding-left: 0;
247 padding-left: 0;
248
248
249 .menulabel {
249 .menulabel {
250 padding-left: 0;
250 padding-left: 0;
251 }
251 }
252 }
252 }
253 }
253 }
254
254
255 li ul li {
255 li ul li {
256 background-color:@grey2;
256 background-color:@grey2;
257
257
258 a {
258 a {
259 padding: .5em 0;
259 padding: .5em 0;
260 border-bottom: @border-thickness solid @border-default-color;
260 border-bottom: @border-thickness solid @border-default-color;
261 color: @grey6;
261 color: @grey6;
262 }
262 }
263
263
264 &:last-child a, &.last a{
264 &:last-child a, &.last a{
265 border-bottom: none;
265 border-bottom: none;
266 }
266 }
267
267
268 &:hover {
268 &:hover {
269 background-color: @grey3;
269 background-color: @grey3;
270 }
270 }
271 }
271 }
272
272
273 .submenu {
273 .submenu {
274 margin-top: 5px;
274 margin-top: 5px;
275 }
275 }
276 }
276 }
277
277
278 // SUBMENUS
278 // SUBMENUS
279 .navigation .submenu {
279 .navigation .submenu {
280 display: none;
280 display: none;
281 }
281 }
282
282
283 .navigation li.open {
283 .navigation li.open {
284
284
285 .submenu,
285 .submenu,
286 .repo_switcher {
286 .repo_switcher {
287 display: block;
287 display: block;
288 }
288 }
289 }
289 }
290
290
291 .navigation li:last-child .submenu {
292 right: -20px;
293 left: auto;
294 }
295
291 .submenu {
296 .submenu {
292 position: absolute;
297 position: absolute;
293 top: 100%;
298 top: 100%;
294 left: 0;
299 left: 0;
295 min-width: 150px;
300 min-width: 150px;
296 margin: 6px 0 0;
301 margin: 6px 0 0;
297 padding: 0;
302 padding: 0;
298 text-align: left;
303 text-align: left;
299 font-family: @text-light;
304 font-family: @text-light;
300 border-radius: @border-radius;
305 border-radius: @border-radius;
301 z-index: 20;
306 z-index: 20;
302
307
303 li {
308 li {
304 display: block;
309 display: block;
305 margin: 0;
310 margin: 0;
306 padding: 0 .5em;
311 padding: 0 .5em;
307 line-height: 1em;
312 line-height: 1em;
308 color: @grey3;
313 color: @grey3;
309 background-color: @grey6;
314 background-color: @grey6;
310
315
311 &:before { content: none; }
316 &:before { content: none; }
312
317
313 a {
318 a {
314 display: block;
319 display: block;
315 width: 100%;
320 width: 100%;
316 padding: .5em 0;
321 padding: .5em 0;
317 border-right: none;
322 border-right: none;
318 border-bottom: @border-thickness solid white;
323 border-bottom: @border-thickness solid white;
319 color: @grey3;
324 color: @grey3;
320 }
325 }
321
326
322 ul {
327 ul {
323 display: none;
328 display: none;
324 position: absolute;
329 position: absolute;
325 top: 0;
330 top: 0;
326 right: 100%;
331 right: 100%;
327 padding: 0;
332 padding: 0;
328 z-index: 30;
333 z-index: 30;
329 }
334 }
330 &:hover {
335 &:hover {
331 background-color: @grey5;
336 background-color: @grey5;
332 -webkit-transition: background .3s;
337 -webkit-transition: background .3s;
333 -moz-transition: background .3s;
338 -moz-transition: background .3s;
334 -o-transition: background .3s;
339 -o-transition: background .3s;
335 transition: background .3s;
340 transition: background .3s;
336
341
337 ul {
342 ul {
338 display: block;
343 display: block;
339 }
344 }
340 }
345 }
341 }
346 }
342 }
347 }
343
348
344
349
345
350
346
351
347 // repo dropdown
352 // repo dropdown
348 .quick_repo_menu {
353 .quick_repo_menu {
349 width: 15px;
354 width: 15px;
350 text-align: center;
355 text-align: center;
351 position: relative;
356 position: relative;
352 cursor: pointer;
357 cursor: pointer;
353
358
354 div {
359 div {
355 overflow: visible !important;
360 overflow: visible !important;
356 }
361 }
357
362
358 &.sorting {
363 &.sorting {
359 cursor: auto;
364 cursor: auto;
360 }
365 }
361
366
362 &:hover {
367 &:hover {
363 .menu_items_container {
368 .menu_items_container {
364 position: absolute;
369 position: absolute;
365 display: block;
370 display: block;
366 }
371 }
367 .menu_items {
372 .menu_items {
368 display: block;
373 display: block;
369 }
374 }
370 }
375 }
371
376
372 i {
377 i {
373 margin: 0;
378 margin: 0;
374 color: @grey4;
379 color: @grey4;
375 }
380 }
376
381
377 .menu_items_container {
382 .menu_items_container {
378 position: absolute;
383 position: absolute;
379 top: 0;
384 top: 0;
380 left: 100%;
385 left: 100%;
381 margin: 0;
386 margin: 0;
382 padding: 0;
387 padding: 0;
383 list-style: none;
388 list-style: none;
384 background-color: @grey6;
389 background-color: @grey6;
385 z-index: 999;
390 z-index: 999;
386 text-align: left;
391 text-align: left;
387
392
388 a {
393 a {
389 color: @grey2;
394 color: @grey2;
390 }
395 }
391
396
392 ul.menu_items {
397 ul.menu_items {
393 margin: 0;
398 margin: 0;
394 padding: 0;
399 padding: 0;
395 }
400 }
396
401
397 li {
402 li {
398 margin: 0;
403 margin: 0;
399 padding: 0;
404 padding: 0;
400 line-height: 1em;
405 line-height: 1em;
401 list-style-type: none;
406 list-style-type: none;
402
407
403 &:before { content: none; }
408 &:before { content: none; }
404
409
405 a {
410 a {
406 display: block;
411 display: block;
407 height: 16px;
412 height: 16px;
408 padding: 8px; //must add up to td height (28px)
413 padding: 8px; //must add up to td height (28px)
409
414
410 &:hover {
415 &:hover {
411 background-color: @grey5;
416 background-color: @grey5;
412 -webkit-transition: background .3s;
417 -webkit-transition: background .3s;
413 -moz-transition: background .3s;
418 -moz-transition: background .3s;
414 -o-transition: background .3s;
419 -o-transition: background .3s;
415 transition: background .3s;
420 transition: background .3s;
416 }
421 }
417 }
422 }
418 }
423 }
419 }
424 }
420 }
425 }
421
426
422 // Header Repository Switcher
427 // Header Repository Switcher
423 // Select2 Dropdown
428 // Select2 Dropdown
424 #select2-drop.select2-drop.repo-switcher-dropdown {
429 #select2-drop.select2-drop.repo-switcher-dropdown {
425 width: auto !important;
430 width: auto !important;
426 margin-top: 5px;
431 margin-top: 5px;
427 padding: 1em 0;
432 padding: 1em 0;
428 text-align: left;
433 text-align: left;
429 .border-radius-bottom(@border-radius);
434 .border-radius-bottom(@border-radius);
430 border-color: transparent;
435 border-color: transparent;
431 color: @grey6;
436 color: @grey6;
432 background-color: @grey2;
437 background-color: @grey2;
433
438
434 input {
439 input {
435 min-width: 90%;
440 min-width: 90%;
436 }
441 }
437
442
438 ul.select2-result-sub {
443 ul.select2-result-sub {
439
444
440 li {
445 li {
441 line-height: 1em;
446 line-height: 1em;
442
447
443 &:hover,
448 &:hover,
444 &.select2-highlighted {
449 &.select2-highlighted {
445 background-color: @grey3;
450 background-color: @grey3;
446 }
451 }
447 }
452 }
448
453
449 &:before { content: none; }
454 &:before { content: none; }
450 }
455 }
451
456
452 ul.select2-results {
457 ul.select2-results {
453 min-width: 200px;
458 min-width: 200px;
454 margin: 0;
459 margin: 0;
455 padding: 0;
460 padding: 0;
456 list-style-type: none;
461 list-style-type: none;
457 overflow-x: visible;
462 overflow-x: visible;
458 overflow-y: scroll;
463 overflow-y: scroll;
459
464
460 li {
465 li {
461 padding: 0 8px;
466 padding: 0 8px;
462 line-height: 1em;
467 line-height: 1em;
463 color: @grey6;
468 color: @grey6;
464
469
465 &:before { content: none; }
470 &:before { content: none; }
466
471
467 &>.select2-result-label {
472 &>.select2-result-label {
468 padding: 8px 0;
473 padding: 8px 0;
469 border-bottom: @border-thickness solid @grey3;
474 border-bottom: @border-thickness solid @grey3;
470 white-space: nowrap;
475 white-space: nowrap;
471 color: @grey5;
476 color: @grey5;
472 cursor: pointer;
477 cursor: pointer;
473 }
478 }
474
479
475 &.select2-result-with-children {
480 &.select2-result-with-children {
476 margin: 0;
481 margin: 0;
477 padding: 0;
482 padding: 0;
478 }
483 }
479
484
480 &.select2-result-unselectable > .select2-result-label {
485 &.select2-result-unselectable > .select2-result-label {
481 margin: 0 8px;
486 margin: 0 8px;
482 }
487 }
483
488
484 }
489 }
485 }
490 }
486
491
487 ul.select2-result-sub {
492 ul.select2-result-sub {
488 margin: 0;
493 margin: 0;
489 padding: 0;
494 padding: 0;
490
495
491 li {
496 li {
492 display: block;
497 display: block;
493 margin: 0;
498 margin: 0;
494 border-right: none;
499 border-right: none;
495 line-height: 1em;
500 line-height: 1em;
496 font-family: @text-light;
501 font-family: @text-light;
497 color: @grey2;
502 color: @grey2;
498
503
499 &:before { content: none; }
504 &:before { content: none; }
500
505
501 &:hover {
506 &:hover {
502 background-color: @grey3;
507 background-color: @grey3;
503 }
508 }
504 }
509 }
505 }
510 }
506 }
511 }
507
512
508
513
509 #context-bar {
514 #context-bar {
510 display: block;
515 display: block;
511 margin: 0 auto;
516 margin: 0 auto;
512 padding: 0 @header-padding;
517 padding: 0 @header-padding;
513 background-color: @grey6;
518 background-color: @grey6;
514 border-bottom: @border-thickness solid @grey5;
519 border-bottom: @border-thickness solid @grey5;
515
520
516 .clear {
521 .clear {
517 clear: both;
522 clear: both;
518 }
523 }
519 }
524 }
520
525
521 ul#context-pages {
526 ul#context-pages {
522 li {
527 li {
523 line-height: 1em;
528 line-height: 1em;
524
529
525 &:before { content: none; }
530 &:before { content: none; }
526
531
527 a {
532 a {
528 color: @grey3;
533 color: @grey3;
529 }
534 }
530
535
531 &.active {
536 &.active {
532 // special case, non-variable color
537 // special case, non-variable color
533 border-bottom: 4px solid @nav-grey;
538 border-bottom: 4px solid @nav-grey;
534
539
535 a {
540 a {
536 color: @grey1;
541 color: @grey1;
537 }
542 }
538 }
543 }
539 }
544 }
540 }
545 }
541
546
542 // PAGINATION
547 // PAGINATION
543
548
544 .pagination {
549 .pagination {
545 border: @border-thickness solid @rcblue;
550 border: @border-thickness solid @rcblue;
546 color: @rcblue;
551 color: @rcblue;
547
552
548 .current {
553 .current {
549 color: @grey4;
554 color: @grey4;
550 }
555 }
551 }
556 }
552
557
553 .dataTables_paginate, .pagination-wh {
558 .dataTables_paginate, .pagination-wh {
554 text-align: left;
559 text-align: left;
555 display: inline-block;
560 display: inline-block;
556 border-left: 1px solid @rcblue;
561 border-left: 1px solid @rcblue;
557 float: none;
562 float: none;
558 overflow: hidden;
563 overflow: hidden;
559
564
560 .paginate_button, .pager_curpage,
565 .paginate_button, .pager_curpage,
561 .pager_link, .pg-previous, .pg-next, .pager_dotdot {
566 .pager_link, .pg-previous, .pg-next, .pager_dotdot {
562 display: inline-block;
567 display: inline-block;
563 padding: @menupadding/4 @menupadding;
568 padding: @menupadding/4 @menupadding;
564 border: 1px solid @rcblue;
569 border: 1px solid @rcblue;
565 border-left: 0;
570 border-left: 0;
566 color: @rcblue;
571 color: @rcblue;
567 cursor: pointer;
572 cursor: pointer;
568 float: left;
573 float: left;
569 }
574 }
570
575
571 .pager_curpage, .pager_dotdot,
576 .pager_curpage, .pager_dotdot,
572 .paginate_button.current, .paginate_button.disabled,
577 .paginate_button.current, .paginate_button.disabled,
573 .disabled {
578 .disabled {
574 color: @grey3;
579 color: @grey3;
575 cursor: default;
580 cursor: default;
576 }
581 }
577 }
582 }
578
583
579 // SIDEBAR
584 // SIDEBAR
580
585
581 .sidebar {
586 .sidebar {
582 .block-left;
587 .block-left;
583 clear: left;
588 clear: left;
584 max-width: @sidebar-width;
589 max-width: @sidebar-width;
585 margin-right: @sidebarpadding;
590 margin-right: @sidebarpadding;
586 padding-right: @sidebarpadding;
591 padding-right: @sidebarpadding;
587 font-family: @text-regular;
592 font-family: @text-regular;
588 color: @grey1;
593 color: @grey1;
589
594
590 &#graph_nodes {
595 &#graph_nodes {
591 clear:both;
596 clear:both;
592 width: auto;
597 width: auto;
593 margin-left: -100px;
598 margin-left: -100px;
594 padding: 0;
599 padding: 0;
595 border: none;
600 border: none;
596 }
601 }
597
602
598 .nav-pills {
603 .nav-pills {
599 margin: 0;
604 margin: 0;
600 }
605 }
601
606
602 .nav {
607 .nav {
603 list-style: none;
608 list-style: none;
604 padding: 0;
609 padding: 0;
605
610
606 li {
611 li {
607 padding-bottom: @menupadding;
612 padding-bottom: @menupadding;
608 line-height: 1em;
613 line-height: 1em;
609 color: @grey4;
614 color: @grey4;
610
615
611 &.active a {
616 &.active a {
612 color: @grey2;
617 color: @grey2;
613 }
618 }
614
619
615 a {
620 a {
616 color: @grey4;
621 color: @grey4;
617 }
622 }
618
623
619 &:before { content: none; }
624 &:before { content: none; }
620 }
625 }
621
626
622 }
627 }
623 }
628 }
General Comments 0
You need to be logged in to leave comments. Login now