// Foundation for Emails by ZURB // foundation.zurb.com // Licensed under MIT Open Source /// Calculates a percentage value for a grid column width. /// @access private /// @param {number} $colNumber - Column count of the column. /// @param {number} $totalColumns - Column count of the entire row. /// @returns {number} A percentage width value. @function -zf-grid-calc-pct($colNumber, $totalColumns) { @return floor(percentage(($colNumber / $totalColumns)) * 1000000) / 1000000; } /// Calculates a pixel value for a grid column width. /// @access private /// @param {number} $columnNumber - Column count of the column. /// @param {number} $totalColumns - Column count of the entire row. /// @param {number} $containerWidth - Width of the surrounding container, in pixels. /// @returns {number} A pixel width value. @function -zf-grid-calc-px($columnNumber, $totalColumns, $containerWidth) { @return ($containerWidth / $totalColumns * $columnNumber - $global-gutter); }