From a2dc68b014cc6415273bc70f4533406b4f9579a9 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Wed, 2 Sep 2026 17:11:36 +0800 Subject: [PATCH] style: update the width of history dropdown --- packages/react/src/html/ui/index.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/react/src/html/ui/index.css b/packages/react/src/html/ui/index.css index e385a3eb2..5678b7eee 100644 --- a/packages/react/src/html/ui/index.css +++ b/packages/react/src/html/ui/index.css @@ -122,6 +122,12 @@ main { div[role='menu'] { left: 0; + /* Shrink the dropdown to fit its content instead of the fixed + * width set by @node-core/ui-components (nodejs/doc-kit#1051) */ + width: fit-content; + min-width: 12rem; + max-width: 20rem; + /* Prevent long labels from overflowing dropdown width */ a[role='menuitem'] div { overflow-wrap: anywhere;