1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2024-11-23 17:50:19 +01:00

Fix textarea not resizing to 100%

With declaration of doctype the textarea element did not resize to 100% height anymore due to HTML5 compliance mode changes
This commit is contained in:
Manuel 2021-02-14 22:56:34 +01:00
parent c00f65a385
commit e4998cb94c
Signed by: Manuel
GPG key ID: 4085037435E1F07A
2 changed files with 33 additions and 20 deletions

View file

@ -1,7 +1,18 @@
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
body {
background: #002B36;
}
.text-container {
padding: 20px 50px;
margin: 0px;
width: calc(100% - 100px);
height: calc(100% - 40px);
}
/* textarea */
@ -10,7 +21,7 @@ textarea {
background: transparent;
border: 0px;
color: #fff;
padding: 0px;
padding: 0;
width: 100%;
height: 100%;
font-family: monospace;
@ -26,7 +37,7 @@ textarea {
z-index: -1000;
position: absolute;
top: 20px;
left: 0px;
left: 0;
width: 30px; /* 30 to get 20 away from box */
font-size: 13px;
font-family: monospace;
@ -36,17 +47,18 @@ textarea {
/* code box when locked */
#box {
padding: 0px;
margin: 0px;
padding: 0;
margin: 0;
width: 100%;
border: 0px;
border: 0;
outline: none;
font-size: 13px;
overflow: inherit;
margin-bottom: 20px;
}
#box code {
padding: 0px;
padding: 0;
background: transparent !important; /* don't hide hastebox */
}
@ -54,8 +66,8 @@ textarea {
#key {
position: fixed;
top: 0px;
right: 0px;
top: 0;
right: 0;
z-index: +1000; /* watch out */
}
@ -67,8 +79,8 @@ textarea {
#box2 {
background: #08323c;
font-size: 0px;
padding: 0px 5px;
font-size: 0;
padding: 0 5px;
}
#box1 a.logo, #box1 a.logo:visited {
@ -104,11 +116,11 @@ textarea {
height: 5px;
width: 10px;
background: url(hover-dropdown-tip.png);
bottom: 0px;
bottom: 0;
position: absolute;
margin: auto;
left: 0px;
right: 0px;
left: 0;
right: 0;
}
#box3, #messages li {
@ -152,7 +164,7 @@ textarea {
#messages {
position:fixed;
top:0px;
top:0;
right:138px;
margin:0;
padding:0;
@ -168,4 +180,3 @@ textarea {
#messages li.error {
background:rgba(102,8,0,0.8);
}

View file

@ -62,5 +62,7 @@
</div>
<div id="linenos"></div>
<div class="text-container">
<pre id="box" style="display: none;" class="hljs" tabindex="0"><code></code></pre>
<textarea spellcheck="false" style="display: none;"></textarea>
</div>