Hello,
I have few components which are displayed in modal. Few Components have smaller content and few are larger. So i want the modal height and width to resize based on the content.
I have used the following styles and it worked perfectly when the app was in version 3.
ion-modal{
@media (min-height: 500px) {
ion-backdrop {
visibility: visible;
}
}
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: $z-index-overlay;
display: flex;
align-items: center;
justify-content: center;
contain: strict;
.modal-wrapper {
&,
.ion-page,
.ion-page .content,
.ion-page .content .scroll-content {
contain: content;
position: relative;
top: auto;
left: auto;
padding:1px;
}
z-index: $z-index-overlay-wrapper;
display: flex;
overflow: hidden;
flex-direction: column;
min-width: $alert-min-width;
max-height: $alert-max-height;
opacity: 0;
height: auto;
max-width: $alert-md-max-width;
border-radius: $alert-md-border-radius;
background-color: $alert-md-background-color;
box-shadow: $alert-md-box-shadow;
border-radius: 25px;
padding:5px;
.ion-page .content {
background-color: color($colors, light);
}
}
}
After updating the app to version 4, i get the following error:
Module build failed:
z-index: $z-index-overlay;
^
Undefined variable: "$z-index-overlay".
Can somebody tell me a way to resize the modal size based on its content in Ionicv4?
Thank you