From 6d4389ca8bddd5bc162cf9da3dd5784446b96309 Mon Sep 17 00:00:00 2001 From: Elisabeth Dickinson Date: Mon, 22 Mar 2021 12:28:50 +0100 Subject: [PATCH] [FIX] scrolling issue fixed! No need for JS: AMEN --- extensions/odoo_theme/static/style.scss | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/extensions/odoo_theme/static/style.scss b/extensions/odoo_theme/static/style.scss index f8426df2b..121f4e244 100644 --- a/extensions/odoo_theme/static/style.scss +++ b/extensions/odoo_theme/static/style.scss @@ -17,6 +17,12 @@ body { dd { margin-left: 1rem; } + // This fixes the scroll position on all elements, including refs + :target { + &:before { + @include scroll-padding() + } + } } .hidden { @@ -528,14 +534,6 @@ header.o_main_header{ } 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; */ - // adding a :before works better; - &:before { - @include scroll-padding() - } - > h1 { color: $o-violet-dark; font-weight: $fw_bold;