tasks/remfallback.js
function findRoot(r) {
        r.selectors.forEach(function(s) {

          // look for 'html' selectors
          if (regexHtml.test(s)) {

            r.declarations.forEach(function(d) {
              var foundSize = false;

              // look for the 'font' property
              if (d.property === 'font' && regexFont.test(d.value)) {
                foundSize = d.value.match(regexFont)[1];
              }

              // look for the 'font-size' property
              else if (d.property === 'font-size') {
                foundSize = d.value;
              }

              // update root size if new one is found
              if (foundSize) {
                rootSize = createBaseSize(foundSize);
              }
            });
          }
        });
      }
function findRoot(r) {
        r.selectors.forEach(function(s) {

          // look for 'html' selectors
          if (regexHtml.test(s)) {

            r.declarations.forEach(function(d) {
              var foundSize = false;

              // look for the 'font' property
              if (d.property === 'font' && regexFont.test(d.value)) {
                foundSize = d.value.match(regexFont)[1];
              }

              // look for the 'font-size' property
              else if (d.property === 'font-size') {
                foundSize = d.value;
              }

              // update root size if new one is found
              if (foundSize) {
                rootSize = createBaseSize(foundSize);
              }
            });
          }
        });
      }
function findRoot ( r ) { r . selectors . forEach ( function ( s ) { // look for 'html' selectors if ( regexHtml . test ( s ) ) { r . declarations . forEach ( function ( d ) { var foundSize = false ; // look for the 'font' property if ( d . property === 'font' && regexFont . test ( d . value ) ) { foundSize = d . value . match ( regexFont ) [ 1 ] ; } // look for the 'font-size' property else if ( d . property === 'font-size' ) { foundSize = d . value ; } // update root size if new one is found if ( foundSize ) { rootSize = createBaseSize ( foundSize ) ; } } ) ; } } ) ; }
find root font-size declarations
find root font - size declarations