src/scss/modal.scss
/**
* CSS variables
*/
$padding: 24px;
$border-color: #e5e5e5;
.mdc-Modal-overlay.is-visible,
.mdc-Modal.is-visible {
opacity: 1;
pointer-events: initial;
}
/**
* Styles
*/
.mdc-Modal-overlay {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
z-index: 104;
pointer-events: none;
opacity: 0;
transition: opacity 0.5s ease;
}
.mdc-Modal {
pointer-events: none;
opacity: 0;
position: relative;
margin: 0 10px;
width: 100vw;
display: flex;
flex-direction: column;
background-color: #fff;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
border: 1px solid $border-color;
border-radius: 2px;
transition: opacity 0.3s ease;
@include medium {
margin: 0;
width: 600px;
}
}
.mdc-Modal-content {
padding: $padding;
}
.mdc-Modal-header {
color: #0d0d0d;
font-size: 20px;
margin-bottom: 20px;
}
.mdc-Modal-footer {
padding: 8px;
display: flex;
align-items: center;
justify-content: flex-end;
}
/**
* Fix button styles
*/
.mdc-Modal .mdc-Button {
margin-left: 8px;
margin-right: 0;
}