papercss/src/components/_modals.scss

121 lines
2.1 KiB
SCSS
Raw Normal View History

.modal {
opacity: 0;
visibility: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
text-align: left;
background: rgba(black, 0.6);
z-index: 12;
flex: 1 1 auto;
word-wrap: break-word;
2018-01-08 14:31:49 +01:00
@include transition(opacity);
// modal background
&-bg {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
cursor: pointer;
2017-12-06 17:12:17 +01:00
}
.modal-body {
position: absolute;
top: 0;
left: 50%;
background: $white;
border: 2px solid $muted-light;
padding: 1.25rem;
backface-visibility: hidden;
@include translate(-50%, -50%);
@include transition;
2017-12-31 12:19:27 +01:00
@include resp(sm) {
width: 90%;
box-sizing: border-box;
2017-12-08 12:44:59 +01:00
}
2017-12-06 17:12:17 +01:00
}
.btn-close {
width: 1.1rem;
height: 1.1rem;
cursor: pointer;
color: $primary-light;
2017-12-06 17:12:17 +01:00
font-size: 30px;
text-decoration: none;
position: absolute;
right: 1rem;
top: 1rem;
@include transition;
&:hover,
&:active,
&:focus {
color: $primary;
2017-12-06 17:12:17 +01:00
}
}
h4,
.modal-title {
2017-12-06 17:12:17 +01:00
margin-top: 0;
margin-bottom: 0.5rem;
}
h5,
.modal-subtitle {
2017-12-19 17:52:33 +01:00
@extend .text-secondary;
2017-12-06 17:12:17 +01:00
margin-top: 0;
margin-bottom: 0.5rem;
}
p,
.modal-text {
2017-12-06 17:12:17 +01:00
margin-top: 0;
margin-bottom: 1rem;
}
.modal-link+.modal-link,
a+a {
2017-12-06 17:12:17 +01:00
margin-left: 1.25rem;
}
.paper-btn {
2017-12-06 17:12:17 +01:00
text-decoration: none;
background: $white;
display: inline-block;
}
.modal-link, a {
text-decoration: none;
background-image: linear-gradient(5deg, transparent 65%, $secondary 80%, transparent 90%), linear-gradient(165deg, transparent 5%, $secondary 15%, transparent 25%), linear-gradient(165deg, transparent 45%, $secondary 55%, transparent 65%), linear-gradient(15deg, transparent 25%, $secondary 35%, transparent 50%);
background-repeat: repeat-x;
background-size: 4px 3px;
background-position: 0 90%;
cursor: pointer;
&:hover,
&:focus,
&:visited {
text-decoration: none;
color: $primary;
}
}
}
.modal-state {
display: none;
&:checked+.modal {
opacity: 1;
visibility: visible;
.modal-body {
top: 50%;
}
2017-12-06 17:12:17 +01:00
}
}