Skip to content

Commit

Permalink
Modal Dialog Example: Make Full Screen on Small Devices (pull #373)
Browse files Browse the repository at this point in the history
For issue #321, when displayed on screen under 640px, make the dialog full screen with no margins.
  • Loading branch information
tatermelon authored and mcking65 committed Apr 24, 2017
1 parent 215367e commit cfa6cfd
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions examples/dialog-modal/css/dialog.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
html, body {
height: 100%;
}

body {
max-width: 100%;
padding: 0;
Expand All @@ -11,9 +15,10 @@ body:not(.toc-inline) {

#base_window_layer {
box-sizing: border-box;
height: 100vh;
height: 100%;
width: 100%;
overflow-y: scroll;
/* Use overflow scroll and webkit-overflow-scrolling to add momentum scroll*/
overflow: scroll;
-webkit-overflow-scrolling: touch;
padding: 1.6em 0 2em;
}
Expand Down Expand Up @@ -51,7 +56,7 @@ body:not(.toc-inline) #main_content main, body:not(.toc-inline) #main_content na
height: 100vh;
top: 0;
left: 0;
overflow-y: scroll;
overflow: scroll;
-webkit-overflow-scrolling: touch;
background: rgba(0, 0, 0, 0.3);
}
Expand All @@ -65,17 +70,19 @@ div.default_dialog {
padding: 5px;
border: thin #000 solid;
background-color: #fff;
position: absolute;;
position: absolute;
top: 25%;
left: 25%;
}

@media screen and (max-width: 640px) {
div.default_dialog {
box-sizing: border-box;
top: 1%;
left: 2%;
width: 96%;
top: 0px;
left: 0px;
margin-bottom: 0px;
min-height: 100%;
width: 100%;
}
}

Expand Down

0 comments on commit cfa6cfd

Please sign in to comment.