From 112e3a9c5315856c2589af001d37ca2e4813431a Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 4 Jul 2012 15:46:29 +0200 Subject: [PATCH] The options window will now fit inside small screens. Fix #72. --- 4chan_x.user.js | 16 +++++++++++++--- script.coffee | 16 +++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 16e57db55..2a6644cf6 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -5044,9 +5044,9 @@ body.unscroll {\ }\ #overlay {\ top: 0;\ - right: 0;\ left: 0;\ - bottom: 0;\ + width: 100%;\ + height: 100%;\ text-align: center;\ background: rgba(0,0,0,.5);\ z-index: 1;\ @@ -5058,11 +5058,17 @@ body.unscroll {\ vertical-align: middle;\ }\ #options {\ + box-sizing: border-box;\ + -moz-box-sizing: border-box;\ display: inline-block;\ padding: 5px;\ + position: relative;\ text-align: left;\ vertical-align: middle;\ width: 600px;\ + max-width: 100%;\ + height: 500px;\ + max-height: 100%;\ }\ #credits {\ float: right;\ @@ -5082,8 +5088,12 @@ body.unscroll {\ text-decoration: underline;\ }\ #content {\ - height: 450px;\ overflow: auto;\ + position: absolute;\ + top: 2.5em;\ + right: 5px;\ + bottom: 5px;\ + left: 5px;\ }\ #content textarea {\ font-family: monospace;\ diff --git a/script.coffee b/script.coffee index 696b4d779..ca2f1e09c 100644 --- a/script.coffee +++ b/script.coffee @@ -3961,9 +3961,9 @@ body.unscroll { } #overlay { top: 0; - right: 0; left: 0; - bottom: 0; + width: 100%; + height: 100%; text-align: center; background: rgba(0,0,0,.5); z-index: 1; @@ -3975,11 +3975,17 @@ body.unscroll { vertical-align: middle; } #options { + box-sizing: border-box; + -moz-box-sizing: border-box; display: inline-block; padding: 5px; + position: relative; text-align: left; vertical-align: middle; width: 600px; + max-width: 100%; + height: 500px; + max-height: 100%; } #credits { float: right; @@ -3999,8 +4005,12 @@ body.unscroll { text-decoration: underline; } #content { - height: 450px; overflow: auto; + position: absolute; + top: 2.5em; + right: 5px; + bottom: 5px; + left: 5px; } #content textarea { font-family: monospace;