stylesheets/flint/functions/lib/_calc-width.scss in flint-gs-2.0.2 vs stylesheets/flint/functions/lib/_calc-width.scss in flint-gs-2.0.3

- old
+ new

@@ -1,23 +1,25 @@ /** * Calculate width * * @access private * -* @param {String} $key - key of breakpoint -* @param {Number} $span - span value of element -* @param {Number | String} $context (null) - context value of element -* @param {Number} $deduct (null) - subtract value out of final width +* @param {String} $key - key of breakpoint +* @param {Number} $span - span value of element +* @param {Number|String} $context (null) - context value of element +* @param {Number} $deduct (null) - subtract value out of final width * -* @return {Map | False} - map of target and context result +* @return {Map} - map of target and context result +* +* @group Internal Functions */ @function flint-calc-width($key, $span, $context: null, $deduct: null) { $result: (); // Check to see if value has been cached - @if map-has-key($flint__cached-values, "#{$key, $span, $context}::width") and $context != "auto" { - @return map-get($flint__cached-values, "#{$key, $span, $context}::width"); + @if map-has-key($flint__cached-values, "#{$key, $span, $context, $deduct}::width") and $context != "auto" { + @return map-get($flint__cached-values, "#{$key, $span, $context, $deduct}::width"); } @if $span == "container" { $result: flint-get-value("breakpoints", $key, "breakpoint"); @@ -58,10 +60,10 @@ } // Save result to cache @if $context != "auto" { - $flint__cached-values: map-merge($flint__cached-values, ("#{$key, $span, $context}::width": $result)); + $flint__cached-values: map-merge($flint__cached-values, ("#{$key, $span, $context, $deduct}::width": $result)); } // Return result @return $result; }