tasks/remfallback.js
function remToPx(remArray) {

        var pxArray = remArray.map(function(v) {
          if (regexCalc.test(v)) {
            return v;
          } else if (regexRem.test(v)) {

            // this one is needed to split properties like '2rem/1.5'
            var restValue = '';
            if (/\//.test(v)) {
              restValue = v.match(/\/.*/);
            }

            // replace 'rem' and anything that comes after it, we'll repair this later
            var unitlessValue = v.replace(/rem.*/, '');
            var pxValue = preciseRound(unitlessValue * rootSize) + 'px';
            var newValue = restValue ? pxValue + restValue : pxValue;

            remFound++;
            return newValue;
          }
          return v;
        }).join(' ');

        return pxArray;
      }
function remToPx(remArray) {

        var pxArray = remArray.map(function(v) {
          if (regexCalc.test(v)) {
            return v;
          } else if (regexRem.test(v)) {

            // this one is needed to split properties like '2rem/1.5'
            var restValue = '';
            if (/\//.test(v)) {
              restValue = v.match(/\/.*/);
            }

            // replace 'rem' and anything that comes after it, we'll repair this later
            var unitlessValue = v.replace(/rem.*/, '');
            var pxValue = preciseRound(unitlessValue * rootSize) + 'px';
            var newValue = restValue ? pxValue + restValue : pxValue;

            remFound++;
            return newValue;
          }
          return v;
        }).join(' ');

        return pxArray;
      }
function remToPx ( remArray ) { var pxArray = remArray . map ( function ( v ) { if ( regexCalc . test ( v ) ) { return v ; } else if ( regexRem . test ( v ) ) { // this one is needed to split properties like '2rem/1.5' var restValue = '' ; if ( / \/ / . test ( v ) ) { restValue = v . match ( / \/.* / ) ; } // replace 'rem' and anything that comes after it, we'll repair this later var unitlessValue = v . replace ( / rem.* / , '' ) ; var pxValue = preciseRound ( unitlessValue * rootSize ) + 'px' ; var newValue = restValue ? pxValue + restValue : pxValue ; remFound ++ ; return newValue ; } return v ; } ) . join ( ' ' ) ; return pxArray ; }
convert rem to px
convert rem to px