Skip to content

Instantly share code, notes, and snippets.

@treyhuffine
Created August 26, 2019 08:49
Show Gist options
  • Save treyhuffine/ed0178ad5e4239affb919c7e3109bfd6 to your computer and use it in GitHub Desktop.
Save treyhuffine/ed0178ad5e4239affb919c7e3109bfd6 to your computer and use it in GitHub Desktop.
.modal-button {
background: #FFF;
border: none;
color: #333;
font-size: 13px;
padding: 6px 10px;
border-radius: 2px;
margin-right: 10px;
}
.container,
.modal-view-container {
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
padding-top: 50px;
box-sizing: border-box;
z-index: 10;
pointer-events: none;
}
.modal-view-container {
position: fixed;
top: 0;
left: 0;
}
.view.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 2;
transform: scale(1.15);
transition: transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946),
opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946);
pointer-events: none;
opacity: 0;
will-change: transform, opacity;
}
.view.modal.visible {
pointer-events: auto;
opacity: 1;
transform: scale(1);
transition: transform 0.3s cubic-bezier(0.465, 0.183, 0.153, 0.946),
opacity 0.3s cubic-bezier(0.465, 0.183, 0.153, 0.946);
}
.modal-view-details {
background: #FFF;
z-index: 2;
position: fixed;
left: 50%;
top: 50%;
padding: 25px 25px 50px 25px;
width: 65%;
max-width: 300px;
transform: translate(-50%, -50%);
border-radius: 2px;
box-shadow: 0 10px 20px rgba(0,0,0,0.6);
}
.modal-view-details h1 {
margin: 0.2em 0 0.4em 0;
padding: 0;
line-height: 1;
font-size: 24px;
color: #111;
}
.modal-view-details p {
font-size: 14px;
line-height: 1.6;
margin: 0 0 1em 0;
color: #666;
}
.modal-view-details button {
position: absolute;
bottom: 10px;
right: 10px;
background: none;
color: #3C78D8;;
border-radius: 2px;
border: none;
font-size: 16px;
padding: 6px 10px;
text-transform: uppercase;
}
.modal:after {
position: fixed;
background: rgba(0,0,0,0.4);
width: 100%;
height: 100%;
left: 0;
top: 0;
display: block;
content: '';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment