Bläddra i källkod

Preserve line breaks in text messages

RobinLinus 4 år sedan
förälder
incheckning
288be1fa49
2 ändrade filer med 7 tillägg och 3 borttagningar
  1. 1 1
      client/index.html
  2. 6 2
      client/styles.css

+ 1 - 1
client/index.html

@@ -84,7 +84,7 @@
             <x-background class="full center">
                 <x-paper shadow="2">
                     <h3>Send a Message</h3>
-                    <input id="textInput" placeholder="Send a message" autocomplete="off" autofocus>
+                    <textarea id="textInput" placeholder="Send a message" autocomplete="off" autofocus></textarea>
                     <div class="row-reverse">
                         <button class="button" type="submit" close>Send</button>
                         <a class="button" close>Cancel</a>

+ 6 - 2
client/styles.css

@@ -367,6 +367,7 @@ x-dialog a{
     -webkit-user-select: all;
     -moz-user-select: all;
     user-select: all;
+    white-space: pre;
 }
 
 #receiveTextDialog #text a {
@@ -463,17 +464,20 @@ button::-moz-focus-inner {
 
 /* Text Input */
 
-input {
+input,
+textarea {
     width: 100%;
     box-sizing: border-box;
     border: none;
     outline: none;
     padding: 16px 24px;
     background: #f1f3f4;
-    border-radius: 50px;
+    border-radius: 16px;
     margin: 8px 0;
     line-height: 16px;
     font-size: 14px;
+    font-family: inherit;
+    resize: none;
 }