Problem/Motivation

In recent versions of the module (not just the alpha), there were some changes to the "is-active" CSS which is causing massive contrast conflicts - but not just "contrast" because it's treating it as black, hard-coded, but our environment indicator background color is black!

Steps to reproduce

Using Claro admin theme, Admin Toolbar, and the Environment Indicator Toolbar module. Set environment indicator background to black, foreground to white. Notice the .toolbar-item.is-active color is black.

Proposed resolution

Don't hard-code the color: #000 in toolbar.theme.css, use the CSS variable.

I'm not sure if this should be included in one of the other open issues, because it is CSS related but I didn't see anything specifically calling out the black.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jennypanighetti created an issue. See original summary.

jennypanighetti’s picture

Issue summary: View changes
trackleft2’s picture

Hi @jennypanighetti,

Thank you for opening this issue, the hard-coded color setting actually lives in the Claro theme, however as you can see in this file https://git.drupalcode.org/project/drupal/-/blob/11.x/core/themes/claro/... and your screenshot, the background color is also set there, and the environment_indicator module overrides that.

With that being said, I wonder if we could do something similar for the color that this module is doing for background color.

jennypanighetti’s picture

StatusFileSize
new60.54 KB

Thanks @trackleft2, you're right that the black is hard-coded in claro's toolbar.theme.css. However, the background-color with the variable is set in the toolbar.css CSS, but color is not specified. The color property is only specified in toolbar.css when a:not(.is-active).

trackleft2’s picture

Status: Active » Needs review

OK, I've updated the CSS in https://git.drupalcode.org/project/environment_indicator/-/merge_request.... Let me know what you think.

This build also has https://mr136-nkwkojheiiaxhjrcmu386j2ip3ssuwcy.tugboatqa.com/
username: admin
password: admin

jennypanighetti’s picture

Patch applies and my color is not lost! Thank you! :)

trackleft2’s picture

Status: Needs review » Reviewed & tested by the community

  • trackleft2 committed 816491bd on 5.0.x
    Issue #3538625 by trackleft2, jennypanighetti: Active state not using...
trackleft2’s picture

Status: Reviewed & tested by the community » Fixed

  • trackleft2 authored 71222084 on 4.x
    Issue #3538625 by trackleft2, jennypanighetti: Active state not using...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.