nl_tokens: 把 style 里面的 background 属性转换成简写形式 用于减少代码
pl_tokens: function ( ) { var background = '' , style = this ; if ( <mask> . getPropertyValue ( 'background' ) ) { return ; } var positionText = this . removeProperty ( 'background-position-x' ) + ' ' + this . removeProperty ( 'background-position-y' ) ; style . setProperty ( 'background-position' , positionText . trim ( ) , null ) ; var toMergeAttrs = [ 'background-color' , 'background-image' , 'background-position' , 'background-repeat' , 'background-attachment' , 'background-origin' , 'background-clip' ] ; for ( var i = 0 , item ; item = toMergeAttrs [ i ] ; i ++ ) { if ( style . hasOwnProperty ( item ) ) { background += this . removeProperty ( item ) + ' ' ; } } if ( background . trim ( ) ) { style . setProperty ( 'background' , background . trim ( ) , null ) ; } }