You want a minimal textarea
with no borders, or resize
-drag-icon.
Both when not selected and when focus
.
It's easy but you'll need to update rows
attribute via JS as newlines are added or removed during text input.
Here is the CSS
textarea, textarea:focus
{
font-family: "roboto","Helvetica Neue",Helvetica,Arial,sans-serif; /* make your choice */
font-size: 11px; /* make your choice */
border: none;
background: transparent;
-webkit-appearance: none;
-moz-apperarance: none;
-ms-appearance: none;
-o-appearance: none;
appearance: none;
outline: none;
padding: 0px;
resize: none;
width: 100%;
overflow: hidden;
-webkit-box-shadow: none;
-moz-box-shadow: none;
-ms-box-shadow: none;
-o-box-shadow: none;
box-shadow: none;
}
in order to keep things working as expected (looking good) you have to programmatically set/update textarea
's attribute rows
to the count of \r\n
in the the textarea
contents plus 1 when the contents is set and when it's updated (user input / other)