From: Geoff Kimball Date: Mon, 15 Feb 2016 21:34:05 +0000 (-0800) Subject: Prune unused utility functions and add SassDoc comments to the remaining ones X-Git-Tag: v2.0.0-rc.1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3fc97e2892da80b04dc5b8c5331ebaec4326609;p=thirdparty%2Ffoundation%2Ffoundation-emails.git Prune unused utility functions and add SassDoc comments to the remaining ones --- diff --git a/scss/util/_util.scss b/scss/util/_util.scss index 6a96fdb8..fcd819f5 100755 --- a/scss/util/_util.scss +++ b/scss/util/_util.scss @@ -2,44 +2,21 @@ // foundation.zurb.com // Licensed under MIT Open Source - -// IMPORT ONCE -// We use this to prevent styles from being loaded multiple times for compenents that rely on other components. -$modules: () !default; -@mixin exports($name) { - @if not index($modules, $name) { - $modules: append($modules, $name); - @content; - } -} - -// RANGES -// We use these functions to define ranges for various things, like media queries. -@function lower-bound($range){ - @if length($range) <= 0 { - @return 0; - } - @return nth($range,1); -} - -@function upper-bound($range) { - @if length($range) < 2 { - @return 999999999999; - } - @return nth($range, 2); -} - -// -// Grid Functions -// - -// @FUNCTION -// $colNumber - Found in settings file -// $totalColumns - Found in settings file +/// Calculates a percentage value for a grid column width. +/// @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 grid-calc-pct($colNumber, $totalColumns) { @return floor(percentage(($colNumber / $totalColumns)) * 1000000) / 1000000; } +/// Calculates a pixel value for a grid column width. +/// @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 grid-calc-px($columnNumber, $totalColumns, $containerWidth) { @return ($containerWidth / $totalColumns * $columnNumber - $grid-column-gutter); -} \ No newline at end of file +}