fradrive/templates/standalone/alerts.lucius
2018-07-03 10:05:34 +02:00

181 lines
2.9 KiB
Plaintext

/* ALERTS */
.alerts {
position: fixed;
bottom: 5%;
right: 0;
z-index: 20;
text-align: right;
display: flex;
flex-direction: column;
}
@media (min-width: 768px) {
.alerts {
top: 150px;
bottom: auto;
}
}
.alert {
position: relative;
display: inline-block;
background-color: var(--color-dark);
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
font-size: 1rem;
color: #f3f3f3;
z-index: 0;
max-height: 200px;
transition: all .3s ease-in-out;
padding-left: 20px;
margin-left: 20px;
box-shadow: 0 0 7px var(--color-dark);
animation: slide-in-alert .2s ease-out forwards;
+ .alert:not(.alert--invisible) {
margin-top: 20px;
}
&:hover {
.alert__content {
&::after {
opacity: 1;
}
}
}
}
@keyframes slide-in-alert {
from {
left: 120%;
}
to {
left: 0;
}
}
@media (min-width: 425px) {
.alert {
margin-left: 80px;
}
}
@media (min-width: 768px) {
.alert {
padding-left: 30px;
margin-left: 40px;
min-width: 400px;
}
}
@media (min-width: 1024px) {
.alert {
min-width: 400px;
}
}
.alert__content {
padding: 1.25em 1.5em;
position: relative;
display: inline-block;
font-weight: 600;
}
@media (max-width: 768px) {
.alert__content {
padding: 4px 7px;
padding-left: 20px;
}
}
.alert__close {
cursor: pointer;
text-align: right;
position: absolute;
left: 0px;
top: 0;
width: 60px;
height: 100%;
/* TODO: remove next line as soon as messagerenderer-error in julius gets resolved */
color: var(--color-dark);
transition: all .3s ease;
z-index: 40;
&:hover {
transform: scale(1.05, 1.05);
&::before {
box-shadow: 0 0 4px white;
background-color: rgba(255, 255, 255, 0.1);
color: white;
}
}
&::before {
content: '\f00d';
position: absolute;
font-family: "Font Awesome 5 Free";
top: 50%;
left: 50%;
display: flex;
color: rgba(255, 255, 255, 0.5);
align-items: center;
justify-content: center;
transform: translate(-50%, -50%);
border-radius: 50%;
width: 30px;
height: 30px;
transition: all .15s ease;
}
}
@media (max-width: 768px) {
.alert__close {
width: 40px;
}
}
.alert-warning {
background-color: var(--color-warning);
color: var(--color-dark);
box-shadow: 0 0 7px var(--color-warning);
.alert__close {
color: var(--color-warning);
/* TODO: remove me as soon as messagerenderer-error in julius gets resolved */
&::before {
color: var(--color-dark);
}
}
}
.alert-danger,
.alert-error {
background-color: var(--color-error);
color: var(--color-lightwhite);
box-shadow: 0 0 7px var(--color-error);
.alert__close {
color: var(--color-error);
/* TODO: remove me as soon as messagerenderer-error in julius gets resolved */
&::before {
color: var(--color-lightwhite);
}
}
}
.alert--invisible {
max-height: 0;
transform: translateX(120%);
}