Ensure the editing textarea is not higher than browser's viewport
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 31 Jan 2017 00:03:38 +0000 (01:03 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 8 Feb 2017 15:02:18 +0000 (15:02 +0000)
Limit it to 100vh. 'vh' is a new unit introduced in CSS3, representing 1%
of the viewport height, and fairly widely supported in today's browsers:
<http://caniuse.com/#feat=viewport-units>.

Bug: T155886
Change-Id: I4a32d7d5c4eb110c9ecd0b6b13e4c176d343d82f

resources/src/mediawiki.action/mediawiki.action.edit.styles.css

index 0ee4058..d288e6b 100644 (file)
@@ -6,6 +6,10 @@
 #wpTextbox1 {
        margin: 0;
        display: block;
+       /* Ensure the textarea is not higher than browser's viewport on small screens */
+       max-height: 100vh;
+       /* But don't let it collapse into nothingness on really tiny screens */
+       min-height: 5em;
 }
 
 /* Adjustments to edit form elements */