Skip to content

Instantly share code, notes, and snippets.

@ayoungh
Created December 13, 2012 13:54
Show Gist options
  • Save ayoungh/4276512 to your computer and use it in GitHub Desktop.
Save ayoungh/4276512 to your computer and use it in GitHub Desktop.
A CodePen by Anthony Young. Awesome textarea - A really nice textarea with a background colour change on focus
<h2>Awesome Textarea</h2>
<textarea placeholder="This is an awesome comment box" rows="20" name="comment[text]" id="comment_text" cols="40" class="ui-autocomplete-input" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"></textarea>
body {background: #F0F0F0;}
h2 {margin-left: 55px;}
textarea {
margin-top: 10px;
margin-left: 50px;
width: 500px;
height: 100px;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.07);
border-color: -moz-use-text-color #FFFFFF #FFFFFF -moz-use-text-color;
border-image: none;
border-radius: 6px 6px 6px 6px;
border-style: none solid solid none;
border-width: medium 1px 1px medium;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) inset;
color: #555555;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 1em;
line-height: 1.4em;
padding: 5px 8px;
transition: background-color 0.2s ease 0s;
}
textarea:focus {
background: none repeat scroll 0 0 #FFFFFF;
outline-width: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment