Skip to content

Commit 4f8e30d

Browse files
Maffoochclaude
andauthored
fix(ui): style OS promo banner dismiss button in classic UI (#15332)
The open-source "Go Pro" promo banner (data-source="os") renders from identical markup in both the classic (Bootstrap) and Tailwind base templates, but the classic stylesheet was missing the OS-banner-specific CSS the Tailwind stylesheet already had. As a result the dismiss control fell back to a bulky default browser button and the banner row was not laid out consistently. Port the same OS-banner block into classic/dojo.css so both UIs render the banner identically: a single centered row (dismiss ×, headline, expand caret) with a compact bordered dismiss button, and the expanded message dropping to its own full-width row. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 98cbd69 commit 4f8e30d

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

dojo/static/dojo/css/classic/dojo.css

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,51 @@ div.custom-search-form {
11611161
margin-top: 8px;
11621162
}
11631163

1164+
/* OS message banner dismiss (×): inline, grouped with the headline/caret
1165+
(not floated into the empty right side). Scoped so it only affects the
1166+
OS promo banner, which is the only banner carrying these classes. */
1167+
/* Lay out the OS promo banner as a single centered row so the dismiss button,
1168+
headline, and expand caret line up vertically. Scoped to data-source="os"
1169+
so the other banners are untouched. */
1170+
.announcement-banner[data-source="os"] {
1171+
display: flex;
1172+
align-items: center;
1173+
flex-wrap: wrap;
1174+
}
1175+
1176+
.announcement-banner[data-source="os"] .banner-expanded {
1177+
flex-basis: 100%; /* expanded text drops to its own row */
1178+
}
1179+
1180+
.announcement-banner .os-message-dismiss-form {
1181+
display: inline-flex;
1182+
margin-right: 10px;
1183+
}
1184+
1185+
.announcement-banner .os-message-dismiss {
1186+
display: inline-flex;
1187+
align-items: center;
1188+
justify-content: center;
1189+
width: 18px;
1190+
height: 18px;
1191+
padding: 0;
1192+
background: transparent;
1193+
border: 1px solid rgba(0, 0, 0, 0.3);
1194+
border-radius: 3px;
1195+
color: inherit;
1196+
cursor: pointer;
1197+
font-size: 13px;
1198+
line-height: 1;
1199+
opacity: 0.7;
1200+
}
1201+
1202+
.announcement-banner .os-message-dismiss:hover,
1203+
.announcement-banner .os-message-dismiss:focus {
1204+
opacity: 1;
1205+
background: rgba(0, 0, 0, 0.06);
1206+
outline: none;
1207+
}
1208+
11641209
@media (min-width: 795px) {
11651210
div.custom-search-form {
11661211
height: 21px;

0 commit comments

Comments
 (0)