Skip to content

Commit

Permalink
add static width example to demo page, and support static width (see …
Browse files Browse the repository at this point in the history
…Issue #16)
  • Loading branch information
bgrins committed May 24, 2012
1 parent fb8c8cf commit 97aa512
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion expanding.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
'paddingTop','paddingBottom',
'marginLeft', 'marginRight',
'marginTop','marginBottom',
'boxSizing', 'webkitBoxSizing', 'mozBoxSizing', 'msBoxSizing'
'boxSizing', 'webkitBoxSizing', 'mozBoxSizing', 'msBoxSizing',
'width'
];

var textareaCSS = {
Expand Down
18 changes: 18 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
width: 100%;
}

.exampleStaticWidth textarea {
width: 400px;
}

.exampleFonts textarea {
font-family: Arial;
color: orange;
Expand Down Expand Up @@ -205,6 +209,20 @@ <h3>Maximum Height</h3>
<textarea class='expanding' placeholder='Enter Some Text'></textarea>
</div>

<div class='example exampleStaticWidth'>
<h3>Static Width</h3>
<p>
Just set a static width on the textarea, and the pre tag will snap to fit it!

</p>
<pre><code>
textarea {
width: 400px;
}</code></pre>


<textarea class='expanding' placeholder='Enter Some Text'></textarea>
</div>

<div class='example exampleFonts'>
<h3>
Expand Down

0 comments on commit 97aa512

Please sign in to comment.