googlearchive / paper-dialog

A dialog à la Material Design
19 stars 16 forks source link

Styling gets lots after toggling the visibility #8

Closed chevdor closed 9 years ago

chevdor commented 10 years ago

I am using:

   <paper-dialog heading="Dialog" transition="paper-dialog-transition-center" tabindex="-1" class="paper-dialog-transition paper-dialog-transition-center" style="z-index: 26; position: fixed; display: none; width: 50%;">
    <p>Lorem Ipsum...</p>
    <paper-button label="OK" affirmative="" default="" role="button" tabindex="0" aria-label="OK"></paper-button>
  </paper-dialog>```

Notice the ```width: 50%```

When the dialog shows up the first time, the width is correctly set to 50%.
If I dismiss the dialog and opens it again, the width attribute is lost.
morethanreal commented 10 years ago

core-overlay is resetting the inline styles of the dialog when it closes. @sorvell

You can work around this by styling the dialog with a class, e.g.

.dialog {
  width: 50%;
}
<paper-dialog class="dialog">
  something...
</paper-dialog>
morethanreal commented 9 years ago

This should be fixed.