3 $modal-width: 50% !default;
4 $modal-max-width: rem(700) !default;
5 $modal-breakpoint-width: 52em !default;
6 $modal-breakpoint-height: 22em !default;
7 $breakpoint-low-height-modal: em(500, 16) !default;
8 $modal-max-height: 80% !default;
9 $modal-wider-width: 70% !default;
10 $modal-wider-max-width: rem(1000) !default;
11 $modal-full-dimension: 98% !default;
12 $modal-full-max-width: rem(1280) !default;
13 $modal-intermediate-width: rem(480);
14 $modal-smaller-width: 28em !default;
15 $modal-tiny-width: em(288) !default;
17 /* overlay covers everything */
21 background: var(--backdrop-norm);
22 z-index: map.get($z-indexes, 'modals');
23 animation: anime-modal-overlay-in ease 0.5s 1 normal;
30 justify-content: center;
31 flex-direction: column;
32 z-index: map.get($z-indexes, 'modals');
34 // -webkit-tap-highlight-color: rgb(255 255 255 / 0);
36 &.is-behind-backdrop {
37 z-index: map.get($z-indexes, 'modals') - 1;
40 /* for very large inputs in modals, like rich text editor */
41 .field-container--full {
42 inline-size: calc(100% - var(--label-width, #{$label-width}));
44 @include media('<=#{em(1360, 16)}') {
45 inline-size: $field-container;
48 @include media('<=#{em(830, 16)}') {
49 inline-size: calc(100% - var(--label-width, #{$label-width}));
52 @include media('<=small') {
59 animation: anime-modal-overlay-out ease 0.5s 1 normal;
60 animation-fill-mode: forwards;
63 @keyframes anime-modal-overlay-in {
73 @keyframes anime-modal-overlay-out {
85 inline-size: $modal-max-width;
86 max-block-size: $modal-max-height;
87 max-inline-size: $modal-max-width;
88 background: var(--modal-background-color);
89 color: var(--modal-text-color);
92 border-radius: var(--border-radius-lg);
93 box-shadow: var(--shadow-lifted);
94 animation: anime-modal-in ease 0.15s 1 normal;
95 animation-fill-mode: both;
96 animation-delay: 0.1s; // stupid fix for Safari crazy display bug
99 flex-direction: column;
103 @keyframes anime-modal-in {
106 transform: scale(0.8);
115 @keyframes anime-modal-out {
123 transform: scale(0.8);
128 animation: anime-modal-out ease 0.15s 1 normal;
129 animation-fill-mode: both;
136 .modal--intermediate {
137 inline-size: $modal-intermediate-width;
141 inline-size: $modal-smaller-width;
145 inline-size: $modal-tiny-width;
146 border-radius: var(--border-radius-lg);
150 inline-size: $modal-wider-width;
151 max-inline-size: $modal-wider-max-width;
155 inline-size: $modal-full-dimension;
156 max-inline-size: $modal-full-dimension;
157 block-size: $modal-full-dimension;
158 max-block-size: $modal-full-dimension;
162 .modal--height-auto {
164 max-block-size: $modal-full-dimension;
170 &:focus:focus-visible {
178 inset-block-start: 0;
187 // not defined, left this in case of
188 // .modal-close:focus,
189 // .modal-close:hover,
190 // .modal-close:active {
192 // .modal-close:hover,
193 // .modal-close:active {
198 flex-direction: column;
205 padding-block: rem(30) rem(15);
206 padding-inline: rem(30);
218 padding-block: rem(15) rem(30);
219 padding-inline: rem(30);
224 // only for Safari the ugly
225 min-block-size: rem(34);
228 // single button on right
229 [class*='button']:only-child {
230 margin-inline-start: auto;
233 // for vertically displayed buttons
235 [class*='button'] + [class*='button'] {
236 margin-block-start: 0.5em;
241 .modal-content-inner {
243 overflow: hidden auto;
246 padding-inline: rem(30);
247 background: var(--modal-background-color) no-repeat;
250 margin-block-start: 0;
258 // adaptation for labels
259 $label-shorter-width: 10em !default;
261 .modal--shorter-labels .label {
262 inline-size: var(--label-shorter-width, $label-shorter-width);
265 @include media('<=small') {
266 .modal--shorter-labels .flex-column .label {
271 // modal with title visually hidden
272 .modal-header--no-title {
273 padding-block-start: rem(20);
276 @include media('height<=#{$breakpoint-low-height-modal}') {
278 max-block-size: $modal-full-dimension;
282 padding-block-end: rem(10);
286 padding-block: rem(10) rem(5);
291 @include media('<=#{$modal-breakpoint-width}') {
292 .modal:not(.modal--tiny) {
296 max-inline-size: 98%;
302 max-inline-size: 95%;
307 @include media('>xlarge') {
309 max-inline-size: $modal-full-max-width;