src/aria/widgets/Icon.js
function (iconInfo) {
            var cfg = this._cfg;
            var vAlign = !cfg.verticalAlign ? "" : "vertical-align: " + cfg.verticalAlign;
            var margins = "margin: 0 0 0 0 "; // default value

            if (cfg.margins != null && cfg.margins.match(/^(\d+|x) (\d+|x) (\d+|x) (\d+|x)$/)) {
                var margArray = cfg.margins.split(" ");
                margins = ['margin:', margArray[0], 'px ', margArray[1], 'px ', margArray[2], 'px ', margArray[3],
                        'px; '].join('');
            } else if (iconInfo.margins != null) {
                margins = iconInfo.margins;
            }
            if (cfg.sourceImage) {
                return [margins, ';padding:0;background:url(', iconInfo.imageURL, ') no-repeat; width:',
                        iconInfo.width, 'px;height:', iconInfo.height, 'px;', vAlign].join('');
            } else {
                return [margins, ';padding:0;background-position:-', iconInfo.iconLeft, 'px -', iconInfo.iconTop,
                        'px;', vAlign].join('');
            }
        }
function (iconInfo) {
            var cfg = this._cfg;
            var vAlign = !cfg.verticalAlign ? "" : "vertical-align: " + cfg.verticalAlign;
            var margins = "margin: 0 0 0 0 "; // default value

            if (cfg.margins != null && cfg.margins.match(/^(\d+|x) (\d+|x) (\d+|x) (\d+|x)$/)) {
                var margArray = cfg.margins.split(" ");
                margins = ['margin:', margArray[0], 'px ', margArray[1], 'px ', margArray[2], 'px ', margArray[3],
                        'px; '].join('');
            } else if (iconInfo.margins != null) {
                margins = iconInfo.margins;
            }
            if (cfg.sourceImage) {
                return [margins, ';padding:0;background:url(', iconInfo.imageURL, ') no-repeat; width:',
                        iconInfo.width, 'px;height:', iconInfo.height, 'px;', vAlign].join('');
            } else {
                return [margins, ';padding:0;background-position:-', iconInfo.iconLeft, 'px -', iconInfo.iconTop,
                        'px;', vAlign].join('');
            }
        }
function ( iconInfo ) { var cfg = this . _cfg ; var vAlign = ! cfg . verticalAlign ? "" : "vertical-align: " + cfg . verticalAlign ; var margins = "margin: 0 0 0 0 " ; // default value if ( cfg . margins != null && cfg . margins . match ( / ^(\d+|x) (\d+|x) (\d+|x) (\d+|x)$ / ) ) { var margArray = cfg . margins . split ( " " ) ; margins = [ 'margin:' , margArray [ 0 ] , 'px ' , margArray [ 1 ] , 'px ' , margArray [ 2 ] , 'px ' , margArray [ 3 ] , 'px; ' ] . join ( '' ) ; } else if ( iconInfo . margins != null ) { margins = iconInfo . margins ; } if ( cfg . sourceImage ) { return [ margins , ';padding:0;background:url(' , iconInfo . imageURL , ') no-repeat; width:' , iconInfo . width , 'px;height:' , iconInfo . height , 'px;' , vAlign ] . join ( '' ) ; } else { return [ margins , ';padding:0;background-position:-' , iconInfo . iconLeft , 'px -' , iconInfo . iconTop , 'px;' , vAlign ] . join ( '' ) ; } }
Return the icon style for a given icon skin
@param {Object} iconInfo
@protected
@return {String}
Return the icon style for a given icon skin