Dropdown text color overridden when setting navbar background (web_company_color)

Open
#3,362 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, scss
Domain
frontend, web-dev

Research direction

Start in web_company_color and inspect custom_colors.1.gen.scss around line 110 to trace how the navbar color settings affect .dropdown-item. Check the color picker entry points to understand how selected colors are stored and cleared. Done when navbar dropdown text retains its intended color and a chosen color can be cleared; the issue has had no comment for 233 days, so confirm someone will respond before starting.

Written by the indexing model from the issue text.

Description

bug

Steps to reproduce
1. Set Navbar Background color = #71639e
2. Set Navbar Background Hover color = #695c93
3. Save and reload the page

Current behavior
• The dropdown menu items change color unexpectedly.
• Specifically, the rule at line 110 in custom_colors.1.gen.scss sets:

.dropdown-item {
    color: #374151 !important;
}

This rule overrides the default (white) color of the dropdown text in the navbar, resulting in poor contrast and readability.

Expected behavior
• Dropdown items in the navbar should keep their original text color (white), or at least not be overridden by the color customization.
• The color rule should not apply to dropdowns inside the navbar.

Technical notes
The offending rule appears in custom_colors.1.gen.scss (line 110):

 .dropdown-item {
     color: #374151 !important;
 }

Additional issue
Once a color is set via the color picker, it cannot be unset or cleared (to revert to default behavior). There should be a way to remove a chosen color.

Environment
• Odoo version: 17.0
• Module: web_company_color
• Browser: Chrome / Firefox (any)
• Operating system: macOS

Summary:
The .dropdown-item { color: #374151 !important; } rule unintentionally overrides navbar dropdown text color when custom navbar colors are set.
Also, the color picker lacks an option to unset colors once defined.

Thanks in advance for taking a look! 🙏

Dominant language
JavaScript
Stars
1.2k
Forks
2.2k
Avg merge
3d 15h
Merged PRs (30d)
30

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OCA/web

All issues in OCA/web

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.