Skip to content

Commit

Permalink
Fixed #8, #9, and included changes from #7 (credit to empurium ), reb…
Browse files Browse the repository at this point in the history
…uilt minified files
  • Loading branch information
jsimnz committed Mar 16, 2016
1 parent 97eb214 commit 22f75a1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/nifty.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/nifty.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions lib/nifty.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ perspective effects (not including the modals and the overlay).
perspective: 600px;
}

.container {
background: #e74c3c;
min-height: 100%;
}

.nifty-modal {
position: fixed;
top: 50%;
Expand Down Expand Up @@ -57,7 +52,7 @@ perspective effects (not including the modals and the overlay).
transition: all 0.3s;
}

.md-show ~ .md-overlay {
body.md-show .md-overlay {

This comment has been minimized.

Copy link
@empurium

empurium Mar 16, 2016

Contributor

Where does the md-overlay div go now? It seems if I put it anywhere in the body, it always shows the overlay until you click away from it.

This comment has been minimized.

Copy link
@jsimnz

jsimnz Mar 17, 2016

Author Owner

Thats odd, im testing it over here on my side. The changes I made allows the md-overlay to go anywhere in the DOM tree, where as before the overlay had to be a sibling element to any nifty-modal element.

Are you saying the md-overlay is still visible after the modal has been closed?

Feel free to create a new actual issue as well, might make this conversation a bit better

opacity: 1;
visibility: visible;
}
Expand Down Expand Up @@ -727,5 +722,5 @@ perspective effects (not including the modals and the overlay).
}

@media screen and (max-width: 32em) {
body { font-size: 75%; }
.nifty-modal { font-size: 75%; }
}
4 changes: 4 additions & 0 deletions lib/nifty.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
});
updateHandler();
$(self).addClass("md-show");
$("body").addClass("md-show");

This comment has been minimized.

Copy link
@empurium

empurium Mar 16, 2016

Contributor

Perhaps a good solution would be to insert the md-overlay div into the body/DOM upon show?

};

var hideHandler = function() {
Expand All @@ -68,6 +69,9 @@
}
});
$(self).removeClass("md-show");
if ($(".nifty-modal.md-show").length == 0) {
$("body").removeClass("md-show")
}
};

var updateHandler = function() {
Expand Down

0 comments on commit 22f75a1

Please sign in to comment.