Clean up fixed navbar

This commit is contained in:
Annabel Dunstone Gray 2017-05-12 09:42:09 -05:00
parent 0278b91203
commit b29414dfc0
3 changed files with 9 additions and 6 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -689,7 +689,7 @@
}
.merge-request-tabs-holder {
top: 0;
top: $header-height;
z-index: 10;
background-color: $white-light;