From 7415f9bbbd230eb6901a1a3eac513ffcfd53b6e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Lef=C3=A8vre?= Date: Fri, 26 May 2023 14:46:49 +0000 Subject: [PATCH] [FIX] spreadsheet: force light theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currenlyt, when using dark theme, spreadsheet is a mess. It's mostly light theme, with some dark theme elements (mostly coming from odoo components). There's even inputs where the text is white on a white background. o-spreadsheet code isn't prepared to handle dark theme. At all. There are hardcoded colors everywhere. Until we have a proper way to handle dark theme (use overridable scss variables, rely on bootstrap), we force light theme for all elements inside o-spreadsheet, including odoo components. The css rules aren't pretty, but at least the spreadsheet is usable. opw-3329765 closes odoo/odoo#123359 X-original-commit: 37a5f6a5b4b8ecbacf7a8ce4be822c6f348eb5da Signed-off-by: Rémi Rahir (rar) --- .../o_spreadsheet_extended.dark.scss | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 addons/spreadsheet/static/src/o_spreadsheet/o_spreadsheet_extended.dark.scss diff --git a/addons/spreadsheet/static/src/o_spreadsheet/o_spreadsheet_extended.dark.scss b/addons/spreadsheet/static/src/o_spreadsheet/o_spreadsheet_extended.dark.scss new file mode 100644 index 00000000000..9bc78b706f1 --- /dev/null +++ b/addons/spreadsheet/static/src/o_spreadsheet/o_spreadsheet_extended.dark.scss @@ -0,0 +1,26 @@ +// Force light theme for everything in o-spreadsheet until +// we have the proper scss tool chain to support dark theme properly +// in the library +.o-spreadsheet { + .o-filter-menu { + background-color: #fff !important; + } + .o_field_tags .badge { + background-color: #fff !important; + color: #777 !important; + } + .o_field_selector_chain_part { + background: #f6f7fa !important; + border-color: #d5dae8 !important; + } + input { + color: #333 !important; + } + .o_input { + color: #777 !important; + } + .o_domain_leaf_info { + background: #f6f7fa !important; + border-color: #d5dae8 !important; + } +}