Generated with the help of an LLM.

Discovery and summary by human, analyzed with AI.

Problem/Motivation

Navigation top bar styles have:

.toolbar-dropdown__item + .toolbar-dropdown__item {
  border-top: 1px solid #d8dfea;
}
…
.toolbar-dropdown__menu {
  …
  background: white;
}

Default Admin overrides the styles to remove the border and set the background color to support dark mode.

For other themes, that becomes mandatory for dark mode because the whole top bar is hardcoded as white:

Navigation top bar hardcoded white

Here's the border:
Navigation top bar menu items border

The border is slightly visible when the menu links are outlined:
Navigation top bar menu items border selected

This is what bugs me:
Navigation top bar menu items border selected overlapping close up

Also, since the menu background color is hardcoded, it's one more thing to touch when adding dark mode support to a custom theme.

Proposed resolution

Replace hardcoded values with variables.

Remove the border entirely?

Remaining tasks

Decide whether to keep the border.

Release notes snippet

Issue fork drupal-3640494

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

mortona2k created an issue. See original summary.

mortona2k’s picture

Issue summary: View changes
StatusFileSize
new16.9 KB

Default Admin styles the navigation by overriding color variables, --admin-toolbar-color-*.

--admin-toolbar-color-white is set to --admin-color-bg-surface, which uses light-dark().

This MR sets background: var(--admin-toolbar-color-white) so other themes can set that variable for dark mode.

I think Navigation should use the semantic variables from Default Admin instead of repurposing color-white in dark mode.

mortona2k’s picture

Now the menu item border shares the color variable with these other borders.

Navigation borders color-gray-100

The gap in the navigation right border seems like another error. Maybe the right border style should go on the wrapper instead? (This happens in mobile width).

I am leaning towards removing the menu item border entirely.

mortona2k’s picture

Priority: Normal » Minor
Status: Active » Needs review

Last commit removes the border top between items.

Navigation border gap fixed in #3640523: Navigation border has gap in mobile width.

mortona2k’s picture