nl_tokens: Produces linear gradient definition used in early Webkit implementations
pl_tokens: function ( gradient ) { if ( _ . isString ( gradient ) ) gradient = this . parse ( gradient ) ; if ( ! gradient ) return null ; var colorStops = _ . map ( gradient . colorStops , _ . clone ) ; // normalize color-stops position _ . each ( colorStops , function ( cs ) { if ( ! ( 'position' in cs ) ) // implied position return ; if ( ~ cs . position . indexOf ( '.' ) || cs . unit == '%' ) { cs . position = parseFloat ( cs . position ) / ( cs . unit == '%' ? 100 : 1 ) ; } else { throw "Can't convert color stop '" + ( cs . <mask> + ( cs . unit || '' ) ) + "'" ; } } ) ; fillImpliedPositions ( colorStops ) ; // transform color-stops into string representation colorStops = _ . map ( colorStops , function ( cs , i ) { if ( ! cs . position && ! i ) return 'from(' + cs . color + ')' ; if ( cs . position == 1 && i == colorStops . length - 1 ) return 'to(' + cs . color + ')' ; return 'color-stop(' + ( cs . position . toFixed ( 2 ) . replace ( / \.?0+$ / , '' ) ) + ', ' + cs . color + ')' ; } ) ; return '-webkit-gradient(linear, ' + oldWebkitDirection ( gradient . direction ) + ', ' + colorStops . join ( ', ' ) + ')' ; }