Tidy modal SCSS files

This commit is contained in:
Samuel Elliott 2018-02-13 17:50:01 +00:00
parent 98261a864d
commit a965dc9515
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
11 changed files with 227 additions and 219 deletions

View File

@ -4,6 +4,4 @@
@import './forms.scss';
@import './forms/index.scss';
@import './material-buttons.scss';
@import './modals.scss';
@import './error-modal.scss';
@import './drawers.scss';

View File

@ -1,215 +0,0 @@
.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-wrap {
transition: all 0.2s ease;
width: 100%;
height: 100%;
position: absolute;
z-index: 9000;
.bd-modal-close-area {
width: 100%;
height: 100%;
}
}
.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-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-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-icon .bd-material-design-icon {
margin-right: 5px;
}
.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;
display: flex;
.bd-scroller-wrap .bd-scroller {
color: #fff;
margin: 0;
padding: 0;
}
}
.bd-modal-titlelink {
cursor: pointer;
color: $colbdblue;
&:hover {
text-decoration: underline;
color: lighten($colbdblue, 5%);
}
}
.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-footer {
.bd-footer-alert {
margin: -64px 10px 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;
position: relative;
&.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;
}
}
}
}
}
}

View File

@ -6,6 +6,7 @@
@import './sidebarview/index.scss';
@import './bdsettings/index.scss';
@import './generic/index.scss';
@import './modals/index.scss';
@import './profilebadges.scss';
@import './discordoverrides.scss';

View File

@ -0,0 +1,17 @@
.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;
}
}

View File

@ -0,0 +1,5 @@
.bd-modal-basic {
.bd-modal-basic-body {
padding-bottom: 15px;
}
}

View File

@ -0,0 +1,49 @@
.bd-modal-footer {
.bd-footer-alert {
margin: -64px 10px 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;
position: relative;
&.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;
}
}
}
}
}

View File

@ -0,0 +1,50 @@
.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-icon .bd-material-design-icon {
margin-right: 5px;
}
.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);
}

View File

@ -0,0 +1,7 @@
@import './backdrop.scss';
@import './modals.scss';
@import './header.scss';
@import './footer-alert.scss';
@import './basic-modal.scss';
@import './error-modal.scss';

View File

@ -0,0 +1,96 @@
.bd-modal-wrap {
transition: all 0.2s ease;
width: 100%;
height: 100%;
position: absolute;
z-index: 9000;
.bd-modal-close-area {
width: 100%;
height: 100%;
}
}
.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-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-body {
padding: 0 15px;
display: flex;
.bd-scroller-wrap .bd-scroller {
color: #fff;
margin: 0;
padding: 0;
}
}
.bd-modal-titlelink {
cursor: pointer;
color: $colbdblue;
&:hover {
text-decoration: underline;
color: lighten($colbdblue, 5%);
}
}
.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;
}
}
}

View File

@ -9,8 +9,8 @@
*/
<template>
<Modal :class="{'bd-modal-out': modal.closing}" :headerText="modal.title" :close="modal.close">
<div slot="body">{{ modal.text }}</div>
<Modal :class="['bd-modal-basic', {'bd-modal-out': modal.closing}]" :headerText="modal.title" :close="modal.close">
<div slot="body" class="bd-modal-basic-body">{{ modal.text }}</div>
<div slot="footer" class="bd-modal-controls">
<div class="bd-flex-grow"></div>
<div class="bd-button bd-ok" @click="modal.close">OK</div>