Skip to content

Instantly share code, notes, and snippets.

@gillkyle
Created October 30, 2024 22:06
/* initially hide all banners except the first one */
.notice-banner {
display: none;
}
/* show the first banner that is not dismissed */
.notice-banner:not([data-dismissed='true']):first-of-type {
display: flex;
}
/* show the next banner when the current one is dismissed */
.notice-banner[data-dismissed='true'] + .notice-banner:not([data-dismissed='true']) {
display: flex;
}
.notice-banner {
position: absolute;
top: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment