Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-dialog sizing feature broken in new releases #6871

Closed
manish2535 opened this issue Jan 27, 2016 · 5 comments
Closed

md-dialog sizing feature broken in new releases #6871

manish2535 opened this issue Jan 27, 2016 · 5 comments
Assignees
Labels
P1: urgent Urgent issues that should be addressed in the next minor or patch release. ui: flexbox
Milestone

Comments

@manish2535
Copy link

In recent releases <md-dialog> is wrapped into another md-dialog-container. Due to this the sizing feature of the dialogs has stopped working.

The sizing will only work if the parent element has a layout="row" attribute added. Since md-dialog-container is added dynamically, we cant add that attribute either.

Here is the piece of styling that is supposed to take care of it-

.layout-row > .flex-66, .layout-row > .flex-66, 
.layout-row > .flex-66, .layout-row > .flex-66 {

  -webkit-flex: 1 1 66%;
      -ms-flex: 1 1 66%;
          flex: 1 1 66%;
  max-width: calc(200% / 3);
  max-height: 100%;
  box-sizing: border-box; 

}
@ThomasBurleson ThomasBurleson added this to the 1.1.0 milestone Jan 27, 2016
@ThomasBurleson ThomasBurleson self-assigned this Jan 27, 2016
@ThomasBurleson
Copy link
Contributor

Please provide a CodePen or Plunkr that demonstrates this issue. Here are some starter demo templates that you can use/fork:

@ThomasBurleson ThomasBurleson modified the milestones: 1.0.4, 1.1.0 Jan 27, 2016
@ThomasBurleson ThomasBurleson added the P1: urgent Urgent issues that should be addressed in the next minor or patch release. label Jan 27, 2016
@manish2535
Copy link
Author

Basically multiples 5 WILL WORK but multiples of 33 WILL NOT WORK.

If you go to this copdepen -

http://codepen.io/anon/pen/pgVOpe

and click on the Tab Dialog Button, you will see the Dialog is not re sizing to 66% of the body even though it has <md-dialog aria-label="Mango (Fruit)" flex="66">. This is because the following styling is missing from the angular-material.css

.flex-66 {
  -webkit-flex: 1 1 66%;
      -ms-flex: 1 1 66%;
          flex: 1 1 66%;
  max-width: calc(200% / 3);
  max-height: 100%;
  box-sizing: border-box; }

@ThomasBurleson ThomasBurleson modified the milestones: 1.0.4, 1.0.5 Jan 30, 2016
@ThomasBurleson
Copy link
Contributor

The dialog sizing is NOT affected with the Layout API; these directives layout, flex (etc) only affects the containers and element inside the dialog.

@manish2535
Copy link
Author

Thanks for confirming.

@manish2535
Copy link
Author

Just saw this in the Docs - https://material.angularjs.org/latest/api/service/$mdDialog

Sizing
Complex dialogs can be sized with flex="percentage", i.e. flex="66".

So letting you know that <md-dialog aria-label="List dialog" flex="66"> does not work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1: urgent Urgent issues that should be addressed in the next minor or patch release. ui: flexbox
Projects
None yet
Development

No branches or pull requests

2 participants