"//////////////////////////////\n// Has Setting\n//////////////////////////////\n@function breakpoint-has($setting) {\n @if map-has-key($breakpoint, $setting) {\n @return true;\n }\n @else {\n @return false;\n }\n}\n\n//////////////////////////////\n// Get Settings\n//////////////////////////////\n@function breakpoint-get($setting) {\n @if breakpoint-has($setting) {\n @return map-get($breakpoint, $setting);\n }\n @else {\n @return map-get($Breakpoint-Settings, $setting);\n }\n}\n\n//////////////////////////////\n// Set Settings\n//////////////////////////////\n@function breakpoint-set($setting, $value) {\n @if (str-index($setting, '-') or str-index($setting, '_')) and str-index($setting, ' ') == null {\n @warn \"Words in Breakpoint settings should be separated by spaces, not dashes or underscores. Please replace dashes and underscores between words with spaces. Settings will not work as expected until changed.\";\n }\n $breakpoint: map-merge($breakpoint, ($setting: $value)) !global;\n @return true;\n}\n\n@mixin breakpoint-change($setting, $value) {\n $breakpoint-change: breakpoint-set($setting, $value);\n}\n\n@mixin breakpoint-set($setting, $value) {\n @include breakpoint-change($setting, $value);\n}\n\n@mixin bkpt-change($setting, $value) {\n @include breakpoint-change($setting, $value);\n}\n@mixin bkpt-set($setting, $value) {\n @include breakpoint-change($setting, $value);\n}\n\n//////////////////////////////\n// Remove Setting\n//////////////////////////////\n@function breakpoint-reset($settings...) {\n @if length($settings) == 1 {\n $settings: nth($settings, 1);\n }\n\n @each $setting in $settings {\n $breakpoint: map-remove($breakpoint, $setting) !global;\n }\n @return true;\n}\n\n@mixin breakpoint-reset($settings...) {\n $breakpoint-reset: breakpoint-reset($settings);\n}\n\n@mixin bkpt-reset($settings...) {\n $breakpoint-reset: breakpoint-reset($settings);\n}",
"//////////////////////////////\n// Private Breakpoint Variables\n//////////////////////////////\n$private-breakpoint-context-holder: ();\n$private-breakpoint-query-count: 0 !default;\n\n//////////////////////////////\n// Breakpoint Has Context\n// Returns whether or not you are inside a Breakpoint query\n//////////////////////////////\n@function breakpoint-has-context() {\n @if length($private-breakpoint-query-count) {\n @return true;\n }\n @else {\n @return false;\n }\n}\n\n//////////////////////////////\n// Breakpoint Get Context\n// $feature: Input feature to get it's current MQ context. Returns false if no context\n//////////////////////////////\n@function breakpoint-get-context($feature) {\n @if map-has-key($private-breakpoint-context-holder, $feature) {\n $get: map-get($private-breakpoint-context-holder, $feature);\n // Special handling of no-query from get side so /false/ prepends aren't returned\n @if $feature == 'no-query' {\n @if type-of($get) == 'list' and length($get) > 1 and nth($get, 1) == false {\n $get: nth($get, length($get));\n }\n }\n @return $get;\n }\n @else {\n @if breakpoint-has-context() and $feature == 'media' {\n @return breakpoint-get('default media');\n }\n @else {\n @return false;\n }\n }\n}\n\n//////////////////////////////\n// Private function to set context\n//////////////////////////////\n@function private-breakpoint-set-context($feature, $value) {\n @if $value == 'monochrome' {\n $feature: 'monochrome';\n }\n\n $current: map-get($private-breakpoint-context-holder, $feature);\n @if $current and length($current) == $private-breakpoint-query-count {\n @warn \"You have already queried against `#{$feature}`. Unexpected things may happen if you query against the same feature more than once in the same `and` query. Breakpoint is overwriting the current context with `#{$value}`\";\n }\n\n @if not map-has-key($private-breakpoint-context-holder, $feature) {\n $v-holder: ();\n @for $i from 1 to $private-breakpoint-query-count {\n @if $feature == 'media' {\n $v-holder: append($v-holder, breakpoint-get('default media'));\n }\n @else {\n $v-holder: append($v-holder, false);\n }\n }\n $v-holder: append($v-holder, $value);\n $private-breakpoint-context-holder: map-merge($private-breakpoint-context-holder, ($feature: $v-holder)) !global;\n }\n @else {\n $v-holder: map-get($private-breakpoint-context-holder, $feature);\n $length: length($v-holder);\n @for $i from $length to $private-breakpoint-query-count - 1 {\n @if $feature == 'media' {\n $v-holder: append($v-holder, breakpoint-get('default media'));\n }\n @else {\n $v-holder: append($v-holder, false);\n }\n }\n $v-holder: append($v-holder, $value);\n $private-breakpoint-context-holder: map-merge($private-breakpoint-context-holder, ($feature: $v-holder)) !global;\n }\n\n @return true;\n}\n\n//////////////////////////////\n// Private function to reset context\n//////////////////////////////\n@mixin private-breakpoint-reset-contexts {\n $private-breakpoint-context-holder: () !global;\n $private-breakpoint-query-count: 0 !global;\n}",
"//////////////////////////////\n// Converts the input value to Base EMs\n//////////////////////////////\n@function breakpoint-to-base-em($value) {\n $value-unit: unit($value);\n\n // Will convert relative EMs into root EMs.\n @if breakpoint-get('base font size') and type-of(breakpoint-get('base font size')) == 'number' and $value-unit == 'em' {\n $base-unit: unit(breakpoint-get('base font size'));\n\n @if $base-unit == 'px' or $base-unit == '%' or $base-unit == 'em' or $base-unit == 'pt' {\n @return base-conversion($value) / base-conversion(breakpoint-get('base font size')) * 1em;\n }\n @else {\n @warn '#{breakpoint-get(\\'base font size\\')} is not set in valid units for font size!';\n @return false;\n }\n }\n @else {\n @return base-conversion($value);\n }\n}\n\n@function base-conversion($value) {\n $unit: unit($value);\n\n @if $unit == 'px' {\n @return $value / 16px * 1em;\n }\n @else if $unit == '%' {\n @return $value / 100% * 1em;\n }\n @else if $unit == 'em' {\n @return $value;\n }\n @else if $unit == 'pt' {\n @return $value / 12pt * 1em;\n }\n @else {\n @return $value;\n// @warn 'Everything is terrible! What have you done?!';\n }\n}\n\n//////////////////////////////\n// Returns whether the feature can have a min/max pair\n//////////////////////////////\n$breakpoint-min-max-features: 'color',\n 'color-index',\n 'aspect-ratio',\n 'device-aspect-ratio',\n 'device-height',\n 'device-width',\n 'height',\n 'monochrome',\n 'resolution',\n 'width';\n\n@function breakpoint-min-max($feature) {\n @each $item in $breakpoint-min-max-features {\n @if $feature == $item {\n @return true;\n }\n }\n @return false;\n}\n\n//////////////////////////////\n// Returns whether the feature can have a string value\n//////////////////////////////\n$breakpoint-string-features: 'orientation',\n 'scan',\n 'color',\n 'aspect-ratio',\n 'device-aspect-ratio',\n 'pointer',\n 'luminosity';\n\n@function breakpoint-string-value($feature) {\n @each $item in $breakpoint-string-features {\n @if breakpoint-min-max($item) {\n @if $feature == 'min-#{$item}' or $feature == 'max-#{$item}' {\n @return true;\n }\n }\n @else if $feature == $item {\n @return true;\n }\n }\n @return false;\n}\n\n//////////////////////////////\n// Returns whether the feature is a media type\n//////////////////////////////\n$breakpoint-media-types: 'all',\n 'braille',\n 'embossed',\n 'handheld',\n 'print',\n 'projection',\n 'screen',\n 'speech',\n 'tty',\n 'tv';\n\n@function breakpoint-is-media($feature) {\n @each $media in $breakpoint-media-types {\n @if ($feature == $media) or ($feature == 'not #{$media}') or ($feature == 'only #{$media}') {\n @return true;\n }\n }\n\n @return false;\n}\n\n//////////////////////////////\n// Returns whether the feature can stand alone\n//////////////////////////////\n$breakpoint-single-string-features: 'color',\n 'color-index',\n 'grid',\n 'monochrome';\n\n@function breakpoint-single-string($feature) {\n @each $item in $breakpoint-single-string-features {\n @if $feature == $item {\n @return true;\n }\n }\n @return false;\n}\n\n//////////////////////////////\n// Returns whether the feature\n//////////////////////////////\n@function breakpoint-is-reso
"//////////////////////////////\n// Import Parser Pieces\n//////////////////////////////\n@import \"parsers/query\";\n@import \"parsers/single\";\n@import \"parsers/double\";\n@import \"parsers/triple\";\n@import \"parsers/resolution\";\n\n$Memo-Exists: function-exists(memo-get) and function-exists(memo-set);\n\n//////////////////////////////\n// Breakpoint Function\n//////////////////////////////\n@function breakpoint($query, $contexts...) {\n $run: true;\n $return: ();\n\n // Grab the Memo Output if Memoization can be a thing\n @if $Memo-Exists {\n $return: memo-get(breakpoint, breakpoint $query $contexts);\n\n @if $return != null {\n $run: false;\n }\n }\n\n @if not $Memo-Exists or $run {\n // Internal Variables\n $query-string: '';\n $query-fallback: false;\n $return: ();\n\n // Reserve Global Private Breakpoint Context\n $holder-context: $private-breakpoint-context-holder;\n $holder-query-count: $private-breakpoint-query-count;\n\n // Reset Global Private Breakpoint Context\n $private-breakpoint-context-holder: () !global;\n $private-breakpoint-query-count: 0 !global;\n\n\n // Test to see if it's a comma-separated list\n $or-list: if(list-separator($query) == 'comma', true, false);\n\n\n @if ($or-list == false and breakpoint-get('legacy syntax') == false) {\n $query-string: breakpoint-parse($query);\n }\n @else {\n $length: length($query);\n\n $last: nth($query, $length);\n $query-fallback: breakpoint-no-query($last);\n\n @if ($query-fallback != false) {\n $length: $length - 1;\n }\n\n @if (breakpoint-get('legacy syntax') == true) {\n $mq: ();\n\n @for $i from 1 through $length {\n $mq: append($mq, nth($query, $i), comma);\n }\n\n $query-string: breakpoint-parse($mq);\n }\n @else {\n $query-string: '';\n @for $i from 1 through $length {\n $query-string: $query-string + if($i == 1, '', ', ') + breakpoint-parse(nth($query, $i));\n }\n }\n }\n\n $return: ('query': $query-string,\n 'fallback': $query-fallback,\n 'context holder': $private-breakpoint-context-holder,\n 'query count': $private-breakpoint-query-count\n );\n @if length($contexts) > 0 and nth($contexts, 1) != false {\n @if $query-fallback != false {\n $context-setter: private-breakpoint-set-context('no-query', $query-fallback);\n }\n $context-map: ();\n @each $context in $contexts {\n $context-map: map-merge($context-map, ($context: breakpoint-get-context($context)));\n }\n $return: map-merge($return, (context: $context-map));\n }\n\n // Reset Global Private Breakpoint Context\n $private-breakpoint-context-holder: () !global;\n $private-breakpoint-query-count: 0 !global;\n\n @if $Memo-Exists {\n $holder: memo-set(breakpoint, breakpoint $query $contexts, $return);\n }\n }\n\n @return $return;\n}\n\n//////////////////////////////\n// General Breakpoint Parser\n//////////////////////////////\n@function breakpoint-parse($query) {\n // Increase number of 'and' queries\n $private-breakpoint-query-count: $private-breakpoint-query-count + 1 !global;\n\n // Set up Media Type\n $query-print: '';\n\n $force-all: ((breakpoint-get('force all media type') == true) and (breakpoint-get('default media') == 'all'));\n $empty-media: true;\n @if ($force-all == true) or (breakpoint-get('default media') != 'all') {\n // Force the print of the default media type if (force all is true and default media type is all) or (default media type is not all)\n $query-print: breakpoint-get('default media');\n $empty-media: false;\n }\n\n\n $query-resolution: false;\n\n $query-holder: breakpoint-parse-query($query);\n\n\n\n // Loop over each parsed out query and write it to $query-print\n $first: true;\n\n @each $feature in $query-holder {\n $length: length($feature);\n\n // Parse a single feature\n @if ($length == 1) {\n // Feature is currently a list, grab the actual
"@function breakpoint-parse-query($query) {\n // Parse features out of an individual query\n $feature-holder: ();\n $query-holder: ();\n $length: length($query);\n\n @if $length == 2 {\n // If we've got a string/number, number/string, check to see if it's a valid string/number pair or two singles\n @if (type-of(nth($query, 1)) == 'string' and type-of(nth($query, 2)) == 'number') or (type-of(nth($query, 1)) == 'number' and type-of(nth($query, 2)) == 'string') {\n\n $number: '';\n $value: '';\n\n @if type-of(nth($query, 1)) == 'string' {\n $number: nth($query, 2);\n $value: nth($query, 1);\n }\n @else {\n $number: nth($query, 1);\n $value: nth($query, 2);\n }\n\n // If the string value can be a single value, check to see if the number passed in is a valid input for said single value. Fortunately, all current single-value options only accept unitless numbers, so this check is easy.\n @if breakpoint-single-string($value) {\n @if unitless($number) {\n $feature-holder: append($value, $number, space);\n $query-holder: append($query-holder, $feature-holder, comma);\n @return $query-holder;\n }\n }\n // If the string is a media type, split the query\n @if breakpoint-is-media($value) {\n $query-holder: append($query-holder, nth($query, 1));\n $query-holder: append($query-holder, nth($query, 2));\n @return $query-holder;\n }\n // If it's not a single feature, we're just going to assume it's a proper string/value pair, and roll with it.\n @else {\n $feature-holder: append($value, $number, space);\n $query-holder: append($query-holder, $feature-holder, comma);\n @return $query-holder;\n }\n\n }\n // If they're both numbers, we assume it's a double and roll with that\n @else if (type-of(nth($query, 1)) == 'number' and type-of(nth($query, 2)) == 'number') {\n $feature-holder: append(nth($query, 1), nth($query, 2), space);\n $query-holder: append($query-holder, $feature-holder, comma);\n @return $query-holder;\n }\n // If they're both strings and neither are singles, we roll with that.\n @else if (type-of(nth($query, 1)) == 'string' and type-of(nth($query, 2)) == 'string') {\n @if not breakpoint-single-string(nth($query, 1)) and not breakpoint-single-string(nth($query, 2)) {\n $feature-holder: append(nth($query, 1), nth($query, 2), space);\n $query-holder: append($query-holder, $feature-holder, comma);\n @return $query-holder;\n }\n }\n }\n @else if $length == 3 {\n // If we've got three items and none is a list, we check to see\n @if type-of(nth($query, 1)) != 'list' and type-of(nth($query, 2)) != 'list' and type-of(nth($query, 3)) != 'list' {\n // If none of the items are single string values and none of the values are media values, we're good.\n @if (not breakpoint-single-string(nth($query, 1)) and not breakpoint-single-string(nth($query, 2)) and not breakpoint-single-string(nth($query, 3))) and ((not breakpoint-is-media(nth($query, 1)) and not breakpoint-is-media(nth($query, 2)) and not breakpoint-is-media(nth($query, 3)))) {\n $feature-holder: append(nth($query, 1), nth($query, 2), space);\n $feature-holder: append($feature-holder, nth($query, 3), space);\n $query-holder: append($query-holder, $feature-holder, comma);\n @return $query-holder;\n }\n // let's check to see if the first item is a media type\n @else if breakpoint-is-media(nth($query, 1)) {\n $query-holder: append($query-holder, nth($query, 1));\n $feature-holder: append(nth($query, 2), nth($query, 3), space);\n $query-holder: append($query-holder, $feature-holder);\n @return $query-holder;\n }\n }\n }\n\n // If it's a single item, or if it's not a special case double or triple, we can simply return the query.\n @return $query;\n}\n",
"//////////////////////////////\n// Import Pieces\n//////////////////////////////\n@import \"single/default\";\n\n@function breakpoint-parse-single($feature, $empty-media, $first) {\n $parsed: '';\n $leader: '';\n // If we're forcing\n @if not ($empty-media) or not ($first) {\n $leader: 'and ';\n }\n\n // If it's a single feature that can stand alone, we let it\n @if (breakpoint-single-string($feature)) {\n $parsed: $feature;\n // Set Context\n $context-setter: private-breakpoint-set-context($feature, $feature);\n }\n // If it's not a stand alone feature, we pass it off to the default handler.\n @else {\n $parsed: breakpoint-parse-default($feature);\n }\n\n @return $leader + '(' + $parsed + ')';\n}\n",
"//////////////////////////////\n// Import Pieces\n//////////////////////////////\n@import \"double/default-pair\";\n@import \"double/double-string\";\n@import \"double/default\";\n\n@function breakpoint-parse-double($feature, $empty-media, $first) {\n $parsed: '';\n $leader: '';\n // If we're forcing\n @if not ($empty-media) or not ($first) {\n $leader: 'and ';\n }\n\n $first: nth($feature, 1);\n $second: nth($feature, 2);\n\n // If we've got two numbers, we know we need to use the default pair because there are no media queries that has a media feature that is a number\n @if type-of($first) == 'number' and type-of($second) == 'number' {\n $parsed: breakpoint-parse-default-pair($first, $second);\n }\n // If they are both strings, we send it through the string parser\n @else if type-of($first) == 'string' and type-of($second) == 'string' {\n $parsed: breakpoint-parse-double-string($first, $second);\n }\n // If it's a string/number pair, we parse it as a normal double\n @else {\n $parsed: breakpoint-parse-double-default($first, $second);\n }\n\n @return $leader + $parsed;\n}\n",
"@function breakpoint-parse-default-pair($first, $second) {\n $default: breakpoint-get('default pair');\n $min: '';\n $max: '';\n\n // Sort into min and max\n $min: min($first, $second);\n $max: max($first, $second);\n\n // Set Context\n $context-setter: private-breakpoint-set-context(min-#{$default}, $min);\n $context-setter: private-breakpoint-set-context(max-#{$default}, $max);\n\n // Make them EMs if need be\n @if (breakpoint-get('to ems') == true) {\n $min: breakpoint-to-base-em($min);\n $max: breakpoint-to-base-em($max);\n }\n\n @return '(min-#{$default}: #{$min}) and (max-#{$default}: #{$max})';\n}\n",
"@function breakpoint-parse-double-string($first, $second) {\n $feature: '';\n $value: '';\n\n // Test to see which is the feature and which is the value\n @if (breakpoint-string-value($first) == true) {\n $feature: $first;\n $value: $second;\n }\n @else if (breakpoint-string-value($second) == true) {\n $feature: $second;\n $value: $first;\n }\n @else {\n @warn \"Neither #{$first} nor #{$second} is a valid media query name.\";\n }\n\n // Set Context\n $context-setter: private-breakpoint-set-context($feature, $value);\n\n @return '(#{$feature}: #{$value})';\n}",
"////////////////////////\n// Default the Breakpoints variable\n////////////////////////\n$breakpoints: () !default;\n$BREAKPOINTS: () !default;\n\n////////////////////////\n// Respond-to API Mixin\n////////////////////////\n@mixin respond-to($context, $no-query: false) {\n @if length($breakpoints) > 0 and length($BREAKPOINTS) == 0 {\n @warn \"In order to avoid variable namespace collisions, we have updated the way to add breakpoints for respond-to. Please change all instances of `$breakpoints: add-breakpoint()` to `@include add-breakpoint()`. The `add-breakpoint()` function will be deprecated in a future release.\";\n $BREAKPOINTS: $breakpoints !global;\n $breakpoints: () !global;\n }\n\n @if type-of($BREAKPOINTS) != 'map' {\n // Just in case someone writes gibberish to the $breakpoints variable.\n @warn \"Your breakpoints aren't a map! `respond-to` expects a map. Please check the value of $BREAKPOINTS variable.\";\n @content;\n }\n @else if map-has-key($BREAKPOINTS, $context) {\n @include breakpoint(map-get($BREAKPOINTS, $context), $no-query) {\n @content;\n }\n }\n @else if not map-has-key($BREAKPOINTS, $context) {\n @warn \"`#{$context}` isn't a defined breakpoint! Please add it using `$breakpoints: add-breakpoint(`#{$context}`, $value);`\";\n @content;\n }\n @else {\n @warn \"You haven't created any breakpoints yet! Make some already! `@include add-breakpoint($name, $bkpt)`\";\n @content;\n }\n}\n\n//////////////////////////////\n// Add Breakpoint to Breakpoints\n// TODO: Remove function in next release\n//////////////////////////////\n@function add-breakpoint($name, $bkpt, $overwrite: false) {\n $output: ($name: $bkpt);\n\n @if length($breakpoints) == 0 {\n @return $output;\n }\n @else {\n @if map-has-key($breakpoints, $name) and $overwrite != true {\n @warn \"You already have a breakpoint named `#{$name}`, please choose another breakpoint name, or pass in `$overwrite: true` to overwrite the previous breakpoint.\";\n @return $breakpoints;\n }\n @else if not map-has-key($breakpoints, $name) or $overwrite == true {\n @return map-merge($breakpoints, $output);\n }\n }\n}\n\n@mixin add-breakpoint($name, $bkpt, $overwrite: false) {\n $output: ($name: $bkpt);\n\n @if length($BREAKPOINTS) == 0 {\n $BREAKPOINTS: $output !global;\n }\n @else {\n @if map-has-key($BREAKPOINTS, $name) and $overwrite != true {\n @warn \"You already have a breakpoint named `#{$name}`, please choose another breakpoint name, or pass in `$overwrite: true` to overwrite the previous breakpoint.\";\n $BREAKPOINTS: $BREAKPOINTS !global;\n }\n @else if not map-has-key($BREAKPOINTS, $name) or $overwrite == true {\n $BREAKPOINTS: map-merge($BREAKPOINTS, $output) !global;\n }\n }\n}\n\n@function get-breakpoint($name: false) {\n @if $name == false {\n @return $BREAKPOINTS;\n }\n @else {\n @return map-get($BREAKPOINTS, $name);\n }\n}\n",
"@mixin legacy-settings-warning {\n $legacyVars: (\n 'default-media': 'default media',\n 'default-feature': 'default feature',\n 'force-media-all': 'force all media type',\n 'to-ems': 'to ems',\n 'resolutions': 'transform resolutions',\n 'no-queries': 'no queries',\n 'no-query-fallbacks': 'no query fallbacks',\n 'base-font-size': 'base font size',\n 'legacy-syntax': 'legacy syntax'\n );\n\n @each $legacy, $new in $legacyVars {\n @if global-variable-exists('breakpoint-' + $legacy) {\n @warn \"In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. Please change all instances of `$breakpoint-#{$legacy}: {{setting}}` to `@include breakpoint-set('#{$new}', {{setting}})`. Variable settings, as well as this warning will be deprecated in a future release.\"\n }\n };\n\n //////////////////////////////\n // Hand correct each setting\n //////////////////////////////\n @if global-variable-exists('breakpoint-default-media') and $breakpoint-default-media != breakpoint-get('default media') {\n @include breakpoint-set('default media', $breakpoint-default-media);\n }\n @if global-variable-exists('breakpoint-default-feature') and $breakpoint-default-feature != breakpoint-get('default feature') {\n @include breakpoint-set('default feature', $breakpoint-default-feature);\n }\n @if global-variable-exists('breakpoint-force-media-all') and $breakpoint-force-media-all != breakpoint-get('force all media type') {\n @include breakpoint-set('force all media type', $breakpoint-force-media-all);\n }\n @if global-variable-exists('breakpoint-to-ems') and $breakpoint-to-ems != breakpoint-get('to ems') {\n @include breakpoint-set('to ems', $breakpoint-to-ems);\n }\n @if global-variable-exists('breakpoint-resolutions') and $breakpoint-resolutions != breakpoint-get('transform resolutions') {\n @include breakpoint-set('transform resolutions', $breakpoint-resolutions);\n }\n @if global-variable-exists('breakpoint-no-queries') and $breakpoint-no-queries != breakpoint-get('no queries') {\n @include breakpoint-set('no queries', $breakpoint-no-queries);\n }\n @if global-variable-exists('breakpoint-no-query-fallbacks') and $breakpoint-no-query-fallbacks != breakpoint-get('no query fallbacks') {\n @include breakpoint-set('no query fallbacks', $breakpoint-no-query-fallbacks);\n }\n @if global-variable-exists('breakpoint-base-font-size') and $breakpoint-base-font-size != breakpoint-get('base font size') {\n @include breakpoint-set('base font size', $breakpoint-base-font-size);\n }\n @if global-variable-exists('breakpoint-legacy-syntax') and $breakpoint-legacy-syntax != breakpoint-get('legacy syntax') {\n @include breakpoint-set('legacy syntax', $breakpoint-legacy-syntax);\n }\n}",
"/* Magnific Popup CSS */\n\n@import \"settings\";\n\n////////////////////////\n//\n// Contents:\n//\n// 1. Default Settings\n// 2. General styles\n// - Transluscent overlay\n// - Containers, wrappers\n// - Cursors\n// - Helper classes\n// 3. Appearance\n// - Preloader & text that displays error messages\n// - CSS reset for buttons\n// - Close icon\n// - \"1 of X\" counter\n// - Navigation (left/right) arrows\n// - Iframe content type styles\n// - Image content type styles\n// - Media query where size of arrows is reduced\n// - IE7 support\n//\n////////////////////////\n\n\n\n////////////////////////\n// 1. Default Settings\n////////////////////////\n\n$mfp-overlay-color: #0b0b0b !default;\n$mfp-overlay-opacity: 0.8 !default;\n$mfp-shadow: 0 0 8px rgba(0, 0, 0, 0.6) !default; // shadow on image or iframe\n$mfp-popup-padding-left: 8px !default; // Padding from left and from right side\n$mfp-popup-padding-left-mobile: 6px !default; // Same as above, but is applied when width of window is less than 800px\n\n$mfp-z-index-base: 1040 !default; // Base z-index of popup\n$mfp-include-arrows: true !default; // include styles for nav arrows\n$mfp-controls-opacity: 0.65 !default;\n$mfp-controls-color: #FFF !default;\n$mfp-controls-border-color: #3F3F3F !default;\n$mfp-inner-close-icon-color: #333 !default;\n$mfp-controls-text-color: #CCC !default; // Color of preloader and \"1 of X\" indicator\n$mfp-controls-text-color-hover: #FFF !default;\n$mfp-IE7support: true !default; // Very basic IE7 support\n\n// Iframe-type options\n$mfp-include-iframe-type: true !default;\n$mfp-iframe-padding-top: 40px !default;\n$mfp-iframe-background: #000 !default;\n$mfp-iframe-max-width: 900px !default;\n$mfp-iframe-ratio: 9/16 !default;\n\n// Image-type options\n$mfp-include-image-type: true !default;\n$mfp-image-background: #444 !default;\n$mfp-image-padding-top: 40px !default;\n$mfp-image-padding-bottom: 40px !default;\n$mfp-include-mobile-layout-for-image: true !default; // Removes paddings from top and bottom\n\n// Image caption options\n$mfp-caption-title-color: #F3F3F3 !default;\n$mfp-caption-subtitle-color: #BDBDBD !default;\n\n// A11y\n$mfp-use-visuallyhidden: false !default; // Hide content from browsers, but make it available for screen readers\n\n\n\n////////////////////////\n// 2. General styles\n////////////////////////\n\n// Transluscent overlay\n.mfp-bg {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: $mfp-z-index-base + 2;\n overflow: hidden;\n position: fixed;\n\n background: $mfp-overlay-color;\n opacity: $mfp-overlay-opacity;\n @if $mfp-IE7support {\n filter: unquote(\"alpha(opacity=#{$mfp-overlay-opacity*100})\");\n }\n}\n\n// Wrapper for popup\n.mfp-wrap {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: $mfp-z-index-base + 3;\n position: fixed;\n outline: none !important;\n -webkit-backface-visibility: hidden; // fixes webkit bug that can cause \"false\" scrollbar\n}\n\n// Root container\n.mfp-container {\n text-align: center;\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n padding: 0 $mfp-popup-padding-left;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n// Vertical centerer helper\n.mfp-container {\n &:before {\n content: '';\n display: inline-block;\n height: 100%;\n vertical-align: middle;\n }\n}\n\n// Remove vertical centering when popup has class `mfp-align-top`\n.mfp-align-top {\n .mfp-container {\n &:before {\n display: none;\n }\n }\n}\n\n// Popup content holder\n.mfp-content {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n ma
"////////////////////////\n// Settings //\n////////////////////////\n\n// overlay\n$mfp-overlay-color: #000; // Color of overlay screen\n$mfp-overlay-opacity: 0.8; // Opacity of overlay screen\n$mfp-shadow: 0 0 8px rgba(0, 0, 0, 0.6); // Shadow on image or iframe\n\n// spacing\n$mfp-popup-padding-left: 8px; // Padding from left and from right side\n$mfp-popup-padding-left-mobile: 6px; // Same as above, but is applied when width of window is less than 800px\n\n$mfp-z-index-base: 1040; // Base z-index of popup\n\n// controls\n$mfp-include-arrows: true; // Include styles for nav arrows\n$mfp-controls-opacity: 1; // Opacity of controls\n$mfp-controls-color: #fff; // Color of controls\n$mfp-controls-border-color: #fff; // Border color of controls\n$mfp-inner-close-icon-color: #fff; // Color of close button when inside\n$mfp-controls-text-color: #ccc; // Color of preloader and \"1 of X\" indicator\n$mfp-controls-text-color-hover: #fff; // Hover color of preloader and \"1 of X\" indicator\n$mfp-IE7support: true; // Very basic IE7 support\n\n// Iframe-type options\n$mfp-include-iframe-type: true; // Enable Iframe-type popups\n$mfp-iframe-padding-top: 40px; // Iframe padding top\n$mfp-iframe-background: #000; // Background color of iframes\n$mfp-iframe-max-width: 900px; // Maximum width of iframes\n$mfp-iframe-ratio: 9/16; // Ratio of iframe (9/16 = widescreen, 3/4 = standard, etc.)\n\n// Image-type options\n$mfp-include-image-type: true; // Enable Image-type popups\n$mfp-image-background: #444 !default;\n$mfp-image-padding-top: 40px; // Image padding top\n$mfp-image-padding-bottom: 40px; // Image padding bottom\n$mfp-include-mobile-layout-for-image: true; // Removes paddings from top and bottom\n\n// Image caption options\n$mfp-caption-title-color: #f3f3f3; // Caption title color\n$mfp-caption-subtitle-color: #bdbdbd; // Caption subtitle color\n.mfp-counter { font-family: $serif; } // Caption font family\n\n// A11y\n$mfp-use-visuallyhidden: false;",
"// Sass Utilities\n// ==============\n// - Susy Error Output Override [variable]\n// - Susy Error [function]\n\n\n\n// Susy Error Output Override\n// --------------------------\n/// Turn off error output for testing\n/// @group x-utility\n/// @access private\n$_susy-error-output-override: false !default;\n\n\n\n// Susy Error\n// ----------\n/// Optionally return error messages without failing,\n/// as a way to test error cases\n///\n/// @group x-utility\n/// @access private\n///\n/// @param {string} $message -\n/// A useful error message, explaining the problem\n/// @param {string} $source -\n/// The original source of the error for debugging\n/// @param {bool} $override [$_susy-error-output-override] -\n/// Optionally return the error rather than failing\n/// @return {string} -\n/// Combined error with source and message\n/// @throws When `$override == true`\n@function _susy-error(\n $message,\n $source,\n $override: $_susy-error-output-override\n) {\n @if $override {\n @return 'ERROR [#{$source}] #{$message}';\n }\n\n @error '[#{$source}] #{$message}';\n}\n\n\n// Su Is Comparable\n// ----------------\n/// Check that the units in a grid are comparable\n///\n/// @group x-validation\n/// @access private\n///\n/// @param {numbers} $lengths… -\n/// Arglist of all the number values to compare\n/// (columns, gutters, span, etc)\n///\n/// @return {'fluid' | 'static' | false} -\n/// The type of span (fluid or static) when units match,\n/// or `false` for mismatched units\n@function _su-is-comparable(\n $lengths...\n) {\n $first: nth($lengths, 1);\n\n @if (length($lengths) == 1) {\n @return if(unitless($first), 'fluid', 'static');\n }\n\n @for $i from 2 through length($lengths) {\n $comp: nth($lengths, $i);\n\n $fail: not comparable($first, $comp);\n $fail: $fail or (unitless($first) and not unitless($comp));\n $fail: $fail or (unitless($comp) and not unitless($first));\n\n @if $fail {\n @return false;\n }\n }\n\n @return if(unitless($first), 'fluid', 'static');\n}\n\n\n// Su Map Add Units\n// ----------------\n/// The calc features use a map of units and values\n/// to compile the proper algorythm.\n/// This function adds a new value to any comparable existing unit/value,\n/// or adds a new unit/value pair to the map\n///\n/// @group x-utility\n/// @access private\n///\n/// @param {map} $map -\n/// A map of unit/value pairs, e.g. ('px': 120px)\n/// @param {length} $value -\n/// A new length to be added to the map\n/// @return {map} -\n/// The updated map, with new value added\n///\n/// @example scss -\n/// $map: (0px: 120px);\n/// $map: _su-map-add-units($map, 1in); // add a comparable unit\n/// $map: _su-map-add-units($map, 3vw); // add a new unit\n///\n/// @each $units, $value in $map {\n/// /* #{$units}: #{$value} */\n/// }\n@function _su-map-add-units(\n $map,\n $value\n) {\n $unit: $value * 0;\n $has: map-get($map, $unit) or 0;\n\n @if ($has == 0) {\n @each $try, $could in $map {\n $match: comparable($try, $value);\n $unit: if($match, $try, $unit);\n $has: if($match, $could, $has);\n }\n }\n\n @return map-merge($map, ($unit: $has + $value));\n}\n\n\n// Susy Flatten\n// ------------\n/// Flatten a multidimensional list\n///\n/// @group x-utility\n/// @access private\n///\n/// @param {list} $list -\n/// The list to be flattened\n/// @return {list} -\n/// The flattened list\n///\n/// @example scss -\n/// $list: 120px (30em 30em) 120px;\n/// /* #{_susy-flatten($list)} */\n@function _susy-flatten(\n $list\n) {\n $flat: ();\n\n // Don't iterate over maps\n @if (type-of($list) == 'map') {\n @return $list;\n }\n\n // Iterate over lists (or single items)\n @each $item in $list {\n @if (type-of($item) == 'list') {\n $item: _susy-flatten($item);\n $flat: join($flat, $item);\n } @else {\n $flat: append($flat, $item);\n }\n }\n\n // Return flattened list\n @return $flat;\n}\n",
"/// Validation\n/// ==========\n/// Each argument to Su has a single canonical syntax.\n/// These validation functions check to ensure\n/// that each argument is valid,\n/// in order to provide useful errors\n/// before attempting to calculate the results/\n///\n/// @group x-validation\n///\n/// @see su-valid-columns\n/// @see su-valid-gutters\n/// @see su-valid-spread\n/// @see su-valid-location\n\n\n\n// Valid Span\n// ----------\n/// Check that the `span` argument\n/// is a number, length, or column-list\n///\n/// @group x-validation\n///\n/// @param {number | list} $span -\n/// Number of columns, or length of span\n///\n/// @return {number | list} -\n/// Validated `$span` number, length, or columns list\n///\n/// @throw\n/// when span value is not a number, or valid column list\n@function su-valid-span(\n $span\n) {\n $type: type-of($span);\n @if ($type == 'number') {\n @return $span;\n } @else if ($type == 'list') and su-valid-columns($span, 'silent-failure') {\n @return $span;\n }\n\n $actual: '[#{type-of($span)}] `#{inspect($span)}`';\n @return _susy-error(\n '#{$actual} is not a valid number, length, or column-list for $span.',\n 'su-valid-span');\n}\n\n\n\n// Valid Columns\n// -------------\n/// Check that the `columns` argument is a valid\n/// list of column-lengths\n///\n/// @group x-validation\n///\n/// @param {list} $columns -\n/// List of column-lengths\n/// @param {bool} $silent-failure [true] -\n/// Set false to return null on failure\n///\n/// @return {list} -\n/// Validated `$columns` list\n///\n/// @throw\n/// when column value is not a valid list of numbers\n@function su-valid-columns(\n $columns,\n $silent-failure: false\n) {\n @if (type-of($columns) == 'list') {\n $fail: false;\n\n @each $col in $columns {\n @if (type-of($col) != 'number') {\n $fail: true;\n }\n }\n\n @if not $fail {\n @return $columns;\n }\n }\n\n // Silent Failure\n @if $silent-failure {\n @return null;\n }\n\n // Error Message\n $actual: '[#{type-of($columns)}] `#{inspect($columns)}`';\n\n @return _susy-error(\n '#{$actual} is not a valid list of numbers for $columns.',\n 'su-valid-columns');\n}\n\n\n\n// Valid Gutters\n// -------------\n/// Check that the `gutters` argument is a valid number\n///\n/// @group x-validation\n///\n/// @param {number} $gutters -\n/// Width of a gutter\n///\n/// @return {number} -\n/// Validated `$gutters` number\n///\n/// @throw\n/// when gutter value is not a number\n@function su-valid-gutters(\n $gutters\n) {\n $type: type-of($gutters);\n\n @if ($type == 'number') {\n @return $gutters;\n }\n\n $actual: '[#{$type}] `#{inspect($gutters)}`';\n @return _susy-error(\n '#{$actual} is not a number or length for $gutters.',\n 'su-valid-gutters');\n}\n\n\n\n// Valid Spread\n// ------------\n/// Check that the `spread` argument is a valid\n/// intiger between `-1` and `1`\n///\n/// @group x-validation\n///\n/// @param {0 | 1 | -1} $spread -\n/// Number of gutters to include in a span,\n/// relative to the number columns\n///\n/// @return {0 | 1 | -1} -\n/// Validated `$spread` number\n///\n/// @throw\n/// when spread value is not a valid spread\n@function su-valid-spread(\n $spread\n) {\n @if index(0 1 -1, $spread) {\n @return $spread;\n }\n\n $actual: '[#{type-of($spread)}] `#{inspect($spread)}`';\n @return _susy-error(\n '#{$actual} is not a normalized [0 | 1 | -1] value for `$spread`.',\n 'su-valid-spread');\n}\n\n\n\n// Valid Location\n// --------------\n/// Check that the `location` argument is a valid number,\n/// within the scope of available columns\n///\n/// @group x-validation\n///\n/// @param {number} $span -\n/// Number of grid-columns to be spanned\n/// @param {integer | string} $location -\n/// Starting (1-indexed) column-position of that span\n/// @param {list} $columns -\n/// List of available columns in the grid\n///\n/// @return {integer} -\n/// Validated `$location` intiger\n///\n/// @throw\n/// when location value is not a valid index,\n/// gi
"/// Grid Math Engine\n/// ================\n/// The `su` functions give you direct access to the math layer,\n/// without any syntax-sugar like shorthand parsing, and normalization.\n/// If you prefer named arguments, and stripped-down syntax,\n/// you can use these functions directly in your code –\n/// replacing `span`, `gutter`, and `slice`.\n///\n/// These functions are also useful\n/// for building mixins or other extensions to Susy.\n/// Apply the Susy syntax to new mixins and functions,\n/// using our \"Plugin Helpers\",\n/// or write your own syntax and pass the normalized results along\n/// to `su` for compilation.\n///\n/// @group su-math\n///\n/// @see su-span\n/// @see su-gutter\n/// @see su-slice\n/// @ignore _su-sum\n/// @ignore _su-calc-span\n/// @ignore _su-calc-sum\n/// @ignore _su-needs-calc-output\n\n\n\n// Su Span\n// -------\n/// Calculates and returns a CSS-ready span width,\n/// based on normalized span and context data –\n/// a low-level version of `susy-span`,\n/// with all of the logic and none of the syntax sugar.\n///\n/// - Grids defined with unitless numbers will return `%` values.\n/// - Grids defined with comparable units\n/// will return a value in the units provided.\n/// - Grids defined with a mix of units,\n/// or a combination of untiless numbers and unit-lengths,\n/// will return a `calc()` string.\n///\n/// @group su-math\n/// @see susy-span\n///\n/// @param {number | list} $span -\n/// Number or list of grid columns to span\n/// @param {list} $columns -\n/// List of columns available\n/// @param {number} $gutters -\n/// Width of a gutter in column-comparable units\n/// @param {0 | 1 | -1} $spread -\n/// Number of gutters spanned,\n/// relative to `span` count\n/// @param {0 | 1 | -1} $container-spread [$spread] -\n/// Number of gutters spanned,\n/// relative to `columns` count\n/// @param {integer} $location [1] -\n/// Optional position of sub-span among full set of columns\n///\n/// @return {length} -\n/// Relative or static length of a span on the grid\n@function su-span(\n $span,\n $columns,\n $gutters,\n $spread,\n $container-spread: $spread,\n $location: 1\n) {\n $span: su-valid-span($span);\n $columns: su-valid-columns($columns);\n $gutters: su-valid-gutters($gutters);\n $spread: su-valid-spread($spread);\n\n @if (type-of($span) == 'number') {\n @if (not unitless($span)) {\n @return $span;\n }\n\n $location: su-valid-location($span, $location, $columns);\n $span: su-slice($span, $columns, $location, $validate: false);\n }\n\n @if _su-needs-calc-output($span, $columns, $gutters, $spread, not 'validate') {\n @return _su-calc-span($span, $columns, $gutters, $spread, $container-spread, not 'validate');\n }\n\n $span-width: _su-sum($span, $gutters, $spread, $validate: false);\n\n @if unitless($span-width) {\n $container-spread: su-valid-spread($container-spread);\n $container: _su-sum($columns, $gutters, $container-spread, $validate: false);\n @return percentage($span-width / $container);\n }\n\n @return $span-width;\n}\n\n\n\n// Su Gutter\n// ---------\n/// Calculates and returns a CSS-ready gutter width,\n/// based on normalized grid data –\n/// a low-level version of `susy-gutter`,\n/// with all of the logic and none of the syntax sugar.\n///\n/// - Grids defined with unitless numbers will return `%` values.\n/// - Grids defined with comparable units\n/// will return a value in the units provided.\n/// - Grids defined with a mix of units,\n/// or a combination of untiless numbers and unit-lengths,\n/// will return a `calc()` string.\n///\n/// @group su-math\n/// @see susy-gutter\n///\n/// @param {list} $columns -\n/// List of columns in the grid\n/// @param {number} $gutters -\n/// Width of a gutter in column-comparable units\n/// @param {0 | 1 | -1} $container-spread -\n/// Number of gutters spanned,\n/// relative to `columns` count\n///\n/// @return {length} -\n/// Relative or static length of one gutter in a grid\n@function su-gutter(\n $columns,\n $gutters,\n $container-sprea
"/// Susy3 Configuration\n/// ===================\n/// Susy3 has 4 core settings, in a single settings map.\n/// You'll notice a few differences from Susy2:\n///\n/// **Columns** no longer accept a single number, like `12`,\n/// but use a syntax more similar to the new\n/// CSS [grid-template-columns][columns] –\n/// a list of relative sizes for each column on the grid.\n/// Unitless numbers in Susy act very similar to `fr` units in CSS,\n/// and the `susy-repeat()` function (similar to the css `repeat()`)\n/// helps quickly establish equal-width columns.\n///\n/// [columns]: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns\n///\n/// - `susy-repeat(12)` will create 12 fluid, equal-width columns\n/// - `susy-repeat(6, 120px)` will create 6 equal `120px`-wide columns\n/// - `120px susy-repeat(4) 120px` will create 6 columns,\n/// the first and last are `120px`,\n/// while the middle 4 are equal fractions of the remainder.\n/// Susy will output `calc()` values in order to achieve this.\n///\n/// **Gutters** haven't changed –\n/// a single fraction or explicit width –\n/// but the `calc()` output feature\n/// means you can now use any combination of units and fractions\n/// to create static-gutters on a fluid grid, etc.\n///\n/// **Spread** existed in the Susy2 API as a span option,\n/// and was otherwise handled behind the scenes.\n/// Now we're giving you full control over all spread issues.\n/// You can find a more [detailed explanation of spread on the blog][spread].\n///\n/// [spread]: http://oddbird.net/2017/06/13/susy-spread/\n///\n/// You can access your global settings at any time\n/// with the `susy-settings()` function,\n/// or grab a single setting from the global scope\n/// with `susy-get('columns')`, `susy-get('gutters')` etc.\n///\n/// @group a-config\n/// @link http://oddbird.net/2017/06/13/susy-spread/\n/// Article: Understanding Spread in Susy3\n///\n/// @see $susy\n/// @see susy-settings\n/// @see susy-get\n\n\n\n// Susy\n// ----\n/// The grid is defined in a single map variable,\n/// with four initial properties:\n/// `columns`, `gutters`, `spread` and `container-spread`.\n/// Anything you put in the root `$susy` variable map\n/// will be treated as a global project default.\n/// You can create similar configuration maps\n/// under different variable names,\n/// to override the defaults as-needed.\n///\n/// @group a-config\n/// @type Map\n///\n/// @see $_susy-defaults\n/// @see {function} susy-repeat\n/// @link\n/// https://codepen.io/mirisuzanne/pen/EgmJJp?editors=1100\n/// Spread examples on CodePen\n///\n/// @prop {list} columns -\n/// Columns are described by a list of numbers,\n/// representing the relative width of each column.\n/// The syntax is a simplified version of CSS native\n/// `grid-template-columns`,\n/// expecting a list of grid-column widths.\n/// Unitless numbers create fractional fluid columns\n/// (similar to the CSS-native `fr` unit),\n/// while length values (united numbers)\n/// are used to define static columns.\n/// You can mix-and match units and fractions,\n/// to create a mixed grid.\n/// Susy will generate `calc()` values when necessary,\n/// to make all your units work together.\n///\n/// Use the `susy-repeat($count, $value)` function\n/// to more easily repetative columns,\n/// similar to the CSS-native `repeat()`.\n///\n/// - `susy-repeat(8)`:\n/// an 8-column, symmetrical, fluid grid.\n/// <br />Identical to `(1 1 1 1 1 1 1 1)`.\n/// - `susy-repeat(6, 8em)`:\n/// a 6-column, symmetrical, em-based grid.\n/// <br />Identical to `(8em 8em 8em 8em 8em 8em)`.\n/// - `(300px susy-repeat(4) 300px)`:\n/// a 6-column, asymmetrical, mixed fluid/static grid\n/// using `calc()` output.\n/// <br />Identical to `(300px 1 1 1 1 300px)`.\n///\n/// **NOTE** that `12` is no longer a valid 12-column grid definition,\n/// and you must list all the columns individually\n/// (or by using the `susy-repeat()` function).\n///\n/// @prop {number} gutters -\n/// Gutters are defined a
"/// Syntax Normalization\n/// ====================\n/// Susy is divided into two layers:\n/// \"Su\" provides the core math functions with a stripped-down syntax,\n/// while \"Susy\" adds global settings, shorthand syntax,\n/// and other helpers.\n/// Each setting (e.g. span, location, columns, spread, etc.)\n/// has a single canonical syntax in Su.\n///\n/// This normalization module helps translate between those layers,\n/// transforming parsed Susy input into\n/// values that Su will understand.\n///\n/// @group x-normal\n///\n/// @see susy-normalize\n/// @see susy-normalize-span\n/// @see susy-normalize-columns\n/// @see susy-normalize-spread\n/// @see susy-normalize-location\n\n\n\n// Susy Normalize\n// --------------\n/// Normalize the values in a configuration map.\n/// In addition to the global `$susy` properties,\n/// this map can include local span-related imformation,\n/// like `span` and `location`.\n///\n/// Normalization does not check that values are valid,\n/// which will happen in the Su math layer.\n/// These functions merely look for known Susy syntax –\n/// returning a map with those shorthand values\n/// converted into low-level data for Su.\n/// For example `span: all` and `location: first`\n/// will be converted into specific numbers.\n///\n/// @group x-normal\n/// @see $susy\n/// @see susy-parse\n///\n/// @param {map} $config -\n/// Map of Susy configuration settings to normalize.\n/// See `$susy` and `susy-parse()` documentation for details.\n/// @param {map | null} $context [null] -\n/// Map of Susy configuration settings to use as global reference,\n/// or `null` to use global settings.\n///\n/// @return {map} -\n/// Map of Susy configuration settings,\n/// with all values normalized for Su math functions.\n@function susy-normalize(\n $config,\n $context: null\n) {\n // Spread\n @each $setting in ('spread', 'container-spread') {\n $value: map-get($config, $setting);\n\n @if $value {\n $value: susy-normalize-spread($value);\n $config: map-merge($config, ($setting: $value));\n }\n }\n\n // Columns\n $columns: map-get($config, 'columns');\n\n @if $columns {\n $columns: susy-normalize-columns($columns, $context);\n $config: map-merge($config, ('columns': $columns));\n }\n\n @if not $columns {\n $map: type-of($context) == 'map';\n $columns: if($map, map-get($context, 'columns'), null);\n $columns: $columns or susy-get('columns');\n }\n\n // Span\n $span: map-get($config, 'span');\n\n @if $span {\n $span: susy-normalize-span($span, $columns);\n $config: map-merge($config, ('span': $span));\n }\n\n // Location\n $location: map-get($config, 'location');\n\n @if $location {\n $location: susy-normalize-location($span, $location, $columns);\n $config: map-merge($config, ('location': $location));\n }\n\n @return $config;\n}\n\n\n\n// Normalize Span\n// --------------\n/// Normalize `span` shorthand for Su.\n/// Su span syntax allows an explicit length (e.g. `3em`),\n/// unitless column-span number (e.g. `3` columns),\n/// or an explicit list of columns (e.g. `(3 5 8)`).\n///\n/// Susy span syntax also allows the `all` keyword,\n/// which will be converted to a slice of the context\n/// in normalization.\n///\n/// @group x-normal\n///\n/// @param {number | list | 'all'} $span -\n/// Span value to normalize.\n/// @param {list} $columns -\n/// Normalized list of columns in the grid\n///\n/// @return {number | list} -\n/// Number or list value for `$span`\n@function susy-normalize-span(\n $span,\n $columns: susy-get('columns')\n) {\n @if ($span == 'all') {\n @return length($columns);\n }\n\n @return $span;\n}\n\n\n\n// Normalize Columns\n// -----------------\n/// Normalize `column` shorthand for Su.\n/// Su column syntax only allows column lists (e.g. `120px 1 1 1 120px`).\n///\n/// Susy span syntax also allows a unitless `slice` number (e.g `of 5`),\n/// which will be converted to a slice of the context\n/// in normalization.\n///\n/// @group x-normal\n///\n/// @param {list | integer} $columns -\n/// List of av
"/// Shorthand Syntax Parser\n/// =======================\n/// The syntax parser converts [shorthand syntax][short]\n/// into a map of settings that can be compared/merged with\n/// other config maps and global setting.\n///\n/// [short]: b-api.html\n///\n/// @group x-parser\n\n\n\n// Parse\n// -----\n/// The `parse` function provides all the syntax-sugar in Susy,\n/// converting user shorthand\n/// into a usable map of keys and values\n/// that can be normalized and passed to Su.\n///\n/// @group x-parser\n/// @see $susy\n///\n/// @param {list} $shorthand -\n/// Shorthand expression to define the width of the span,\n/// optionally containing:\n/// - a count, length, or column-list span;\n/// - `at $n`, `first`, or `last` location on asymmetrical grids;\n/// - `narrow`, `wide`, or `wider` for optionally spreading\n/// across adjacent gutters;\n/// - `of $n <spread>` for available grid columns\n/// and spread of the container\n/// (span counts like `of 6` are only valid\n/// in the context of symmetrical grids);\n/// - and `set-gutters $n` to override global gutter settings\n/// @param {bool} $context-only [false] -\n/// Allow the parser to ignore span and span-spread values,\n/// only parsing context and container-spread.\n/// This makes it possible to accept spanless values,\n/// like the `gutters()` syntax.\n/// When parsing context-only,\n/// the `of` indicator is optional.\n///\n/// @return {map} -\n/// Map of span and grid settings\n/// parsed from shorthand input –\n/// including all the properties available globally –\n/// `columns`, `gutters`, `spread`, `container-spread` –\n/// along with the span-specific properties\n/// `span`, and `location`.\n///\n/// @throw\n/// when a shorthand value is not recognized\n@function susy-parse(\n $shorthand,\n $context-only: false\n) {\n $parse-error: 'Unknown shorthand property:';\n $options: (\n 'first': 'location',\n 'last': 'location',\n 'alpha': 'location',\n 'omega': 'location',\n 'narrow': 'spread',\n 'wide': 'spread',\n 'wider': 'spread',\n );\n\n $return: ();\n $span: null;\n $columns: null;\n\n $of: null;\n $next: false;\n\n // Allow context-only shorthand, without span\n @if ($context-only) and (not index($shorthand, 'of')) {\n @if su-valid-columns($shorthand, 'fail-silent') {\n $shorthand: 'of' $shorthand;\n } @else {\n $shorthand: join('of', $shorthand);\n }\n }\n\n // loop through the shorthand list\n @for $i from 1 through length($shorthand) {\n $item: nth($shorthand, $i);\n $type: type-of($item);\n $error: false;\n $details: '[#{$type}] `#{$item}`';\n\n // if we know what's supposed to be coming next…\n @if $next {\n\n // Add to the return map\n $return: map-merge($return, ($next: $item));\n\n // Reset next to `false`\n $next: false;\n\n } @else { // If we don't know what's supposed to be coming…\n\n // Keywords…\n @if ($type == 'string') {\n // Check the map for keywords…\n @if map-has-key($options, $item) {\n $setting: map-get($options, $item);\n\n // Spread could be on the span or the container…\n @if ($setting == 'spread') and ($of) {\n $return: map-merge($return, ('container-spread': $item));\n } @else {\n $return: map-merge($return, ($setting: $item));\n }\n\n } @else if ($item == 'all') {\n // `All` is a span shortcut\n $span: 'all';\n } @else if ($item == 'at') {\n // Some keywords setup what's next…\n $next: 'location';\n } @else if ($item == 'set-gutters') {\n $next: 'gutters';\n } @else if ($item == 'of') {\n $of: true;\n } @else {\n $error: true;\n }\n\n } @else if ($type == 'number') or ($type == 'list') { // Numbers & lists…\n\n @if not ($span or $of) {\n // We don't have a span, and we're not expecting context…\n $span: $item;\n } @else if ($of
"/// Syntax Utilities for Extending Susy\n/// ===================================\n/// There are many steps involved\n/// when translating between the Susy syntax layer,\n/// and the Su core math.\n/// That entire process can be condensed with these two functions.\n/// For anyone that wants to access the full power of Susy,\n/// and build their own plugins, functions, or mixins –\n/// this is the primary API for compiling user input,\n/// and accessing the core math.\n///\n/// This is the same technique we use internally,\n/// to keep our API layer simple and light-weight.\n/// Every function accepts two arguments,\n/// a \"shorthand\" description of the span or context,\n/// and an optional settings-map to override global defaults.\n///\n/// - Use `susy-compile()` to parse, merge, and normalize\n/// all the user settings into a single map.\n/// - Then use `su-call()` to call one of the core math functions,\n/// with whatever data is needed for that function.\n///\n/// @group plugin-utils\n/// @see susy-compile\n/// @see su-call\n///\n/// @example scss - Susy API `gutter` function\n/// @function susy-gutter(\n/// $context: susy-get('columns'),\n/// $config: ()\n/// ) {\n/// // compile and normalize all user arguments and global settings\n/// $context: susy-compile($context, $config, 'context-only');\n/// // call `su-gutter` with the appropriate data\n/// @return su-call('su-gutter', $context);\n/// }\n///\n/// @example scss - Sample `span` mixin for floated grids\n/// @mixin span(\n/// $span,\n/// $config: ()\n/// ) {\n/// $context: susy-compile($span, $config);\n/// width: su-call('su-span', $context);\n///\n/// @if index($span, 'last') {\n/// float: right;\n/// } @else {\n/// float: left;\n/// margin-right: su-call('su-gutter', $context);\n/// }\n/// }\n\n\n\n// Compile\n// -------\n/// Susy's syntax layer has various moving parts,\n/// with syntax-parsing for the grid/span shorthand,\n/// and normalization for each of the resulting values.\n/// The compile function rolls this all together\n/// in a single call –\n/// for quick access from our internal API functions,\n/// or any additional functions and mixins you add to your project.\n/// Pass user input and configuration maps to the compiler,\n/// and it will hand back a map of values ready for Su.\n/// Combine this with the `su-call` function\n/// to quickly parse, normalize, and process grid calculations.\n///\n/// @group plugin-utils\n/// @see su-call\n///\n/// @param {list | map} $shorthand -\n/// Shorthand expression to define the width of the span,\n/// optionally containing:\n/// - a count, length, or column-list span;\n/// - `at $n`, `first`, or `last` location on asymmetrical grids;\n/// - `narrow`, `wide`, or `wider` for optionally spreading\n/// across adjacent gutters;\n/// - `of $n <spread>` for available grid columns\n/// and spread of the container\n/// (span counts like `of 6` are only valid\n/// in the context of symmetrical grids);\n/// - and `set-gutters $n` to override global gutter settings\n/// @param {map} $config [null] -\n/// Optional map of Susy grid configuration settings\n/// @param {bool} $context-only [false] -\n/// Allow the parser to ignore span and span-spread values,\n/// only parsing context and container-spread\n///\n/// @return {map} -\n/// Parsed and normalized map of settings,\n/// based on global and local configuration,\n/// alongwith shorthad adjustments.\n///\n/// @example scss -\n/// $user-input: 3 wide of susy-repeat(6, 120px) set-gutters 10px;\n/// $grid-data: susy-compile($user-input, $susy);\n///\n/// @each $key, $value in $grid-data {\n/// /* #{$key}: #{$value}, */\n/// }\n@function susy-compile(\n $short,\n $config: null,\n $context-only: false\n) {\n // Get and normalize config\n $config: if($config, susy-settings($config), susy-settings());\n $normal-config: susy-normalize($config);\n\n // Parse and normalize shorthand\n @if (type-of($short) != 'map') and (length(
"/// Susy3 API Functions\n/// ===================\n/// These three functions form the core of Susy's\n/// layout-building grid API.\n///\n/// - Use `span()` and `gutter()` to return any grid-width,\n/// and apply the results wherever you need them:\n/// CSS `width`, `margin`, `padding`, `flex-basis`, `transform`, etc.\n/// - For asymmetrical-fluid grids,\n/// `slice()` can help manage your nesting context.\n///\n/// All three functions come with an unprefixed alias by default,\n/// using the `susy` import.\n/// Import the `susy-prefix` partial instead,\n/// if you only only want prefixed versions of the API.\n///\n/// This is a thin syntax-sugar shell around\n/// the \"Su\" core-math functions: `su-span`, `su-gutter`, and `su-slice`.\n/// If you prefer the more constrained syntax of the math engine,\n/// you are welcome to use those functions instead.\n///\n/// @group b-api\n/// @see susy-span\n/// @see susy-gutter\n/// @see susy-slice\n/// @see su-span\n/// @see su-gutter\n/// @see su-slice\n\n\n\n/// ## Shorthand\n///\n/// All functions draw on the same shorthand syntax in two parts,\n/// seperated by the word `of`.\n///\n/// ### Span Syntax: `<width>` [`<location>` `<spread>`]\n/// The first part describes the\n/// **span** width, location, and spread in any order.\n/// Only the width is required:\n///\n/// - `span(2)` will return the width of 2 columns.\n/// - `span(3 wide)` will return 3-columns, with an additional gutter.\n/// - location is only needed with asymmetrical grids,\n/// where `span(3 at 2)` will return the width of\n/// specific columns on the grid.\n/// Since these are functions, they will not handle placement for you.\n///\n/// ### Context Syntax: `[of <columns> <container-spread> <gutters>]`\n/// The second half of Susy's shorthand\n/// describes the grid-**context** –\n/// available columns, container-spread, and optional gutter override –\n/// in any order.\n/// All of these settings have globally-defined defaults:\n///\n/// - `span(2 of 6)` will set the context to\n/// a slice of 6 columns from the global grid.\n/// More details below.\n/// - `span(2 of 12 wide)` changes the container-spread\n/// as well as the column-context.\n/// - `span(2 of 12 set-gutters 0.5em)`\n/// will override the global gutters setting\n/// for this one calculation.\n///\n/// A single unitless number for `columns`\n/// will be treated as a slice of the parent grid.\n/// On a grid with `columns: susy-repeat(12, 120px)`,\n/// the shorthand `of 4` will use the parent `120px` column-width.\n/// You can also be more explicit,\n/// and say `of susy-repeat(4, 100px)`.\n/// If you are using asymmetrical grids,\n/// like `columns: (1 1 2 3 5 8)`,\n/// Susy can't slice it for you without knowing which columns you want.\n/// The `slice` function accepts exactly the same syntax as `span`,\n/// but returns a list of columns rather than a width.\n/// Use it in your context like `of slice(first 3)`.\n///\n/// @group b-api\n\n\n\n// Susy Span\n// ---------\n/// This is the primary function in Susy —\n/// used to return the width of a span across one or more columns,\n/// and any relevant gutters along the way.\n/// With the default settings,\n/// `span(3)` will return the width of 3 columns,\n/// and the 2 intermediate gutters.\n/// This can be used to set the `width` property of grid elements,\n/// or `margin` and `padding`\n/// to push, pull, and pad your elements.\n///\n/// - This is a thin syntax-sugar shell around\n/// the core-math `su-span()` function.\n/// - The un-prefixed alias `span()` is available by default.\n///\n/// @group b-api\n/// @see su-span\n/// @see $susy\n///\n/// @param {list} $span -\n/// Shorthand expression to define the width of the span,\n/// optionally containing:\n/// - a count, length, or column-list span.\n/// - `at $n`, `first`, or `last` location on asymmetrical grids,\n/// where `at 1 == first`,\n/// and `last` will calculate the proper location\n/// based on columns and span.\n/// - `narrow`, `wide`, or `wider` for optionally spreading\n/// a