Problem/Motivation
It looks like the Navigation module CSS reset in #3511280: Front-end theme styles can bleed into Navigation broke the block edit contextual menus in the navigation sidebar. I reached the conclusion because commenting out / disabling the all: revert; in that CSS restored the contextual menus display.
I'm calling this Major because when the pointer is moved to the menu to click an option (such as "Configure"), the layout shifts to hide the menu and it's not obvious that it's possible to scroll down.
There is the shadow at the bottom of the section, but it's subtle and isn't visible in forced-colors mode. I didn't see it at first myself.
Here are a couple of screenshots. The second is when the pointer is over the menu. It includes the entire section and shows how the menu options get hidden.


Steps to reproduce
- Install with standard profile.
- Log in as an admin.
- Enable the Navigation module.
- Navigate to
/admin/config/user-interface/navigation-block. - Ensure that the "desktop" version of the navigation sidebar is visible and expanded (in wide mode).
- Click the "Enable edit mode" button.
- Move the pointer over the top section of the navigation sidebar.
Proposed resolution
Fix the contextual module CSS per the change record for #3511280: Front-end theme styles can bleed into Navigation.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | Screenshot 2026-01-27 at 11.59.01 AM.png | 83.02 KB | godotislate |
| Screenshot 2025-12-30 at 4.01.35 PM.png | 33.51 KB | kentr | |
| Screenshot 2025-12-30 at 4.01.25 PM.png | 33.49 KB | kentr |
Issue fork drupal-3565213
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:
- 3565213-adjust-contextual-css
changes, plain diff MR !14511
Comments
Comment #2
kentr commentedComment #3
kentr commentedComment #4
kentr commentedComment #5
kentr commentedA quick and dirty experiment indicates that using the specificity hack outlined in the change record does work.
Here's what I have in devtools. It might make sense to nest the entire contents of each contextual CSS file inside one instance of the specificity hack per file.
Comment #6
catchComment #7
kentr commentedAny change here should also be tested with Gin to prevent overriding Gin's CSS like in #3560487: Gin Top Bar styling is fully gone in 11.3.x.
Comment #8
anybodyHere's another effect: https://www.drupal.org/project/1828986/issues/3568847
Comment #11
finnsky commentedI added a softer reset using :where() as it was before
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:where
---
In general, I think this race will never end.
If we count the number of CSS properties that can be added to links and multiply them by the number of components that can be added to the Navigation, we get an infinite number of problems that we will have to solve. And increasing specificity doesn't help much here.
---
Therefore, it seems that the only normal solution will be to use fully encapsulated web components.
https://www.drupal.org/project/drupal/issues/3534298
Comment #13
finnsky commentedComment #14
finnsky commentedI think the problem here is not with contextual links, but with the navigation module.
Comment #15
godotislateTest the MR and the the contextual links look correct now:
I also tested for regression from #3511280: Front-end theme styles can bleed into Navigation, but adding this rule to Umami base.css did not seem to leak into navigation:
I'm RTBC +1, but reading up on
:whereon MDN, I don't know if the lowered specificity might be vulnerable to certain kinds of FE theme CSS rules leaking in, though I have not been able to cause that without more specific rules like:Comment #20
lauriiiCommitted! 🚀 Thank you everyone!