function calc(str, prop) {
  let percent = parseInt(str.substring(0, str.length - 1), 10);
  let base = isVertical(prop) ? height : width;
  return base * percent / 100;
}
Calc percent to pixels
@param {String} str
@param {String} prop
@returns {number}