diff options
| author | Benjamin Vray <bvr@odoo.com> | 2020-09-10 14:24:24 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-09-25 10:31:43 +0000 |
| commit | 6e1c2ad5db69fe7eaa8f53c8da8375435b59f486 (patch) | |
| tree | 30dab8c1be5c4c2461f1a6ec761793a1fcbf8a21 /addons/website/static/src/scss/website.scss | |
| parent | fd838a3d87f5bd326921dd15c2a41c3d1d3dd131 (diff) | |
[FIX] website: fix off-canvas menu when header is affixed
Before this commit the layout of the off-canvas menu was broken with an
affixed header.
task-2312878
closes odoo/odoo#57442
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src/scss/website.scss')
| -rw-r--r-- | addons/website/static/src/scss/website.scss | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index 629f2b67573..1d36d5e7819 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -863,9 +863,13 @@ header { #top_menu_collapse { &.collapsing, &.show { + // Note: position relatively to the header instead of the viewport + // because fixed position cannot work inside an element whose CSS + // transform is different to none, which the header element is + // because of header effects. @include o-position-absolute(0, 0, 0, 0); - position: fixed; z-index: $zindex-sticky; + height: 100vh; transition: none; transform: none; @@ -950,9 +954,9 @@ header { } } - .o_connected_user:not(.editor_has_snippets) header:not(.o_header_is_scrolled) &, - .o_connected_user:not(.editor_has_snippets) header.o_header_affixed & { - padding-top: $o-navbar-height !important; + .o_connected_user:not(.editor_has_snippets) header & { + top: -$o-navbar-height; + padding-top: $o-navbar-height; } } &.collapsing #top_menu { |
