Browse Source

LibWeb: Add some default style for <textarea> elements and a test

Daniel Lemos 3 years ago
parent
commit
3eb6016dda

+ 5 - 0
Base/res/html/misc/textarea.html

@@ -0,0 +1,5 @@
+<!doctype html>
+<textarea>
+This is some text
+inside a &lt;textarea&gt;
+</textarea>

+ 1 - 0
Base/res/html/misc/welcome.html

@@ -72,6 +72,7 @@
             <li><a href="blink.html">blink</a></li>
             <li><a href="br.html">br</a></li>
             <li><a href="progressbar.html">progressbar</a></li>
+            <li><a href="textarea.html">textarea</a></li>
         </ul>
 
         <h2>CSS</h2>

+ 7 - 1
Userland/Libraries/LibWeb/CSS/Default.css

@@ -222,7 +222,7 @@ ol {
 }
 
 /* FIXME: This is a temporary hack until we can render a native-looking frame for these. */
-input {
+input, textarea {
     border: 1px solid black;
     min-width: 80px;
     min-height: 16px;
@@ -231,6 +231,12 @@ input {
     overflow: hidden;
 }
 
+textarea {
+    padding: 2px;
+    display: inline-block;
+    overflow: scroll;
+}
+
 input[type=submit], input[type=button], input[type=reset], input[type=checkbox], input[type=radio] {
     border: none;
     min-width: unset;