cabana/src/components/Modals/modal.scss

150 lines
2.8 KiB
SCSS

/*
Modals
~~~~~~
*/
@import "../../styles/_global/all.scss";
$cabana-modal-padding--wide: 76px;
.cabana-modal {
&-backdrop {
background: rgba(233, 233, 233, 0.8);
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0;
pointer-events: none;
transition-duration: 0.1s;
z-index: 100;
}
&-container {
background: #fff;
border: 1px solid $color-grey-30;
border-radius: 5px;
box-shadow: rgba(0, 0, 0, 0.07) 0 2px 18px 8px;
transform: translate(-50%, -50%);
left: 50%;
margin-top: 18px;
opacity: 0;
position: absolute;
top: 50%;
width: 600px;
// transition: ease-in-out .2s;
z-index: 101;
}
&-header {
padding: 44px 50px 34px;
position: relative;
h1 {
font-size: 24px;
margin: 0 0 11px;
}
p {
color: $color-grey-70;
font-size: 14px;
margin: 0;
}
}
&-close-icon {
&:before {
content: $fa-var-close;
color: $color-grey-30;
cursor: pointer;
display: block;
font-family: "FontAwesome";
font-size: 22px;
position: absolute;
right: 22px;
top: 18px;
padding: 5px;
transition-duration: 0.1s;
z-index: 110;
}
&:hover:before {
color: $color-grey-40;
}
}
&-body {
background: $color-grey-10;
border-color: $color-grey-30;
border-style: solid;
border-width: 1px 0;
padding: 34px 50px;
position: relative;
max-height: 50vh;
overflow-y: scroll;
}
&-actions {
text-align: right;
width: 100%;
&:not(:empty) {
padding: 22px 50px;
}
button {
display: inline-block;
&:not(:last-child) {
margin-right: 11px;
}
}
}
&-footer {
background: $color-grey-20;
color: $color-grey-70;
font-size: 14px;
line-height: 70px;
text-align: center;
a {
color: inherit;
font-weight: 600;
&:hover {
text-decoration: underline;
}
}
}
// Functional Variations
&.cabana-modal--not-closable {
.cabana-modal-backdrop {
pointer-events: none;
}
.cabana-modal-close-icon {
display: none;
}
}
&.cabana-modal--scrollable-y {
.cabana-modal-container {
transform: translate(-50%, 0);
top: 5%;
margin-bottom: 5%;
}
}
// Size Variations
&.cabana-modal--small {
width: 480px;
}
&.cabana-modal--wide {
.cabana-modal-container {
width: 820px;
}
.cabana-modal-header,
.cabana-modal-body {
padding-left: $cabana-modal-padding--wide;
padding-right: $cabana-modal-padding--wide;
}
}
// Color variations
&.cabana-modal--dark {
.cabana-modal-backdrop {
background: rgba(0, 0, 0, 0.85);
}
}
// Overrides
.cabana-tabs-navigation {
padding: 0 44px;
}
}