Clean up fixed navbar
This commit is contained in:
parent
0278b91203
commit
b29414dfc0
|
@ -48,8 +48,11 @@ import _ from 'underscore';
|
|||
});
|
||||
|
||||
function applyScrollNavClass() {
|
||||
$('.navbar-border').css('opacity', $(window).scrollTop() / 40);
|
||||
const scrollOpacityHeight = 40;
|
||||
$('.navbar-border').css('opacity', Math.min($(window).scrollTop() / scrollOpacityHeight, 1));
|
||||
}
|
||||
|
||||
$(window).scroll(_.throttle(applyScrollNavClass, 100));
|
||||
$(() => {
|
||||
$(window).on('scroll', _.throttle(applyScrollNavClass, 100));
|
||||
});
|
||||
}).call(window);
|
||||
|
|
|
@ -116,10 +116,10 @@ header {
|
|||
|
||||
.navbar-border {
|
||||
height: 1px;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: $border-color;
|
||||
opacity: 0;
|
||||
}
|
||||
|
|
|
@ -689,7 +689,7 @@
|
|||
}
|
||||
|
||||
.merge-request-tabs-holder {
|
||||
top: 0;
|
||||
top: $header-height;
|
||||
z-index: 10;
|
||||
background-color: $white-light;
|
||||
|
||||
|
|
Loading…
Reference in New Issue