Better main panel centering
This commit is contained in:
parent
5cad990705
commit
221c36268e
|
|
@ -346,6 +346,7 @@
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
margin-bottom: 3px;
|
||||||
margin-left: 7px;
|
margin-left: 7px;
|
||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -721,10 +721,10 @@ var tarteaucitron = {
|
||||||
if (document.getElementById('tarteaucitronScrollbarParent') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) {
|
if (document.getElementById('tarteaucitronScrollbarParent') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) {
|
||||||
|
|
||||||
// media query
|
// media query
|
||||||
if (e[a + 'Width'] <= 767) {
|
if (e[a + 'Width'] <= 479) {
|
||||||
scrollbarMarginRight = 12;
|
|
||||||
} else if (e[a + 'Width'] <= 479) {
|
|
||||||
tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginLeft', '11px');
|
tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginLeft', '11px');
|
||||||
|
} else if (e[a + 'Width'] <= 767) {
|
||||||
|
scrollbarMarginRight = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollbarWidthParent = document.getElementById('tarteaucitronScrollbarParent').offsetWidth;
|
scrollbarWidthParent = document.getElementById('tarteaucitronScrollbarParent').offsetWidth;
|
||||||
|
|
@ -746,6 +746,14 @@ var tarteaucitron = {
|
||||||
if (mainTop < 0) {
|
if (mainTop < 0) {
|
||||||
mainTop = 0;
|
mainTop = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (document.getElementById('tarteaucitronMainLineOffset') !== null) {
|
||||||
|
if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 3)) {
|
||||||
|
mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// apply
|
||||||
tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
|
tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue