src/sap.f/src/sap/f/GridContainerSettings.js
function cssSizeToPx(sCssSize) {
		if (sCssSize === 0 || sCssSize === "0") {
			return 0;
		}

		var aMatch = sCssSize.match(/^(\d+(\.\d+)?)(px|rem)$/),
			iValue;
		if (aMatch) {
			if (aMatch[3] === "px") {
				iValue = parseFloat(aMatch[1]);
			} else {
				iValue = Rem.toPx(parseFloat(aMatch[1]));
			}
		} else {
			Log.error("Css size '" + sCssSize + "' is not supported for GridContainer. Only 'px' and 'rem' are supported.");
			iValue = NaN;
		}

		return Math.ceil(iValue);
	}
function cssSizeToPx(sCssSize) {
		if (sCssSize === 0 || sCssSize === "0") {
			return 0;
		}

		var aMatch = sCssSize.match(/^(\d+(\.\d+)?)(px|rem)$/),
			iValue;
		if (aMatch) {
			if (aMatch[3] === "px") {
				iValue = parseFloat(aMatch[1]);
			} else {
				iValue = Rem.toPx(parseFloat(aMatch[1]));
			}
		} else {
			Log.error("Css size '" + sCssSize + "' is not supported for GridContainer. Only 'px' and 'rem' are supported.");
			iValue = NaN;
		}

		return Math.ceil(iValue);
	}
function cssSizeToPx ( sCssSize ) { if ( sCssSize === 0 || sCssSize === "0" ) { return 0 ; } var aMatch = sCssSize . match ( / ^(\d+(\.\d+)?)(px|rem)$ / ) , iValue ; if ( aMatch ) { if ( aMatch [ 3 ] === "px" ) { iValue = parseFloat ( aMatch [ 1 ] ) ; } else { iValue = Rem . toPx ( parseFloat ( aMatch [ 1 ] ) ) ; } } else { Log . error ( "Css size '" + sCssSize + "' is not supported for GridContainer. Only 'px' and 'rem' are supported." ) ; iValue = NaN ; } return Math . ceil ( iValue ) ; }
Converts the given css size to its corresponding 'px' value.
@private
@param {string} sCssSize The css size to parse. For example '5rem'.
@returns {int} The size in 'px'. The result is rounded up with Math.ceil(). Returns NaN if the size can not be parsed.
Converts the given css size to its corresponding px value .