From 6b70b0bf7c0790bcc9af379ced0b7fa68eb02d0f Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 21 Aug 2013 21:14:21 +0100 Subject: [PATCH] Fix modals on small screens Modals were impossible to use on small screens --- themes/tiddlywiki/snowwhite/base.tid | 35 ++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/themes/tiddlywiki/snowwhite/base.tid b/themes/tiddlywiki/snowwhite/base.tid index 81c402b13..e42794298 100644 --- a/themes/tiddlywiki/snowwhite/base.tid +++ b/themes/tiddlywiki/snowwhite/base.tid @@ -706,12 +706,7 @@ canvas.tw-edit-bitmapeditor { } .modal { - position: fixed; - top: 50%; - left: 50%; z-index: 1100; - width: 560px; - margin: -250px 0 0 -280px; background-color: #fff; border: 1px solid #999; border: 1px solid rgba(0,0,0,.3); @@ -719,6 +714,34 @@ canvas.tw-edit-bitmapeditor { <> } +@media (max-width: 55em) { + +.modal { + position: absolute; + top: 1em; + left: 1em; + right: 1em; +} + +.modal-body { + overflow-y: auto; + max-height: 400px; +} + +} + +@media (min-width: 55em) { + +.modal { + position: fixed; + top: 50%; + left: 50%; + width: 560px; + margin: -250px 0 0 -280px; +} + +} + .modal-header { padding: 9px 15px; border-bottom: 1px solid #eee; @@ -730,8 +753,6 @@ canvas.tw-edit-bitmapeditor { } .modal-body { - overflow-y: auto; - max-height: 400px; padding: 15px; }