0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
wagtail/client/scss/components/_modals.scss

137 lines
2.4 KiB
SCSS
Raw Normal View History

$zindex-modal-background: 500;
2014-06-16 13:59:43 +02:00
.fade {
@include transition(opacity 0.15s linear);
2015-11-03 13:15:33 +01:00
opacity: 0;
2014-06-16 13:59:43 +02:00
&.in {
opacity: 1;
}
}
// Kill the scroll on the body
.modal-open {
overflow: hidden;
.content-wrapper {
transform: none;
}
}
// Container that the modal scrolls within
.modal {
box-sizing: border-box;
display: none;
overflow: auto;
overflow-y: scroll;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: $zindex-modal-background;
}
// Shell div to position the modal with bottom padding
.modal-dialog {
box-sizing: border-box;
margin-left: auto;
margin-right: auto;
padding: 0;
z-index: ($zindex-modal-background + 10);
height: 90%;
width: 85%;
&:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -0.25em;
}
}
// Actual modal
.modal-content {
box-sizing: border-box;
border-radius: 3px;
2015-11-03 13:15:33 +01:00
width: 98.7%;
position: relative;
2015-11-03 13:15:33 +01:00
background-color: $color-white;
margin-top: 2em;
padding-bottom: 3em;
display: inline-block;
vertical-align: middle;
overflow: hidden;
}
// Modal background
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: ($zindex-modal-background - 10);
2015-11-03 13:15:33 +01:00
background-color: $color-black;
// Fade for backdrop
&.fade { opacity: 0; }
&.in { opacity: 0.5; }
}
.modal .close {
padding: 0;
position: absolute;
width: 50px;
height: 50px;
top: 10px;
right: 10px;
z-index: 1;
}
// Where all modal content resides
.modal-body {
position: relative;
padding-bottom: 2em;
2014-02-05 13:04:24 +01:00
header {
2016-10-25 20:22:38 +02:00
padding-left: 2em;
padding-right: 100px;
2020-06-16 17:53:57 +02:00
&.tab-merged {
padding-left: 1.6em;
}
2014-02-05 13:04:24 +01:00
}
2016-10-25 20:22:38 +02:00
.header-title {
// stylelint-disable-next-line declaration-no-important
2016-10-27 22:26:22 +02:00
padding-left: 0 !important;
2016-10-27 21:27:35 +02:00
margin-left: -36px;
2016-10-25 20:22:38 +02:00
}
2020-06-16 17:53:57 +02:00
.tab-merged .header-title {
margin-left: 0;
}
}
@include media-breakpoint-up(sm) {
.modal-dialog {
padding: 0 0 2em $menu-width;
}
2020-06-16 17:53:57 +02:00
.modal-body {
header.tab-merged {
padding-left: $desktop-nice-padding;
}
}
2014-02-05 12:31:31 +01:00
}
2015-11-03 13:15:33 +01:00
@include media-breakpoint-up(xl) {
2014-02-05 12:31:31 +01:00
.modal-dialog {
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
}