From 2d9ac39c821ca21001f0bee3ca053bf2eab6a4f5 Mon Sep 17 00:00:00 2001 From: Mahmood Khalil Date: Sun, 8 Nov 2026 03:29:33 +0000 Subject: [PATCH] fix(labs): nav rail menu button doesn't stay pressed while expanded The built-in menu button of a collapsible md-gb-nav-rail kept the ripple's pressed state layer for as long as the rail was expanded, so it looked held down. The button opens and closes the rail, and its icon already changes between menu and menu_open to show the state. The pressed opacity is now 0 while aria-expanded is true, unless someone is pressing the button. --- labs/gb/components/navrail/nav-rail.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/labs/gb/components/navrail/nav-rail.scss b/labs/gb/components/navrail/nav-rail.scss index 5af65a3c28..4a86f3428c 100644 --- a/labs/gb/components/navrail/nav-rail.scss +++ b/labs/gb/components/navrail/nav-rail.scss @@ -126,6 +126,13 @@ --md-icon-color: var(--item-inactive-pressed-icon-color); color: var(--item-inactive-pressed-icon-color); } + + // The menu button discloses the expanded rail; it isn't a menu's + // invoker, so it doesn't hold the ripple's pressed layer while expanded + // (the icon changes instead: navigation-rail.md, Menu). + &[aria-expanded='true']:not(:active, .active) { + --ripple-press-opacity: 0%; + } } .nav-rail-items {