diff --git a/extensions/odoo_theme/static/scss/_mixins.scss b/extensions/odoo_theme/static/scss/_mixins.scss index dff9fd41e..79221bfbf 100644 --- a/extensions/odoo_theme/static/scss/_mixins.scss +++ b/extensions/odoo_theme/static/scss/_mixins.scss @@ -96,6 +96,18 @@ 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 @mixin pseudo-col(){ diff --git a/extensions/odoo_theme/static/style.scss b/extensions/odoo_theme/static/style.scss index e1b2d3b4c..776b111ab 100644 --- a/extensions/odoo_theme/static/style.scss +++ b/extensions/odoo_theme/static/style.scss @@ -463,27 +463,17 @@ header.o_main_header{ dt { &:before { - content: ''; - display: block; - width: 0; - height: 0; - padding-top: $o-header-height + 10px; - margin-top: -$o-header-height - 10px; + @include scroll-padding() } } section { // This fixes the scroll position // BUT creates issues when buttons or links from the previous section are behind it - /* padding-top: $o-header-height; - margin-top: -$o-header-height; */ + // padding-top: $o-header-height; + // margin-top: -$o-header-height; */ // adding a :before works better; &:before { - content: ''; - display: block; - width: 0; - height: 0; - padding-top: $o-header-height + 10px; - margin-top: -$o-header-height - 10px; + @include scroll-padding() } > h1 {