From cc527f63d788f2b3a0acdba2e8c00a310f483d5c Mon Sep 17 00:00:00 2001 From: Youzini-afk <13153778771cx@gmail.com> Date: Wed, 29 Apr 2026 17:34:09 +0800 Subject: [PATCH] fix(notice): compact layout -- hide message/actions with display:none to prevent flex width pollution The hidden __message (max-height:0, opacity:0) still had white-space: pre-wrap which contributed to flex intrinsic width calculation in compact layout, causing the __content flex container to miscalculate width and truncate the title to 'ST...'. Also add flex:0 1 auto + min-width:0 to compact __title so it properly shrinks with ellipsis instead of overflow when space is limited. --- ui/notice.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/notice.js b/ui/notice.js index 567bfe6..2811ab7 100644 --- a/ui/notice.js +++ b/ui/notice.js @@ -88,6 +88,7 @@ function ensureStyle(doc) { .st-bme-notice[data-layout="compact"] .st-bme-notice__content { display: flex; align-items: center; + min-width: 0; overflow: hidden; } @@ -107,6 +108,8 @@ function ensureStyle(doc) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + flex: 0 1 auto; + min-width: 0; } .st-bme-notice__message { @@ -131,6 +134,7 @@ function ensureStyle(doc) { max-height: 0; opacity: 0; margin-top: 0; + display: none; } .st-bme-notice::after { @@ -271,6 +275,7 @@ function ensureStyle(doc) { opacity: 0; margin-top: 0; overflow: hidden; + display: none; } .st-bme-notice[data-layout="normal"] .st-bme-notice__actions {