fix: alert banner — 'Spiega' button and title layout
- explainBannerAnomaly: querySelector('#alert-banner .banner-detail')
was wrong (class is 'alert-banner-detail'); function returned null → no-op.
Fixed to getElementById('alert-banner-detail').
- alert-banner-inner: position close button absolutely (top:10px right:10px)
so it is removed from the flex row and can never push the title-body to
collapse or wrap under it. Inner gets padding-right:44px to reserve space.
- alert-banner-body: flex:1 1 0 + overflow:hidden for robust sizing
- alert-banner-title: word-break/overflow-wrap so very long product names
wrap cleanly inside the body instead of overflowing
This commit is contained in:
+10
-3
@@ -4915,7 +4915,8 @@ body.cooking-mode-active .app-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
padding: 12px 12px 8px;
|
||||
padding: 12px 44px 8px 12px; /* right pad reserves space for abs-positioned close btn */
|
||||
position: relative;
|
||||
}
|
||||
.alert-banner-icon {
|
||||
font-size: 1.5rem;
|
||||
@@ -4923,14 +4924,17 @@ body.cooking-mode-active .app-header {
|
||||
line-height: 1;
|
||||
}
|
||||
.alert-banner-body {
|
||||
flex: 1;
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.alert-banner-title {
|
||||
font-weight: 700;
|
||||
font-size: 0.95rem;
|
||||
color: #92400e;
|
||||
line-height: 1.3;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.banner-prediction .alert-banner-title {
|
||||
color: #5b21b6;
|
||||
@@ -4942,7 +4946,9 @@ body.cooking-mode-active .app-header {
|
||||
line-height: 1.4;
|
||||
}
|
||||
.alert-banner-close {
|
||||
flex-shrink: 0;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
@@ -4954,6 +4960,7 @@ body.cooking-mode-active .app-header {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #78716c;
|
||||
z-index: 1;
|
||||
}
|
||||
.alert-banner-actions {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user