Updating from 4.0.19 to 4.0.21 changes the foreground color on non-admin pages

Created on 5 February 2025, 2 months ago

Problem/Motivation

When I updated from 4.0.19 to 4.0.21, the font color in my admin toolbar was changed so now nothing is visible when I'm logged in but on any page on my site except for admin pages. The environment indicator isn't applying at all on these pages, but that's a separate issue unrelated to the update to 4.0.21.

4.0.19 on the left and 4.0.21 on the right in the screenshot.

The environment indicator displays as expected in the toolbar on admin pages.

I'm using gin_toolbar 8.x-1.0.

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States capysara

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

Comments & Activities

  • Issue created by @capysara
  • I install this module but i am not getting any error like this
    Drupal - 10.1.8
    php -8.1.14

  • πŸ‡ͺπŸ‡ΈSpain isholgueras

    Hi @capysara,

    I cannot reproduce the issue. I've set the bg_color and fg_color and all works well. Can you give more steps to reproduce?

  • πŸ‡ΊπŸ‡ΈUnited States capysara

    Thanks for taking a look!

    I think that there's something in my custom theme that's interfering, but I'm not sure what yet. If it turns out that it's just me, then I will close out this ticket. If I find that I have some edge case with this module, then I'll update with steps to reproduce.

  • πŸ‡ΊπŸ‡ΈUnited States jds1 Hudson Valley, NY

    I'm also having this issue and it's really weird. It's definitely the custom theme because everything looks OK with Olivero, but there are no references to "toolbar" in the custom theme. I'll keep digging and update here if I find anything.

  • πŸ‡ΊπŸ‡ΈUnited States jds1 Hudson Valley, NY

    OK yeah I cannot find anything that would be causing this in my theme. Also when I set the colors using Environment Indicator UI the text is still updated to black. The behavior is exactly the same even if I comment out the `environment_indicator.indicator` lines in my `settings.php`.

    This is not an issue on 4.0.19 and it is an issue on 4.0.21, and I'm pretty sure it's related to https://www.drupal.org/project/environment_indicator/issues/3463388 πŸ› fgColor not being picked up. RTBC . Since 4.0.21 was a bugfix release this was likely introduced in 4.0.20.

    My admin theme is Claro and it looks good when I'm on Claro admin pages but not when I'm looking at the theme. If I switch my administration theme to Olivero the same issue happens, so it's def. not bc of Claro. If I comment out the code introduced in issue 346388 (lines 20-26 of `environment_indicator.js`) the issue is resolved for me. Going to stay on 4.0.19 for now.

  • πŸ‡ΊπŸ‡ΈUnited States trackleft2 Tucson, AZ πŸ‡ΊπŸ‡Έ

    Please review πŸ“Œ Update module to use CSS variables instead of adding inline CSS. Active as it should be considered the long term fix for this.

Production build 0.71.5 2024