]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Rework doc block to be clearer.
authorBrett Mason <brettsmason@gmail.com>
Tue, 17 Jan 2017 09:13:19 +0000 (09:13 +0000)
committerBrett Mason <brettsmason@gmail.com>
Tue, 17 Jan 2017 09:13:19 +0000 (09:13 +0000)
scss/util/_typography.scss

index 3cb451e58b03c9df7c934f37236ce3d5f1901431..515455751bb5ef518500c419c44b8b7f9ecd8010 100644 (file)
@@ -15,17 +15,19 @@ $-zf-font-stack: (
   'verdana': (Verdana, Geneva, "DejaVu Sans", sans-serif),
 );
 
-/// Retrieve a font stack string from a map.
-/// @param {String} $stack - The key of the font stack from the map.
-/// @param {Map} $map - A map of font stacks to retrieve a string from.
-/// @return {List} A font stack list.
-@function font-stack($stack, $map: $-zf-font-stack) {
+/// Return a font stack list from a map. Equivalent to `map-safe-get($name, $-zf-font-stack)`.
+///
+/// @param {String} $name - Name of the font stack.
+/// @param {Map} $map [$-zf-font-stack] - Map of font stacks to retrieve a list from.
+///
+/// @returns {List} Found font stack.
+@function font-stack($name, $map: $-zf-font-stack) {
   @if (type-of($map) == 'map') {
-    @if (map-has-key($map, $stack)) {
-      @return map-get($map, $stack);
+    @if (map-has-key($map, $name)) {
+      @return map-get($map, $name);
     }
     @else {
-      @error 'Font stack `#{$stack}` is not available in `#{$map}`';
+      @error 'Font stack `#{$name}` is not available in `#{$map}`';
     }
   }
   @else {