BetterDiscordApp-v2/client/src/styles/partials/generic/modals.scss

266 lines
5.7 KiB
SCSS

.bd-backdrop {
position: fixed;
right: 0px;
left: 0px;
top: 0px;
bottom: 0px;
background: #000;
opacity: .85;
padding: 20px;
z-index: 9000;
justify-content: center;
animation: bd-backdrop-in 0.22s ease;
&.bd-backdrop-out {
animation: bd-backdrop-out 0.22s ease;
}
}
.bd-modal {
position: fixed;
align-content: space-around;
display: flex;
border-radius: 8px;
width: 100%;
height: 100%;
left: 0;
top: 0;
user-select: none;
padding: 60px;
transform: scale(1) translateZ(0px);
-webkit-box-direction: normal;
-webkit-box-orient: vertical;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
align-items: center;
box-sizing: border-box;
pointer-events: none;
z-index: 9001;
justify-content: center;
animation: bd-modal-in 0.22s ease;
&.bd-modal-out {
animation: bd-modal-out 0.22s ease;
}
.bd-modal-header .bd-modal-icon .bd-material-design-icon {
margin-right: 5px;
}
&.bd-err {
.bd-modal-header .bd-modal-icon svg {
fill: $colerr;
}
}
.bd-modal-body .bd-scroller-wrap .bd-scroller {
color: #FFF;
}
.bd-modal-controls {
display: flex;
padding: 15px;
border-top: 1px solid #4a4a4a;
.bd-modal-tip {
flex-grow: 1;
line-height: 26px;
color: #FFF;
}
.bd-button {
padding: 5px 10px;
border-radius: 3px;
}
}
}
.bd-modal .bd-modal-inner {
background: #36393e;
contain: layout;
flex-direction: column;
pointer-events: auto;
-webkit-box-direction: normal;
-webkit-box-orient: vertical;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
flex-grow: 1;
border-radius: 4px;
max-height: 100%;
max-width: 500px;
width: 500px;
}
.bd-modal .bd-modal-body {
display: flex;
}
.bd-modal {
.bd-modal-header {
display: flex;
padding: 15px;
flex: 0 0;
-webkit-transition: -webkit-box-shadow .1s ease-out;
transition: -webkit-box-shadow .1s ease-out;
transition: box-shadow .1s ease-out;
.bd-modal-headertext {
color: #FFF;
font-weight: 700;
flex-grow: 1;
line-height: 18px;
padding: 1px;
}
.bd-modal-x {
display: flex;
width: 20px;
height: 20px;
border-radius: 3px;
cursor: pointer;
align-content: center;
justify-content: center;
align-items: center;
margin-left: -2px -2px -2px 10px;
padding: 2px;
.bd-material-design-icon {
fill: #ccc;
}
&:hover {
background: #2d2f34;
.bd-material-design-icon {
fill: #fff;
}
}
}
}
&.bd-modal-scrolled .bd-modal-header {
-webkit-box-shadow: 0 1px 0 0 rgba(24,25,28,.3), 0 1px 2px 0 rgba(24,25,28,.3);
box-shadow: 0 1px 0 0 rgba(24,25,28,.3), 0 1px 2px 0 rgba(24,25,28,.3);
}
.bd-modal-body {
padding: 0 15px;
}
.bd-modal-footer {
.bd-footer-alert {
margin: 10px;
height: 0;
display: flex;
background-color: rgba(32, 34, 37, 0.9);
box-shadow: 0 2px 10px 0 rgba(0,0,0,.2);
padding: 10px 10px 10px 16px;
overflow: hidden;
border-radius: 5px;
transform: translateY(100%);
opacity: 0;
transition: all .2s ease-in-out;
&.bd-warn {
background-color: $colerr;
animation: bd-warn-shake 0.4s;
}
&.bd-active {
height: auto;
opacity: 1;
transform: none;
}
.bd-footer-alert-text {
flex: 1 1 auto;
color: #FFF;
font-weight: 700;
line-height: 34px;
}
.bd-button {
height: 30px;
border-radius: 3px;
padding: 2px 16px;
&.bd-tp {
background: transparent;
&:hover {
text-decoration: underline;
background: transparent;
}
}
}
}
}
}
.bd-modal-error .bd-modal-error-title {
padding: 5px;
background: rgba(0,0,0,.3);
border-radius: 3px 3px 0 0;
}
.bd-modal-error {
margin-top: 5px;
.bd-scroller-wrap {
background: rgba(0,0,0,.2);
.bd-scroller {
overflow-x: auto;
padding: 0;
&::-webkit-scrollbar-corner {
background: transparent;
}
}
}
}
.bd-modal-error .bd-scroller-wrap {
opacity: 0;
}
.bd-modal-error.bd-open {
.bd-modal-error-body {
transform: scaleY(1) translateY(0%);
margin-top: 0%;
opacity: 1;
span {
font-weight: 700;
}
}
.bd-scroller-wrap {
opacity: 1;
}
}
.bd-modal-error .bd-modal-error-body {
white-space: pre-wrap;
font-size: 12px;
font-family: 'Consolas';
padding: 0 5px;
border-radius: 3px;
max-height: 100px;
width: auto;
transition: transform 0.2s ease, margin-top 0.2s ease, opacity 0.2s ease;
transform: scaleY(0) translateY(0%);
margin-top: -50%;
opacity: 0;
}
.bd-modal-titlelink {
cursor: pointer;
color: $colbdblue;
&:hover {
text-decoration: underline;
color: lighten($colbdblue, 5%);
}
}