fix for scroll padding
This commit is contained in:
parent
780301ed2d
commit
ff34556923
@ -96,6 +96,18 @@
|
|||||||
margin: $margin;
|
margin: $margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-- fix scroll issue
|
||||||
|
|
||||||
|
@mixin scroll-padding() {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
padding-top: $o-header-height + 10px;
|
||||||
|
margin-top: -$o-header-height - 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-- has_col
|
//-- has_col
|
||||||
|
|
||||||
@mixin pseudo-col(){
|
@mixin pseudo-col(){
|
||||||
|
@ -463,27 +463,17 @@ header.o_main_header{
|
|||||||
|
|
||||||
dt {
|
dt {
|
||||||
&:before {
|
&:before {
|
||||||
content: '';
|
@include scroll-padding()
|
||||||
display: block;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
padding-top: $o-header-height + 10px;
|
|
||||||
margin-top: -$o-header-height - 10px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
// This fixes the scroll position // BUT creates issues when buttons or links from the previous section are behind it
|
// This fixes the scroll position // BUT creates issues when buttons or links from the previous section are behind it
|
||||||
/* padding-top: $o-header-height;
|
// padding-top: $o-header-height;
|
||||||
margin-top: -$o-header-height; */
|
// margin-top: -$o-header-height; */
|
||||||
// adding a :before works better;
|
// adding a :before works better;
|
||||||
&:before {
|
&:before {
|
||||||
content: '';
|
@include scroll-padding()
|
||||||
display: block;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
padding-top: $o-header-height + 10px;
|
|
||||||
margin-top: -$o-header-height - 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> h1 {
|
> h1 {
|
||||||
|
Loading…
Reference in New Issue
Block a user