dist/fitty.module.js
function shouldPreStyle(f) {

    var preStyle = false;

    // if we already tested for prestyling we don't have to do it again
    if (f.preStyleTestCompleted) {
      return false;
    }

    // should have an inline style, if not, apply
    if (!/inline-/.test(f.display)) {
      preStyle = true;
      f.display = 'inline-block';
    }

    // to correctly calculate dimensions the element should have whiteSpace set to nowrap
    if (f.whiteSpace !== 'nowrap') {
      preStyle = true;
      f.whiteSpace = 'nowrap';
    }

    // we don't have to do this twice
    f.preStyleTestCompleted = true;

    return preStyle;
  }
function shouldPreStyle(f) {

    var preStyle = false;

    // if we already tested for prestyling we don't have to do it again
    if (f.preStyleTestCompleted) {
      return false;
    }

    // should have an inline style, if not, apply
    if (!/inline-/.test(f.display)) {
      preStyle = true;
      f.display = 'inline-block';
    }

    // to correctly calculate dimensions the element should have whiteSpace set to nowrap
    if (f.whiteSpace !== 'nowrap') {
      preStyle = true;
      f.whiteSpace = 'nowrap';
    }

    // we don't have to do this twice
    f.preStyleTestCompleted = true;

    return preStyle;
  }
function shouldPreStyle ( f ) { var preStyle = false ; // if we already tested for prestyling we don't have to do it again if ( f . preStyleTestCompleted ) { return false ; } // should have an inline style, if not, apply if ( ! / inline- / . test ( f . display ) ) { preStyle = true ; f . display = 'inline-block' ; } // to correctly calculate dimensions the element should have whiteSpace set to nowrap if ( f . whiteSpace !== 'nowrap' ) { preStyle = true ; f . whiteSpace = 'nowrap' ; } // we don't have to do this twice f . preStyleTestCompleted = true ; return preStyle ; }
determines if this fitty requires initial styling, can be prevented by applying correct styles through CSS
determines if this fitty requires initial styling can be prevented by applying correct styles through CSS