Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: ion-modal does not display with height: auto in Ionic 6 #25092

Closed
4 of 6 tasks
askilondz opened this issue Apr 8, 2022 · 2 comments
Closed
4 of 6 tasks

bug: ion-modal does not display with height: auto in Ionic 6 #25092

askilondz opened this issue Apr 8, 2022 · 2 comments
Assignees
Labels

Comments

@askilondz
Copy link

askilondz commented Apr 8, 2022

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

Using a custom class in global.scss, cannot scale a modal's height based on its content. No modal content appears except the modal backdrop.

ion-modal {
    --background: #fff;

    &.auto-height {
        --border-radius: 16px;

        &::part(content) {
            width: 95vw;
            max-width: 450px;
            height: auto;
        }
    }
}

Expected Behavior

Expect to be able to scale modal height automatically based on its content.

Steps to Reproduce

Display a modal using the ModalController and set its class to use the .auto-height class in the css above.

Code Reproduction URL

No response

Ionic Info

Ionic CLI : 6.18.2
Ionic Framework : @ionic/angular 6.0.13
@angular-devkit/build-angular : 13.2.6
@angular-devkit/schematics : 13.2.6
@angular/cli : 13.2.6
@ionic/angular-toolkit : 6.1.0

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Apr 8, 2022
@liamdebeasi liamdebeasi self-assigned this Apr 8, 2022
@liamdebeasi
Copy link
Contributor

Thanks for the issue. I am going to close this as a duplicate of #24080.

@ionitron-bot
Copy link

ionitron-bot bot commented May 8, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators May 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants