From da8fec249a31a7c987ca6cdfbb0639c8be2af6c8 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 18 Oct 2023 14:20:38 +0200 Subject: [PATCH] [IMP] web_editor: make oe-toolbar design closer to right panel select The code of this commit is ugly: it only forces extra new rules to make dropdowns in the right panel toolbar closer to the we-select design. This should be refactored. Mass mailing should have the same visual, CSS rules should be shared, etc etc. task-1958098 Part-of: odoo/odoo#129791 --- .../static/src/scss/wysiwyg_snippets.scss | 27 +++++++++++++++++++ addons/web_editor/static/src/xml/editor.xml | 24 ++++++++--------- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/addons/web_editor/static/src/scss/wysiwyg_snippets.scss b/addons/web_editor/static/src/scss/wysiwyg_snippets.scss index 4850fc0b725..c36f44e4fc3 100644 --- a/addons/web_editor/static/src/scss/wysiwyg_snippets.scss +++ b/addons/web_editor/static/src/scss/wysiwyg_snippets.scss @@ -516,6 +516,33 @@ padding: ($o-we-sidebar-content-field-height * .12) ($o-we-sidebar-content-field-button-group-button-spacing - 2.5); } + .dropdown-menu { + border-color: $o-we-sidebar-content-field-dropdown-border-color; + padding: 0; + + > li ~ li { + border-top: $o-we-sidebar-content-field-dropdown-item-spacing solid transparent; + } + } + + .dropdown-item { + @include we-icon-button('', $align: left); // Always a padding on the left + background-color: $o-we-sidebar-content-field-dropdown-item-bg; + color: $o-we-sidebar-content-field-dropdown-item-color; + border-radius: 0; + padding-top: 5px; + padding-bottom: 5px; + + &:hover, &:focus { + background: $o-we-dropdown-item-bg-hover; + color: $o-we-dropdown-item-hover-color; + } + } + + .o_we_font_size_badge { + opacity: 0.6; + } + #font-size > button { &:focus-within { @extend %we-generic-text-input; diff --git a/addons/web_editor/static/src/xml/editor.xml b/addons/web_editor/static/src/xml/editor.xml index 13f0c9bbb4b..0e8cf1f7fd1 100644 --- a/addons/web_editor/static/src/xml/editor.xml +++ b/addons/web_editor/static/src/xml/editor.xml @@ -101,18 +101,18 @@