1+ @import ' ../../scss/theme.scss' ;
2+ @import ' ~bootstrap/scss/functions' ;
3+ @import ' ~bootstrap/scss/variables' ;
4+
5+ .ReactModal {
6+ & __Body--open {
7+ overflow : hidden ;
8+ }
9+
10+ & __Content {
11+ background-color : white ;
12+ border-radius : $ux-border-radius ;
13+ box-shadow : $modal-content-box-shadow-xs ;
14+ box-shadow : 0 0.25rem 0.5rem rgba (0 , 0 , 0 , 0.1 );
15+ font-weight : 400 ;
16+ max-height : 100% ;
17+ overflow : auto ;
18+ transform : translate (0 , -25% );
19+ transition : transform $ux-duration-long ease-in ;
20+ width : $modal-width-default ;
21+
22+ & .ReactModal--large {
23+ width : $modal-width-wide ;
24+ }
25+
26+ // Bootstrap has the following reset:
27+ //
28+ // [tabindex="-1"]:focus { outline: 0 !important; };
29+ //
30+ // That would cover our needs here, but it’s maybe a surprising default and
31+ // I think it ought be made explicit.
32+
33+ & :focus {
34+ outline : none ;
35+ }
36+
37+ & --after-open :not (&--before-close) {
38+ transform : translate (0 , 0 );
39+ transition-timing-function : $ux-ease-out-circ ;
40+ }
41+
42+ // The content children (typically one div) must never be wider than the
43+ // parent, since this would always mean overflowing the viewport.
44+
45+ > * {
46+ max-height : 95vh ;
47+ max-width : 100% ;
48+ overflow-y : auto ;
49+ }
50+ }
51+
52+ // The overlay uses the jQuery modal z-index because the layout must remain
53+ // compatible with the jQuery modal’s layout expectations. If jQuery modal is
54+ // removed, we can isolate #ui-window-root instead and z-index will not be
55+ // needed.
56+
57+ & __Overlay {
58+ align-items : center ;
59+ background-color : rgba (0 , 0 , 0 , 0.5 );
60+ display : flex ;
61+ justify-content : center ;
62+ opacity : 0 ;
63+ padding : $ux-spacing-50 ;
64+ transition : opacity $ux-duration-short linear ;
65+ z-index : $z-index-modal-backdrop ;
66+
67+ @media (max-width : 32rem ) {
68+ padding : $ux-spacing-40 ;
69+ }
70+
71+ & --after-open :not (&--before-close) {
72+ opacity : 1 ;
73+ }
74+ }
75+ }
0 commit comments