From aee958b1ff66441cc11effc6261655af9c9b211a Mon Sep 17 00:00:00 2001 From: Elisabeth Dickinson Date: Thu, 16 Jun 2022 16:04:45 +0200 Subject: [PATCH] [FIX] odoo_theme: fix scrollTo margin/padding with new headers height The scroll padding needed increasing with the new sub-header. Unnecessary calc() and parenthesis on the headers-height variable are removed. X-original-commit: 0b536debac2f85a5b504a0ac545f04ac603acdb9 --- extensions/odoo_theme/static/scss/_mixins.scss | 4 ++-- extensions/odoo_theme/static/scss/_variables.scss | 6 +++--- extensions/odoo_theme/static/style.scss | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extensions/odoo_theme/static/scss/_mixins.scss b/extensions/odoo_theme/static/scss/_mixins.scss index 630fe125d..55b328b8d 100644 --- a/extensions/odoo_theme/static/scss/_mixins.scss +++ b/extensions/odoo_theme/static/scss/_mixins.scss @@ -103,8 +103,8 @@ display: block; width: 0; height: 0; - padding-top: $o-header-height + 10px; - margin-top: -$o-header-height - 10px; + padding-top: calc(#{$o-headers-height} + 10px); + margin-top: -$o-headers-height - 10px; } diff --git a/extensions/odoo_theme/static/scss/_variables.scss b/extensions/odoo_theme/static/scss/_variables.scss index 2ae991715..89eef1014 100644 --- a/extensions/odoo_theme/static/scss/_variables.scss +++ b/extensions/odoo_theme/static/scss/_variables.scss @@ -235,10 +235,10 @@ $o-header-mobile-height: 50px; $o-header-height: 80px; $o-header-white: #ffffff; -$o-subheader-height: calc(#{$o-header-height}/2.5); +$o-subheader-height: 32px; -$o-headers-mobile-height: calc(#{$o-header-mobile-height} + (#{$o-subheader-height})); -$o-headers-height: calc(#{$o-header-height} + #{$o-subheader-height}); +$o-headers-mobile-height: $o-header-mobile-height + $o-subheader-height; +$o-headers-height: $o-header-height + $o-subheader-height; // Navigation $o-side-nav-width: 350px; $o-on-page-width: 20%; diff --git a/extensions/odoo_theme/static/style.scss b/extensions/odoo_theme/static/style.scss index ab9b29687..3822a69b3 100644 --- a/extensions/odoo_theme/static/style.scss +++ b/extensions/odoo_theme/static/style.scss @@ -207,7 +207,7 @@ header { } .o_side_nav-inner { width: 90%; - height: calc(100% - (#{$o-headers-mobile-height}); + height: calc(100% - #{$o-headers-mobile-height}); overflow-y: auto; position: fixed; left: -100%; @@ -220,7 +220,7 @@ header { font-weight: $fw_regular; @include media-breakpoint-up(lg) { width: $o-side-nav-width; - height: calc(100vh - (#{$o-headers-height})); + height: calc(100vh - #{$o-headers-height}); left: 0; padding-top: $padding-m; padding-left: $padding-m;