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

md-dialog: forced padding #3963

Closed
michaelkrog opened this issue Jul 31, 2015 · 6 comments
Closed

md-dialog: forced padding #3963

michaelkrog opened this issue Jul 31, 2015 · 6 comments
Assignees
Labels
resolution: won't fix There are no resources to fix this issue, the priority is too low, or it doesn't align w/ MD spec.
Milestone

Comments

@michaelkrog
Copy link

I'm a bit unsure about the specs regarding using tabs in dialogs, but I do have an issue with it.

The md-dialog-content tag has a forced padding of 24px. Putting an md-tabs inside that makes it look like this:
skaermbillede 2015-07-31 kl 08 38 09

If I set style:"padding:0px" on md-dialog-content, then it looks much better:
skaermbillede 2015-07-31 kl 08 44 21

@ThomasBurleson ThomasBurleson added this to the 0.12.0 milestone Sep 1, 2015
@ThomasBurleson ThomasBurleson assigned tbosch and ThomasBurleson and unassigned tbosch Sep 1, 2015
@EladBezalel
Copy link
Member

@michaelkrog can you please check if It's still happening on HEAD?

@michaelkrog
Copy link
Author

@ThomasBurleson
Copy link
Contributor

  • For the Tabs demo's use class="md-padding" which adds padding:16px;; I have removed the padding for the first demo (to show how the tabs snaps to the parent container).
  • Here is one of our Dialog demos with and without padding:
    screen shot 2015-10-02 at 4 35 47 am
    screen shot 2015-10-02 at 4 35 57 am

You can see why we offer padding as a default. But it is easy enough to override.

For the Dialog, if you do not want padding just do this in your custom CSS:

md-dialog-content {
  padding : 0;
}

@ThomasBurleson ThomasBurleson added the resolution: won't fix There are no resources to fix this issue, the priority is too low, or it doesn't align w/ MD spec. label Oct 2, 2015
@EladBezalel
Copy link
Member

@ThomasBurleson maybe we should make .md-dialog-content class that users can put on their content and not force padding on the element

@ThomasBurleson
Copy link
Contributor

@EladBezalel - great idea. Make it so!

EladBezalel added a commit that referenced this issue Oct 7, 2015
…element

Content padding was forced on the user and caused other components as tabs not to work as wanted.

Moved the padding to a class that the user can specify on his content.

closes #3963
EladBezalel added a commit that referenced this issue Oct 8, 2015
…element

Content padding was forced on the user and caused other components as tabs not to work as wanted.
Moved the padding to a class that the user can specify on his content.

closes #3963. closes #4983.
@michaelkrog
Copy link
Author

I like the fact that padding is not forced, but the implementation is a bit confusing.

HTML example

 <md-dialog-content>
    <div class="md-dialog-content">
     ....
   </div>
 </md-dialog-content>

We already have directives that tell whether padding should be added or not. Why introduce another css class? And then a class that carries the same name as a directive?

Would'nt it be more simple to have it like this?

<md-dialog-content layout-padding>
</md-dialog-content>

Or if 'layout-padding' does not quite fit here, perhaps this:

<md-dialog-content padding="true">
</md-dialog-content>

@angular angular locked and limited conversation to collaborators Oct 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: won't fix There are no resources to fix this issue, the priority is too low, or it doesn't align w/ MD spec.
Projects
None yet
Development

No branches or pull requests

4 participants