papercss/src/components/_modals.scss

125 lines
2.3 KiB
SCSS
Raw Permalink Normal View History

.modal {
2018-05-24 14:13:53 +02:00
@include transition(opacity);
background: rgba(#000, 0.6);
bottom: 0;
flex: 1 1 auto;
left: 0;
opacity: 0;
position: fixed;
right: 0;
text-align: left;
2018-05-24 14:13:53 +02:00
top: 0;
visibility: hidden;
word-wrap: break-word;
2022-03-22 11:55:26 +01:00
z-index: 200;
// modal background
&-bg {
bottom: 0;
cursor: pointer;
2018-05-24 14:13:53 +02:00
left: 0;
position: absolute;
right: 0;
top: 0;
2017-12-06 17:12:17 +01:00
}
.modal-body {
2020-06-01 23:02:51 +02:00
@include color('color', 'primary');
@include color('background', 'main-background');
2020-08-26 00:45:40 +02:00
@include color('border-color', 'muted-light');
2018-05-24 14:13:53 +02:00
@include transition;
backface-visibility: hidden;
2020-06-01 23:02:51 +02:00
2020-08-26 00:45:40 +02:00
border: 2px solid;
2018-05-24 14:13:53 +02:00
left: 50%;
padding: 1.25rem;
2018-05-24 14:13:53 +02:00
position: absolute;
top: 0;
2018-09-30 19:20:41 +02:00
transform: translate(-50%, -50%);
2017-12-31 12:19:27 +01:00
@include resp(sm) {
box-sizing: border-box;
2018-05-24 14:13:53 +02:00
width: 90%;
2017-12-08 12:44:59 +01:00
}
2017-12-06 17:12:17 +01:00
}
.btn-close {
2020-06-01 23:02:51 +02:00
@include color('color', 'primary-light');
2018-05-24 14:13:53 +02:00
@include transition;
cursor: pointer;
2017-12-06 17:12:17 +01:00
font-size: 30px;
2018-05-24 14:13:53 +02:00
height: 1.1rem;
position: absolute;
right: 1rem;
2018-05-24 14:13:53 +02:00
text-decoration: none;
top: 1rem;
2018-05-24 14:13:53 +02:00
width: 1.1rem;
&:hover,
&:active,
&:focus {
2020-06-01 23:02:51 +02:00
@include color('color', 'primary');
2017-12-06 17:12:17 +01:00
}
}
h4,
.modal-title {
2017-12-06 17:12:17 +01:00
margin-bottom: 0.5rem;
2018-05-24 14:13:53 +02:00
margin-top: 0;
2017-12-06 17:12:17 +01:00
}
h5,
.modal-subtitle {
2020-06-01 23:02:51 +02:00
@include color('color', 'secondary');
2017-12-06 17:12:17 +01:00
margin-bottom: 0.5rem;
2018-05-24 14:13:53 +02:00
margin-top: 0;
2017-12-06 17:12:17 +01:00
}
p,
.modal-text {
2017-12-06 17:12:17 +01:00
margin-bottom: 1rem;
2018-05-24 14:13:53 +02:00
margin-top: 0;
2017-12-06 17:12:17 +01:00
}
.modal-link+.modal-link,
a+a {
2017-12-06 17:12:17 +01:00
margin-left: 1.25rem;
}
.paper-btn {
2020-08-26 00:45:40 +02:00
@include color('background', 'main-background');
display: inline-block;
2018-05-24 14:13:53 +02:00
text-decoration: none;
}
2018-05-24 14:13:53 +02:00
.modal-link,
a {
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%);
2018-05-24 14:13:53 +02:00
background-position: 0 90%;
background-repeat: repeat-x;
background-size: 4px 3px;
cursor: pointer;
2018-05-24 14:13:53 +02:00
text-decoration: none;
&:hover,
&:focus,
&:visited {
2020-06-01 23:02:51 +02:00
@include color('color', 'primary');
2018-05-24 14:13:53 +02:00
text-decoration: none;
}
}
}
.modal-state {
display: none;
&:checked+.modal {
opacity: 1;
visibility: visible;
.modal-body {
top: 50%;
}
2017-12-06 17:12:17 +01:00
}
}