cq-prolyfill.js
function getSize(element, prop) {
	var style = getComputedStyle(element);
	if (prop === 'width') {
		return element.offsetWidth
			- parseFloat(style.borderLeftWidth)
			- parseFloat(style.paddingLeft)
			- parseFloat(style.borderRightWidth)
			- parseFloat(style.paddingRight);
	}
	else {
		return element.offsetHeight
			- parseFloat(style.borderTopWidth)
			- parseFloat(style.paddingTop)
			- parseFloat(style.borderBottomWidth)
			- parseFloat(style.paddingBottom);
	}
}
function getSize(element, prop) {
	var style = getComputedStyle(element);
	if (prop === 'width') {
		return element.offsetWidth
			- parseFloat(style.borderLeftWidth)
			- parseFloat(style.paddingLeft)
			- parseFloat(style.borderRightWidth)
			- parseFloat(style.paddingRight);
	}
	else {
		return element.offsetHeight
			- parseFloat(style.borderTopWidth)
			- parseFloat(style.paddingTop)
			- parseFloat(style.borderBottomWidth)
			- parseFloat(style.paddingBottom);
	}
}
function getSize ( element , prop ) { var style = getComputedStyle ( element ) ; if ( prop === 'width' ) { return element . offsetWidth - parseFloat ( style . borderLeftWidth ) - parseFloat ( style . paddingLeft ) - parseFloat ( style . borderRightWidth ) - parseFloat ( style . paddingRight ) ; } else { return element . offsetHeight - parseFloat ( style . borderTopWidth ) - parseFloat ( style . paddingTop ) - parseFloat ( style . borderBottomWidth ) - parseFloat ( style . paddingBottom ) ; } }
Get the computed content-box size

@param  {Element} element
@param  {string}  prop    `width` or `height`
@return {number}
Get the computed content - box size