code: function(attr) {
          var el = this.getEl();
          var val = Y.Dom.getStyle(el, attr);
  
          if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) {
              return parseFloat(val);
          }
          
          var a = this.patterns.offsetAttribute.exec(attr) || [];
          var pos = !!( a[3] ); // top or left
          var box = !!( a[2] ); // width or height
          
          if ('style' in el) {
              // use offsets for width/height and abs pos top/left
              if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) {
                  val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
              } else { // default to zero for other 'auto'
                  val = 0;
              }
          } else if (attr in el) {
              val = el[attr];
          }
  
          return val;
      }
docs: Returns current value of the attribute.
  @method getAttribute
  @param {String} attr The name of the attribute.
  @return {Number} val The current value of the attribute.