mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 22:30:38 +08:00
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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user