code: function getWidth(el) {
    let styles = window.getComputedStyle(el);
    let width = el.offsetWidth;
    let borderLeftWidth = parseFloat(styles.borderLeftWidth);
    let borderRightWidth = parseFloat(styles.borderRightWidth);
    let paddingLeft = parseFloat(styles.paddingLeft);
    let paddingRight = parseFloat(styles.paddingRight);
    return width - borderLeftWidth - borderRightWidth - paddingRight - paddingLeft;
  }
docs: Replacement function for jQuery $.width()
  Borrowed with thanks from https://github.com/nefe/You-Dont-Need-jQuery#2.2