1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

Fix modals on small screens

Modals were impossible to use on small screens
This commit is contained in:
Jeremy Ruston 2013-08-21 21:14:21 +01:00
parent 83b90c5bb7
commit 6b70b0bf7c

View File

@ -706,12 +706,7 @@ canvas.tw-edit-bitmapeditor {
} }
.modal { .modal {
position: fixed;
top: 50%;
left: 50%;
z-index: 1100; z-index: 1100;
width: 560px;
margin: -250px 0 0 -280px;
background-color: #fff; background-color: #fff;
border: 1px solid #999; border: 1px solid #999;
border: 1px solid rgba(0,0,0,.3); border: 1px solid rgba(0,0,0,.3);
@ -719,6 +714,34 @@ canvas.tw-edit-bitmapeditor {
<<box-shadow "0 3px 7px rgba(0,0,0,0.3)">> <<box-shadow "0 3px 7px rgba(0,0,0,0.3)">>
} }
@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 { .modal-header {
padding: 9px 15px; padding: 9px 15px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
@ -730,8 +753,6 @@ canvas.tw-edit-bitmapeditor {
} }
.modal-body { .modal-body {
overflow-y: auto;
max-height: 400px;
padding: 15px; padding: 15px;
} }