diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index 3d9183a6344..f6727542b73 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -2810,6 +2810,24 @@ options.registry.HeaderBox = options.registry.Box.extend({ } return this._super(...arguments); }, + + //-------------------------------------------------------------------------- + // Private + //-------------------------------------------------------------------------- + + /** + * @override + */ + async _computeWidgetState(methodName, params) { + const value = await this._super(...arguments); + if (methodName === "selectStyle" && params.cssProperty === "border-width") { + // One-sided borders return "0px 0px 3px 0px", which prevents the + // option from being displayed properly. We only keep the affected + // border. + return value.replace(/(^|\s)0px/gi, "").trim() || value; + } + return value; + }, }); options.registry.CookiesBar = options.registry.SnippetPopup.extend({ diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index 772495500b6..2d942c05b19 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -1104,7 +1104,15 @@ header { nav.navbar { @if o-website-value('menu-border-width') { - border: o-website-value('menu-border-width') o-website-value('menu-border-style') o-color('menu-border-color') !important; + border: o-website-value('menu-border-style') o-color('menu-border-color') !important; + border-width: 0 0 o-website-value('menu-border-width') 0 !important; + + &.o_border_right_only { + border-width: 0 o-website-value('menu-border-width') 0 0 !important; + } + &.o_full_border { + border-width: o-website-value('menu-border-width') !important; + } } border-radius: o-website-value('menu-border-radius') !important; box-shadow: o-website-value('menu-box-shadow') !important; diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index cd49d63806b..64bd7b24998 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -1285,7 +1285,7 @@ - +