Skip to content

Commit 98ae013

Browse files
pgaskinappleboy
authored andcommitted
Make navbar scroll on overflow (#1777)
* Scrollbars on overflow of horizontal nav * Update _base.less * Add fade out on right side of overflowing nav * Update _base.less
1 parent 7b907ed commit 98ae013

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

public/css/index.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,42 @@ footer .ui.language .menu {
428428
background-color: #FAFAFA !important;
429429
border-width: 1px !important;
430430
}
431+
@media only screen and (max-width: 1200px) {
432+
.ui.menu.new-menu {
433+
overflow-x: auto !important;
434+
justify-content: left !important;
435+
padding-bottom: 5px;
436+
}
437+
.ui.menu.new-menu::-webkit-scrollbar {
438+
height: 8px;
439+
display: none;
440+
}
441+
.ui.menu.new-menu:hover::-webkit-scrollbar {
442+
display: block;
443+
}
444+
.ui.menu.new-menu::-webkit-scrollbar-track {
445+
background: rgba(0,0,0,0.01);
446+
}
447+
.ui.menu.new-menu::-webkit-scrollbar-thumb {
448+
background:rgba(0,0,0,0.2);
449+
}
450+
.ui.menu.new-menu:after {
451+
position: absolute;
452+
margin-top: -15px;
453+
display: block;
454+
background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 100%);
455+
content: ' ';
456+
right: 0;
457+
height: 53px;
458+
z-index: 1000;
459+
width: 60px;
460+
clear: none;
461+
visibility: visible;
462+
}
463+
.ui.menu.new-menu a.item:last-child {
464+
padding-right: 30px !important;
465+
}
466+
}
431467
.markdown:not(code) {
432468
overflow: hidden;
433469
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;

public/less/_base.less

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,3 +420,40 @@ footer {
420420
background-color: #FAFAFA !important;
421421
border-width: 1px !important;
422422
}
423+
424+
@media only screen and (max-width: 1200px) {
425+
.ui.menu.new-menu {
426+
overflow-x: auto !important;
427+
justify-content: left !important;
428+
padding-bottom: 5px;
429+
}
430+
.ui.menu.new-menu::-webkit-scrollbar {
431+
height: 8px;
432+
display: none;
433+
}
434+
.ui.menu.new-menu:hover::-webkit-scrollbar {
435+
display: block;
436+
}
437+
.ui.menu.new-menu::-webkit-scrollbar-track {
438+
background: rgba(0,0,0,0.01);
439+
}
440+
.ui.menu.new-menu::-webkit-scrollbar-thumb {
441+
background:rgba(0,0,0,0.2);
442+
}
443+
.ui.menu.new-menu:after {
444+
position: absolute;
445+
margin-top: -15px;
446+
display: block;
447+
background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 100%);
448+
content: ' ';
449+
right: 0;
450+
height: 53px;
451+
z-index: 1000;
452+
width: 60px;
453+
clear: none;
454+
visibility: visible;
455+
}
456+
.ui.menu.new-menu a.item:last-child {
457+
padding-right: 30px !important;
458+
}
459+
}

0 commit comments

Comments
 (0)