Toolbar active tab background is always white on Drupal 10.3

Created on 24 June 2024, 5 days ago
Updated 25 June 2024, 4 days ago

Problem/Motivation

After updating a site to Drupal 10.3, the active tab on our production environment has turned white-on-white. On dev, where the text colour is black, the active tab text *is* readable as black on white. The other tabs remain the configured colour for their environment.

This seems to be courtesy of .toolbar .toolbar-bar .toolbar-tab > .toolbar-item.is-active { in toolbar.theme.css in core.

Steps to reproduce

Configure colours for the environment on Drupal 10.2. See the active tab background be the configured colour. Update to Drupal 10.3.0. See the active tab background is now white.

Proposed resolution

Add an override to the css so that the active tab goes back to the colour that was configured in env indicator.

Remaining tasks

Pretty much all the work.

User interface changes

Ideally none.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Fixed

Version

4.0

Component

User interface

Created by

🇦🇺Australia cafuego

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @cafuego
  • 🇮🇳India amit.mall

    @cafuego, overding color will not solve the issue in all cases, since we have made that section configrable from backend. So it's better not to change color of active tab. I have add exclude the active tab for color change, this will solve the issue. Find the patch for same

  • Status changed to Needs review 5 days ago
  • Status changed to Needs work 4 days ago
  • 🇦🇷Argentina dagmar Argentina

    Patch #3 does not work for me:

  • Status changed to Needs review 4 days ago
  • 🇦🇷Argentina dagmar Argentina
    $config['environment_indicator.indicator']['bg_color'] = '#00a073';
    $config['environment_indicator.indicator']['fg_color'] = '#ffffff';
    

    With this configuration and this patch I see this.

  • 🇩🇪Germany rauch

    With this patch, the font color of the active tab is ok at page load. But switching tabs by clicking e.g. from "Manage" to "Admin" then the foreground color is used again (on my site white) and the font is not visible.

  • 🇩🇪Germany rauch

    Patch #6 is working on my site. Thanks.

    • isholgueras committed 088b13fa on 4.x
      Issue #3456599 by dagmar, amit.mall, cafuego, rauch: Toolbar active tab...
  • Status changed to Fixed 4 days ago
  • 🇪🇸Spain isholgueras

    I've reproduced the issue on 10.2, the patch #6 applies and fixes the issue.

    Committed to 4.x and I will include it in the next release.

    Thanks!

  • 🇦🇺Australia cafuego

    Gracias! :-)

Production build 0.69.0 2024