Permalink
Browse files

Corner styling for dialog and popup header/content/footer. Also fixes #…

  • Loading branch information...
jaspermdegroot committed Nov 6, 2012
1 parent 1103537 commit d8d2992ba49b05f60b72d5c8b060461874cc7775
Showing with 20 additions and 48 deletions.
  1. +19 −1 css/structure/jquery.mobile.core.css
  2. +0 −40 css/structure/jquery.mobile.popup.css
  3. +1 −7 js/widgets/dialog.js
@@ -65,9 +65,27 @@ div.ui-mobile-viewport { overflow-x: hidden; }
.ui-header .ui-title, .ui-footer .ui-title { min-height: 1.1em; text-align: center; font-size: 16px; display: block; margin: .6em 30% .8em; padding: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; outline: 0 !important; }
.ui-footer .ui-title { margin: .6em 15px .8em; }
/*content area*/
/* content area*/
.ui-content { border-width: 0; overflow: visible; overflow-x: hidden; padding: 15px; }
/* corner styling for dialogs and popups */
.ui-corner-all > .ui-header:first-child,
.ui-corner-all > .ui-content:first-child,
.ui-corner-all > .ui-footer:first-child {
-webkit-border-top-left-radius: inherit;
border-top-left-radius: inherit;
-webkit-border-top-right-radius: inherit;
border-top-right-radius: inherit;
}
.ui-corner-all > .ui-header:last-child,
.ui-corner-all > .ui-content:last-child,
.ui-corner-all > .ui-footer:last-child {
-webkit-border-bottom-left-radius: inherit;
border-bottom-left-radius: inherit;
-webkit-border-bottom-right-radius: inherit;
border-bottom-right-radius: inherit;
}
/* icons sizing */
.ui-icon { width: 18px; height: 18px; }
@@ -131,44 +131,4 @@
.ui-popup > .ui-btn-left { left: -9px; }
.ui-popup > .ui-btn-right { right: -9px; }
.ui-popup.ui-corner-all > .ui-header,
.ui-popup.ui-corner-all ~ .ui-content,
.ui-popup.ui-corner-all > .ui-content:first-child {
-webkit-border-top-left-radius: inherit;
border-top-left-radius: inherit;
-webkit-border-top-right-radius: inherit;
border-top-right-radius: inherit;
}
.ui-popup.ui-corner-all > .ui-content,
.ui-popup.ui-corner-all > .ui-footer,
.ui-popup.ui-corner-all > .ui-header:nth-child(n):last-child {
-webkit-border-bottom-left-radius: inherit;
border-bottom-left-radius: inherit;
-webkit-border-bottom-right-radius: inherit;
border-bottom-right-radius: inherit;
}
.ui-popup.ui-corner-all > .ui-content:nth-child(2),
.ui-popup.ui-corner-all > .ui-header:nth-child(2) {
-webkit-border-top-left-radius: 0;
border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
border-top-right-radius: 0;
}
.ui-popup.ui-corner-all > .ui-content:nth-last-child(1n+2),
.ui-popup.ui-corner-all > .ui-footer:nth-last-child(1n+2) {
-webkit-border-bottom-left-radius: 0;
border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
border-bottom-right-radius: 0;
}
.ui-popup.ui-corner-all > .ui-header:only-child,
.ui-popup.ui-corner-all > .ui-footer:only-child {
-webkit-border-radius: inherit;
border-radius: inherit;
}
.ui-popup-hidden { top: -99999px; left: -9999px; }
View
@@ -32,13 +32,7 @@ $.widget( "mobile.dialog", $.mobile.widget, {
.wrapInner( dialogWrap )
.children()
.find( ":jqmData(role='header')" )
.prepend( headerCloseButton )
.end()
.children( ':first-child')
.addClass( "ui-corner-top" )
.end()
.children( ":last-child" )
.addClass( "ui-corner-bottom" );
.prepend( headerCloseButton );
// this must be an anonymous function so that select menu dialogs can replace
// the close method. This is a change from previously just defining data-rel=back

0 comments on commit d8d2992

Please sign in to comment.