LeaVerou / stretchy

Form element autosizing, the way it should be
https://stretchy.verou.me/
Other
1.27k stars 87 forks source link

Set min height #13

Open TheZoker opened 9 years ago

TheZoker commented 9 years ago

Is there any option to set a min-height to the fields? Because all my textfields are only 46px high on load (without content), but I want them to be 300px.

When I set min-height to 300px for this field, the height is 398px on load.

Also the selector does not work (all other fields are also changed):

Stretchy.selectors.filter = "#message";
<textarea id="message"/>
anfedorov commented 7 years ago

css min-heigth property should help: https://developer.mozilla.org/en-US/docs/Web/CSS/min-height

most likely you are running into this issue:

Note that to prevent Stretchy from being applied to elements that don’t match the selector at all, you would need to run that line before DOMContentLoaded fires.

Just use the data-stretchy-filter property on the script tag directly.