Yahoo releases new components to their YUI libraries

Yahoo began releasing it’s design and javascript libraries a few months ago. These are truly a great resource; you can benefit from some of the greatest minds at Yahoo! These scripts have been extensively tested for memory leaks, cross-browser support, and accessibility.

The latest release includes the module/container library. This group makes it super easy to add window functions to your site. These are not the popup windows of yesterday. This is about manipulating divs to hide or show on top of your existing content.

Yahoo! Tech was one of the first to implement this library, look at the dropdown menu in the top nav, “what are these words” in the tagnav, interactions for sending/saving products, and much more. It even gives you the ability to insert an iframe under the window if you have z-index issues in IE.

I am certainly the least experienced JavaScript programmer on our team and I have been able to grasp the core of these libraries. If I can do it, so can you. Visit the YUI blog for more information.

Input size in HTML and CSS

I’ve struggled over the past couple years with including size=”xx” in input tags. My right brain says, “it’s presentational, nooooo!” My left brain says “but it makes the forms more predictable.”

Well, lo and behold, there’s a reason behind the madness. Bite Sized Standards has a new post that describes why the size attribute isn’t just a presentational element.

However, unlike the size attribute of the infamous <font> tag, size of <input> specifies a functional property. The length of an input field is a programmatical decision because it provides an important cue as to the type of input expected: a cue that should be preserved even when the page is not styled.

The advantage of using size becomes apparent when working with web applications that make extensive use of forms, often with different layouts. Instead of having a plethora of CSS classes for different input field sizes, we could simply set their widths using size.
Bite Sized Standards

So, let both sides of your brain feel good. Use the size on input elements and have a happy day after all.

Update Your JavaScript Libraries

JavaScript libraries are a blessing to those of us that feel overwhelmed by the code. If you’ve used Prototype, Rico, Yahoo’s YUI libraries, or others in the past year, don’t neglect the versioning. These scripts get updated to fix bugs and add features.

I’m working on a project that had some annoying errors that were quickly fixed by simply upgrading to the most recent version of a YUI library object. Set yourself a reminder in Backpack or Thunderbird to check your sites every 4-6 months for updates, it’s an easy way to keep up to date.

CSS, XHTML, JavaScript, ROR Cheat Sheets

Dave Child has created a library of cheat sheets that have been pinned to cube walls around the world. If you haven’t seen these before, takes some time to visit his site and print your own versions. Attached to my wall are:

Mulberry Technologies also has a set of cheat sheets for XML Syntax (.pdf) and XSL 1.0 and XPath (.pdf) .