cq-prolyfill.js
function isIntrinsicSize(element, prop) {

	var computedStyle = getComputedStyle(element);

	if (computedStyle.display === 'none') {
		return false;
	}

	if (computedStyle.display === 'inline') {
		return true;
	}

	// Non-floating non-absolute block elements (only width)
	if (
		prop === 'width'
		&& ['block', 'list-item', 'flex', 'grid'].indexOf(computedStyle.display) !== -1
		&& computedStyle.cssFloat === 'none'
		&& computedStyle.position !== 'absolute'
		&& computedStyle.position !== 'fixed'
	) {
		return false;
	}

	var originalStyle = getOriginalStyle(element, prop);

	// Fixed size
	if (originalStyle && originalStyle.match(LENGTH_REGEXP)) {
		return false;
	}

	// Percentage size
	if (originalStyle && originalStyle.substr(-1) === '%') {
		return false;
	}

	// Calc expression
	if (originalStyle && originalStyle.substr(0, 5) === 'calc(') {
		return false;
	}

	// Elements without a defined size
	return true;

}
function isIntrinsicSize(element, prop) {

	var computedStyle = getComputedStyle(element);

	if (computedStyle.display === 'none') {
		return false;
	}

	if (computedStyle.display === 'inline') {
		return true;
	}

	// Non-floating non-absolute block elements (only width)
	if (
		prop === 'width'
		&& ['block', 'list-item', 'flex', 'grid'].indexOf(computedStyle.display) !== -1
		&& computedStyle.cssFloat === 'none'
		&& computedStyle.position !== 'absolute'
		&& computedStyle.position !== 'fixed'
	) {
		return false;
	}

	var originalStyle = getOriginalStyle(element, prop);

	// Fixed size
	if (originalStyle && originalStyle.match(LENGTH_REGEXP)) {
		return false;
	}

	// Percentage size
	if (originalStyle && originalStyle.substr(-1) === '%') {
		return false;
	}

	// Calc expression
	if (originalStyle && originalStyle.substr(0, 5) === 'calc(') {
		return false;
	}

	// Elements without a defined size
	return true;

}
function isIntrinsicSize ( element , prop ) { var computedStyle = getComputedStyle ( element ) ; if ( computedStyle . display === 'none' ) { return false ; } if ( computedStyle . display === 'inline' ) { return true ; } // Non-floating non-absolute block elements (only width) if ( prop === 'width' && [ 'block' , 'list-item' , 'flex' , 'grid' ] . indexOf ( computedStyle . display ) !== - 1 && computedStyle . cssFloat === 'none' && computedStyle . position !== 'absolute' && computedStyle . position !== 'fixed' ) { return false ; } var originalStyle = getOriginalStyle ( element , prop ) ; // Fixed size if ( originalStyle && originalStyle . match ( LENGTH_REGEXP ) ) { return false ; } // Percentage size if ( originalStyle && originalStyle . substr ( - 1 ) === '%' ) { return false ; } // Calc expression if ( originalStyle && originalStyle . substr ( 0 , 5 ) === 'calc(' ) { return false ; } // Elements without a defined size return true ; }
Is the size of the element depending on its descendants?

@param  {Element} element
@param  {string}  prop    `width` or `height`
@return {boolean}
Is the size of the element depending on its descendants?