2014-02-11 18:18:59 +01:00
|
|
|
$zindex-modal-background: 500;
|
2014-01-24 18:34:26 +01:00
|
|
|
|
2014-06-16 13:59:43 +02:00
|
|
|
.fade {
|
2017-08-26 00:04:10 +02:00
|
|
|
@include transition(opacity 0.15s linear);
|
2015-11-03 13:15:33 +01:00
|
|
|
opacity: 0;
|
2017-08-11 01:13:57 +02:00
|
|
|
|
2014-06-16 13:59:43 +02:00
|
|
|
&.in {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-01-24 18:34:26 +01:00
|
|
|
// Kill the scroll on the body
|
|
|
|
.modal-open {
|
|
|
|
overflow: hidden;
|
|
|
|
|
2015-09-25 15:17:39 +02:00
|
|
|
.content-wrapper {
|
|
|
|
transform: none;
|
2014-01-24 18:34:26 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Container that the modal scrolls within
|
|
|
|
.modal {
|
2015-11-03 18:12:12 +01:00
|
|
|
box-sizing: border-box;
|
2014-01-24 18:34:26 +01:00
|
|
|
display: none;
|
|
|
|
overflow: auto;
|
|
|
|
overflow-y: scroll;
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
2022-03-15 14:21:06 +01:00
|
|
|
inset-inline-end: 0;
|
2014-01-24 18:34:26 +01:00
|
|
|
bottom: 0;
|
2022-03-15 14:21:06 +01:00
|
|
|
inset-inline-start: 0;
|
2014-02-11 18:18:59 +01:00
|
|
|
z-index: $zindex-modal-background;
|
2014-01-24 18:34:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Shell div to position the modal with bottom padding
|
|
|
|
.modal-dialog {
|
2015-11-03 18:12:12 +01:00
|
|
|
box-sizing: border-box;
|
2022-03-15 14:21:06 +01:00
|
|
|
margin-inline-start: auto;
|
|
|
|
margin-inline-end: auto;
|
2015-09-25 18:14:46 +02:00
|
|
|
padding: 0;
|
2014-02-11 18:18:59 +01:00
|
|
|
z-index: ($zindex-modal-background + 10);
|
2015-09-25 15:17:39 +02:00
|
|
|
height: 90%;
|
|
|
|
width: 85%;
|
2022-02-04 12:57:55 +01:00
|
|
|
|
2015-09-25 15:17:39 +02:00
|
|
|
&:before {
|
2014-01-24 18:34:26 +01:00
|
|
|
content: '';
|
|
|
|
display: inline-block;
|
|
|
|
height: 100%;
|
|
|
|
vertical-align: middle;
|
2022-03-15 14:21:06 +01:00
|
|
|
margin-inline-end: -0.25em;
|
2014-01-24 18:34:26 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Actual modal
|
|
|
|
.modal-content {
|
2015-11-03 18:12:12 +01:00
|
|
|
box-sizing: border-box;
|
|
|
|
border-radius: 3px;
|
2015-11-03 13:15:33 +01:00
|
|
|
width: 98.7%;
|
2014-01-24 18:34:26 +01:00
|
|
|
position: relative;
|
2015-11-03 13:15:33 +01:00
|
|
|
background-color: $color-white;
|
2015-09-25 15:17:39 +02:00
|
|
|
margin-top: 2em;
|
|
|
|
padding-bottom: 3em;
|
|
|
|
display: inline-block;
|
2014-01-24 18:34:26 +01:00
|
|
|
vertical-align: middle;
|
2015-09-25 15:17:39 +02:00
|
|
|
overflow: hidden;
|
2014-01-24 18:34:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Modal background
|
|
|
|
.modal-backdrop {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
2022-03-15 14:21:06 +01:00
|
|
|
inset-inline-end: 0;
|
2014-01-24 18:34:26 +01:00
|
|
|
bottom: 0;
|
2022-03-15 14:21:06 +01:00
|
|
|
inset-inline-start: 0;
|
2014-02-11 18:18:59 +01:00
|
|
|
z-index: ($zindex-modal-background - 10);
|
2015-11-03 13:15:33 +01:00
|
|
|
background-color: $color-black;
|
2022-02-04 12:57:55 +01:00
|
|
|
|
2014-01-24 18:34:26 +01:00
|
|
|
// Fade for backdrop
|
2015-09-25 15:17:39 +02:00
|
|
|
&.fade {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
2022-02-04 12:57:55 +01:00
|
|
|
|
2015-09-25 15:17:39 +02:00
|
|
|
&.in {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
2014-01-24 18:34:26 +01:00
|
|
|
}
|
|
|
|
|
2022-09-05 12:46:57 +02:00
|
|
|
.modal .close.button {
|
2015-09-25 15:17:39 +02:00
|
|
|
position: absolute;
|
2022-08-21 13:30:20 +02:00
|
|
|
display: inline-flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
background-color: transparent;
|
|
|
|
padding: 0;
|
|
|
|
top: theme('spacing.3');
|
|
|
|
inset-inline-end: theme('spacing.3');
|
|
|
|
width: theme('spacing.8');
|
|
|
|
height: theme('spacing.8');
|
|
|
|
color: theme('colors.white.DEFAULT');
|
2015-09-25 15:17:39 +02:00
|
|
|
z-index: 1;
|
2022-08-21 13:30:20 +02:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: theme('colors.black.DEFAULT');
|
|
|
|
color: theme('colors.grey.50');
|
|
|
|
}
|
2014-01-24 18:34:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Where all modal content resides
|
|
|
|
.modal-body {
|
|
|
|
position: relative;
|
2015-09-25 15:17:39 +02:00
|
|
|
padding-bottom: 2em;
|
2014-02-05 13:04:24 +01:00
|
|
|
|
2022-08-21 13:30:20 +02:00
|
|
|
.w-header {
|
|
|
|
color: theme('colors.white.DEFAULT');
|
|
|
|
background-color: theme('colors.primary.DEFAULT');
|
2020-06-16 17:53:57 +02:00
|
|
|
|
2022-08-21 13:30:20 +02:00
|
|
|
> .row {
|
|
|
|
// reset inline padding added to w-header for sidebar offset
|
|
|
|
padding-inline-start: theme('spacing.16');
|
|
|
|
// ensure title can never overlap the close button
|
|
|
|
padding-inline-end: theme('spacing.16');
|
|
|
|
}
|
2016-10-25 20:22:38 +02:00
|
|
|
|
2022-08-21 13:30:20 +02:00
|
|
|
.w-header__title {
|
|
|
|
color: inherit;
|
2022-04-29 13:59:52 +02:00
|
|
|
font-weight: 700;
|
|
|
|
font-size: 1.125rem;
|
|
|
|
line-height: 130%;
|
|
|
|
}
|
2016-10-25 20:22:38 +02:00
|
|
|
}
|
2014-01-24 18:34:26 +01:00
|
|
|
}
|
|
|
|
|
2018-11-04 22:46:42 +01:00
|
|
|
@include media-breakpoint-up(sm) {
|
2014-01-24 18:34:26 +01:00
|
|
|
.modal-dialog {
|
2022-08-21 13:30:20 +02:00
|
|
|
margin-inline-end: theme('spacing.20');
|
|
|
|
margin-inline-start: theme('spacing.20');
|
|
|
|
padding: 0 0 2em 0;
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
|
2022-09-05 12:46:57 +02:00
|
|
|
.modal .close.button {
|
2022-08-21 13:30:20 +02:00
|
|
|
width: theme('spacing.12');
|
|
|
|
height: theme('spacing.12');
|
2014-01-24 18:34:26 +01:00
|
|
|
}
|
2014-02-05 12:31:31 +01:00
|
|
|
}
|
2015-11-03 13:15:33 +01:00
|
|
|
|
2018-11-04 22:46:42 +01:00
|
|
|
@include media-breakpoint-up(xl) {
|
2014-02-05 12:31:31 +01:00
|
|
|
.modal-dialog {
|
2022-08-21 13:30:20 +02:00
|
|
|
margin-inline-end: auto;
|
|
|
|
margin-inline-start: auto;
|
2018-11-04 22:46:42 +01:00
|
|
|
max-width: 100em;
|
2015-11-03 13:15:33 +01:00
|
|
|
padding: 0 0 2em;
|
2014-02-05 12:31:31 +01:00
|
|
|
}
|
2015-11-03 13:15:33 +01:00
|
|
|
}
|