From aee3fb3692bbc99ac45161f0223a6d74adb92dfe Mon Sep 17 00:00:00 2001 From: Brijesh Bittu Date: Fri, 27 Mar 2015 22:59:34 +0530 Subject: [PATCH] added css animation to only the dialog part and also added opacity to bg --- bower.json | 2 +- css/msc-style.css | 13 +++++++++++++ js/msc-script.js | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 7368506..eb15588 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "medium-style-confirm", - "version": "0.2.0", + "version": "0.2.1", "homepage": "http://bitwiser.i/medium-style-confirm/", "authors": [ "Brijesh Bittu " diff --git a/css/msc-style.css b/css/msc-style.css index 4573035..8669550 100644 --- a/css/msc-style.css +++ b/css/msc-style.css @@ -32,6 +32,7 @@ top: 0; height: 100%; width: 100%; + opacity: 0.9; left: 0; background-color: #fff; z-index: 20; @@ -70,9 +71,21 @@ opacity: 1.0; max-width: 480px; margin: 10% auto 10% auto; + padding: 40px; text-align: center; } +@media (max-width: 600px) { + .msc-content { + padding: 10px; + } +} +@media (max-width: 600px) { + .msc-content { + padding: 0px; + } +} + .msc-title { font-size: 2em; margin: 0 0 0.1em 0; diff --git a/js/msc-script.js b/js/msc-script.js index b14a439..34937d6 100644 --- a/js/msc-script.js +++ b/js/msc-script.js @@ -70,7 +70,7 @@ dialog.appendChild(content); document.body.appendChild(dialog); dialog.style.display = 'block'; - dialog.classList.add('msc-confirm--animate'); + content.classList.add('msc-confirm--animate'); cancelbtn.focus(); document.addEventListener('keyup', _hide); @@ -106,4 +106,4 @@ //window.msc = MscConfirm; window.mscConfirm = MscConfirm; -})(); \ No newline at end of file +})();