I have a problem with my SASS and notifications. I have 3 types of alert notifications (danger, warning, success), and I wish display the last-of-type of this 3 alerts (See image below with the right point). Thank you in advance for your response.
My SASS
#app-notification {
top: inherit;
bottom: 20px !important;
.alert {
padding: 10px;
margin-bottom: 20px;
border: 0;
border-radius: 0;
box-shadow: 0 0 4px rgba(0,0,0,.5);
background: #fff;
color: #263f5e;
&:last-of-type { margin-bottom: 0; }
}
.alert-danger {
border-bottom: 3px solid #ff3b30;
strong { color: #ff3b30; }
}
.alert-warning {
border-bottom: 3px solid #ffcc00;
strong { color: #ffcc00; }
}
.alert-info {
border-bottom: 3px solid #007aff;
strong { color: #007aff; }
}
.alert-success {
border-bottom: 3px solid #4cd964;
strong { color: #4cd964; }
}
}
// Test
#app-notification .alert-danger:not(:last-of-type) { opacity: .2; }
#app-notification .alert-success:not(:last-of-type) { opacity: .2; }
#app-notification .alert-warning(:last-of-type) { opacity: .2; }