code: function toPxValue(value, defaultWidth) {
    // eslint-disable-line complexity
    if (typeof value === 'string') {
      var matched = value.match(/^([\d.]+)(px|pt|pc|in|cm|mm|em|ex|rem|q|vw|vh|vmax|vmin)$/);
  
      if (matched) {
        // console.log(matched);
        var size = parseFloat(matched[1]);
        var unit = matched[2];
        value = (0, _utils.sizeToPixel)({
          size: size,
          unit: unit
        });
      } else {
        var _size = Number(value);
  
        if (!Number.isNaN(_size)) {
          value = _size;
        }
      }
    }
  
    return value;
  }
docs: /* istanbul ignore next