At the moment the CSS applied to the menu items are very general. All custom menu styling is affected by e.g.:

.menu-item:hover {
    background: #fff;
}
.menu-item:focus {
    background: #abeae4;
}
.menu-item--expanded .menu {
    background: #fff;
    width: auto;
    height: auto;
}
.menu-item--expanded {
    background-color: #f5f5f2;

}

To avoid making people override those styles, I would recommend to either scope those styles to be descendants of e.g. ".toolbar-bar" or MUCH BETTER to adhere to Drupal 8 CSS conventions and add modular classes like ".toolbar__menu-item".

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pixelmord created an issue. See original summary.

eme’s picture

Status: Active » Closed (duplicate)

Already fixed in dev version.

tanc’s picture

Status: Closed (duplicate) » Needs work

Dev version still exhibits this behaviour. Downloaded from project page, dated 2016-Feb-2. See also http://cgit.drupalcode.org/admin_toolbar/tree/css/admin.toolbar.css

eme’s picture

Priority: Normal » Major

Well indeed, there is a regression on this. Putting this on "Major". We've two major bug to fix for a quick new release.

matio89’s picture

Status: Needs work » Fixed

Hi,
We scope menu (item) CSS to admin_toolbar to avoid conflict.
View the 8.x-1.14 version:
https://www.drupal.org/node/2664674

echoz’s picture

Status: Fixed » Needs review
FileSize
4.27 KB

Patch is against 8.x-1.14 because the dev version does not have these latest changes(!).

Fixed the scope being too specific which lost some of the matching style on the vertical menu (back the way it was in 8.x-1.12).

Corrected to following CSS formatting guidelines.

mansspams’s picture

Please do patches against dev version. We need progress :)

echoz’s picture

Patch against dev version.
Added spacing corrections on admin_toolbar_tools css as well.

  • eme committed 72e3db4 on 8.x-1.x
    fix issue #2658896 and refactor and fix chevron-right.svg
    
eme’s picture

Status: Needs review » Fixed

I have refactored with PHPStorm the file, cleaned some things, added the .toolbar class and fix also some other minor issues (chevron).

echoz’s picture

Priority: Major » Normal
Status: Fixed » Needs work

@eme, I believe you need to set your editor to comply with CSS formatting guidelines of indentation, "Use 2 spaces for each level of indentation, the same standard as Drupal’s PHP and JavaScript code." This is what I pointed out, and patched in #6 and #8.

Also I still believe that using only the horizontal class in the first 4 declarations of admin.toolbar.css leaves out some matching styles on the vertical toolbar, than using just .toolbar does, as it was in 8.x-1.12.

The last submitted patch, 6: 2658896-6.patch, failed testing.

The last submitted patch, 8: 2658896-8.patch, failed testing.

eme’s picture

Status: Needs work » Closed (duplicate)

Let's focus on #2759519: comply with CSS formatting guidelines issue that is more advanced now. Thx.