nl_tokens: Returns value that should be reflected for <code > refName< / code > CSS property from <code > curName< / code > property . This function is used for special cases when the same result must be achieved with different properties for different browsers . For example : opаcity : 0 . 5 ; → filter : alpha ( opacity = 50 ) ; <br > <br >
pl_tokens: function getReflectedValue ( curName , curValue , refName , refValue ) { var cssEditTree = require ( 'cssEditTree' ) ; var utils = <mask> ( 'utils' ) ; curName = cssEditTree . baseName ( curName ) ; refName = cssEditTree . baseName ( refName ) ; if ( curName == 'opacity' && refName == 'filter' ) { return refValue . replace ( / opacity=[^)]* / i , 'opacity=' + Math . floor ( parseFloat ( curValue ) * 100 ) ) ; } else if ( curName == 'filter' && refName == 'opacity' ) { var m = curValue . match ( / opacity=([^)]*) / i ) ; return m ? utils . prettifyNumber ( parseInt ( m [ 1 ] ) / 100 ) : refValue ; } return curValue ; }