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

proposal(dialog): better handling of scrollable content #3

Closed
wants to merge 1 commit into from

Commits on Dec 31, 2016

  1. proposal(dialog): better handling of scrollable content

    Currently, the dialog's scrollable content (md-dialog-content) is limited to 65% of the viewport height, however on smaller screens the dialog still ends up being too high (see issue angular#2481). This proposal reworks the `md-dialog-content` to make it take up all of the remaining height, instead of being hardcoded to 65%. The max height is provided by the wrapper instead.
    
    The issue with this approach is that the direct parent of the `md-dialog-content` has to be `display: flex`, which can end up modifying the user's content. I see a couple of solutions, but I'm not sure which one to go with:
    
    1. Conditionally add the flexbox styles, if the user has used `md-dialog-content`. That's what this PR is doing, however using `querySelector` to find out if the dialog content is there feels a little dirty. We're not able to use `@ViewChild` or `@ContentChild` to query for it.
    2. Force the user to use our dialog content elements. This is what Material 1 was doing.
    crisbeto committed Dec 31, 2016
    Configuration menu
    Copy the full SHA
    5877b8a View commit details
    Browse the repository at this point in the history