This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/resources/assets/less/yuuno/bem/alert.less
2016-11-09 19:32:23 +01:00

189 lines
3.7 KiB
Text

.alerts {
position: fixed;
bottom: 5px;
right: 5px;
z-index: 3;
font-family: "Open Sans", sans-serif;
overflow-y: auto;
overflow-x: hidden;
max-height: 100%;
max-width: 600px;
text-align: right;
pointer-events: none;
}
.alert {
cursor: pointer;
text-align: left;
display: flex;
align-items: stretch;
min-height: 80px;
background: rgba(113, 74, 150, .9);
border: 1px solid #507;
color: #FFF;
padding: 2px 0 2px 2px;
margin: 5px;
position: relative;
box-shadow: 0 0 4px rgba(0, 0, 0, .9);
pointer-events: auto;
&--enter {
animation: slideInFromRight 1 .4s, fadeIn 1 .4s;
}
&--exit {
animation: slideOutToBottom 1 .4s, fadeOut 1 .4s;
}
&__icon {
height: 80px;
width: 80px;
vertical-align: middle;
background: rgba(0, 0, 0, .5);
flex-shrink: 0;
display: flex;
align-items: center;
&-inner {
margin: 0 auto;
}
&-inner--image {
max-height: 80px;
max-width: 80px;
}
}
&__content {
min-width: 350px;
max-width: 450px;
padding-right: 6px;
border-left: 1px solid #507;
margin-left: 2px;
flex-grow: 2;
display: flex;
align-content: center;
justify-content: center;
flex-direction: column;
}
&__title {
font-weight: 300;
font-size: 1.7em;
line-height: 1.5em;
padding-left: 4px;
border-bottom: 1px solid #507;
}
&__text {
padding-left: 4px;
}
&__close {
font-size: 0;
width: 3px;
line-height: 100%;
background: #507;
margin-top: -3px;
margin-bottom: -3px;
padding: 0 1px;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
transition: .1s;
&:before {
font-family: FontAwesome;
content: "\f00d";
}
&-inner {
margin: 0 auto;
}
}
&:hover {
.alert__close {
font-size: 2em;
width: 20px;
padding: 0 3px;
}
}
}
@media (max-width: 600px) {
.alerts {
top: 0;
right: 0;
left: 0;
bottom: none;
max-width: 100%;
height: auto;
width: auto;
}
.alert {
min-height: 40px;
width: 100%;
background: rgba(113, 74, 150, 1);
border: 0;
margin: 0 !important;
&__icon {
width: 40px;
height: 40px;
flex-shrink: 0;
&-inner {
&--font {
font-size: 2em;
}
&--image {
max-height: 40px;
max-width: 40px;
}
}
}
&__content {
max-width: 100%;
min-width: 0;
width: auto;
border-left: 0;
margin: 0;
padding-left: 4px;
flex-grow: 2;
}
&__title {
font-weight: 700;
font-size: 1em;
margin: 0;
padding: 0;
}
&__text {
margin: 0;
padding: 0;
}
&__close {
height: 40px !important;
width: 40px !important;
margin: 0;
padding: 0 !important;
border: 0;
margin-right: 4px;
visibility: visible;
flex-shrink: 0;
font-size: 2em !important;
&-inner {
margin-top: -1px;
}
}
}
}