As the demands of the web change and developers experiment with different user experiences, the need for more native language improvements expands. Our presentation layer, CSS, has done incredibly well in improving capabilities, even if sometimes too slow. The need for native support for automatically expanding textarea
elements has been long known…and it’s finally here!
To allow textarea
elements to grow vertically and horizontally, add the field-sizing
property with a value of content
:
textarea { field-sizing: content; // default is `fixed` }
The default value for field-sizing
is fixed
, signaling current behavior. The new behavior, content
, will expand as much as possible. To constrain the size a textarea
can grow, use traditional width/max-width
and height/max-height
properties.
Page Visibility API
One event that’s always been lacking within the document is a signal for when the user is looking at a given tab, or another tab. When does the user switch off our site to look at something else? When do they come back?
Creating Scrolling Parallax Effects with CSS
Introduction For quite a long time now websites with the so called “parallax” effect have been really popular. In case you have not heard of this effect, it basically includes different layers of images that are moving in different directions or with different speed. This leads to a…
Create Spinning Rays with CSS3 Animations & JavaScript
Thomas Fuchs, creator of script2 (scriptaculous’ second iteration) and Zepto.js (mobile JavaScript framework), creates outstanding animated elements with JavaScript. He’s a legend in his own right, and for good reason: his work has helped to inspire developers everywhere to drop Flash and opt…
[ad_2]
Source link