Skip to content

Commit c99aa07

Browse files
Docs (dialogs): Updated the info about default width and margins to match the actual CSS.
1 parent f1f2b1b commit c99aa07

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/pages/page-dialogs.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,16 @@ <h2>Styling &amp; theming</h2>
7979
<a href="dialog-buttons.html" data-role="button" data-inline="true" data-rel="dialog" data-transition="slidedown">Share photos...</a>
8080

8181
<h2>Dialog width and margins</h2>
82-
<p>For the sake of readability, dialogs have a default <code>max-width</code> of 500 pixels (plus 15px padding on each side). There is also a 10% top <code>margin</code> to give dialogs larger top margin on larger screens, but collapse to a small margin on smartphones. To override these styles, add the following CSS override rule to your stylesheet and tweak as needed:</p>
82+
<p>For the sake of readability, dialogs have a default <code>width</code> of 92.5% and a <code>max-width</code> of 500 pixels. There is also a 10% top <code>margin</code> to give dialogs larger top margin on larger screens, but collapse to a small margin on smartphones. The dialog's inner container is shifted towards the <code>top</code> with 15px to hide the corner styling if a dialog is used as a control sheet (see above). To override these styles, add the following CSS override rule to your stylesheet and tweak as needed:</p>
8383

8484
<pre><code>
85-
.ui-dialog .ui-header,
86-
.ui-dialog .ui-content,
87-
.ui-dialog .ui-footer {
88-
<strong> max-width: 500px;
89-
margin: 10% auto 15px auto; </strong>
85+
.ui-dialog-contain {
86+
<strong>width: 92.5%;</strong>
87+
<strong>max-width: 500px;</strong>
88+
<strong>margin: 10% auto 15px auto;</strong>
89+
padding: 0;
90+
position: relative;
91+
<strong>top: -15px;</strong>
9092
}
9193
</code></pre>
9294

0 commit comments

Comments
 (0)