Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu color issue when logged in #3961

Open
danahertzberg opened this issue Jan 3, 2025 · 2 comments
Open

Menu color issue when logged in #3961

danahertzberg opened this issue Jan 3, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@danahertzberg
Copy link
Contributor

Problem/Motivation

The menu of the admin UI has some unintentionally changed CSS.

Describe the bug

Colors are wrong.

To Reproduce

Steps to reproduce the behavior:

  1. Log into a site
  2. Observe "Manage" or "Shortcuts" menu links

Proposed resolution

Fix CSS

Expected behavior

Colors should not be changed

Screenshots

Previous
Screenshot 2025-01-03 at 1 13 53 PM

Current
Screenshot 2025-01-03 at 1 14 29 PM

@bberndt-uaz
Copy link
Contributor

This bug was introduced with our update of the Environment Indicator module:

In Quickstart, the background color for the toolbar item is now being set using a style attribute, which overrides the CSS for the active item from our Claro admin theme. See https://git.drupalcode.org/project/environment_indicator/-/compare/4.0.10...4.0.21#55fafbc2642fc8afec43c881d5e1a8f03dfbe9e0_20_21:

$('.toolbar .toolbar-bar .toolbar-tab > .toolbar-item').css('background-color', settings.environmentIndicator.bgColor);

The CSS that is being overridden: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/toolbar/css/toolbar.theme.css#L49-53.

.toolbar .toolbar-bar .toolbar-tab > .toolbar-item.is-active {
  color: #000;
  border-bottom: 1px solid #ddd;
  background-color: #fff;
}

I believe the change came from this Environment Indicator issue (resolved with 4.0.20):

This issue seems related, but it only changed the handling of the text color (the foreground color):

Finally, this issue that @trackleft created would update the module to use CSS variables rather than setting style attributes on elements:

@trackleft
Copy link
Member

Thank you for your synopsis @bberndt-uaz, that environment indicator module is a mess, but slowly heading in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

3 participants