From 412117c2a789a24191cda040614d01fe290e77cc Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 28 Aug 2019 12:39:38 +0000 Subject: [PATCH] [FIX] website: restore background sizing of fixed parallax backgrounds Fixed backgrounds are disabled when using a mobile/tablet device, which is not a big deal but, on some of them (iOS...), defining the background as fixed breaks the background-size/position props. So we enable this only for >= XL devices. We may want to find a better alternative for future versions. opw-2055073 closes odoo/odoo#36187 Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/scss/website.scss | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index 421a1768992..71c0d9c9ed4 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -847,8 +847,14 @@ table.table_desc tr td { background-color: inherit; } } - &.s_parallax_is_fixed > .s_parallax_bg { - background-attachment: fixed; + @include media-breakpoint-up(xl) { + // Fixed backgrounds are disabled when using a mobile/tablet device, + // which is not a big deal but, on some of them (iOS...), defining the + // background as fixed breaks the background-size/position props. + // So we enable this only for >= XL devices. + &.s_parallax_is_fixed > .s_parallax_bg { + background-attachment: fixed; + } } }