////////////////////////////// // Default Settings ////////////////////////////// $Toolkit-Settings: ( 'clearfix extend': false, 'color stack amounts': 25% 50% 75% 85% 90%, 'tint shade amounts': 75% 50% 25%, 'tint color': #fff, 'shade color': #000, 'color scale steps': 6, 'ligature extend': false, 'font face weight': normal, 'font face style': normal, 'font face inline woff': false, 'icon font extend': false, 'icon font speak': false, 'fade in duration': 1s, 'fade in loading class': '.wf-loading', 'fade in extend': false, 'intrinsic ratio': 16/9, 'intrinsic ratio width': 100%, 'intrinsic ratio elements': '> *', 'intrinsic ratio position': top, 'intrinsic ratio extend': false, 'nested context contexts': 100%, 'nested context position': left, 'triangle color': #000, 'triangle height': 1em, 'triangle width': 1em, 'triangle angle': 0, 'parallax perspective': 1, 'parallax element': 'body', 'parallax ios': true, 'parallax distance': 0, 'vertical midpoint': 50%, 'vertical extend': false ); ////////////////////////////// // User Settings ////////////////////////////// $toolkit: () !default; ////////////////////////////// // Has Setting ////////////////////////////// @function toolkit-has($setting) { @if map-has-key($toolkit, $setting) { @return true; } @else { @return false; } } ////////////////////////////// // Get Settings ////////////////////////////// @function toolkit-get($setting) { @if toolkit-has($setting) { @return map-get($toolkit, $setting); } @else { @return map-get($Toolkit-Settings, $setting); } } ////////////////////////////// // Set Settings ////////////////////////////// @function toolkit-set($setting, $value) { @if (str-index($setting, '-') or str-index($setting, '_')) and str-index($setting, ' ') == null { @warn "Words in Singularity settings should be spaces, not dashes or underscores. Please replace dashes and underscores between words with spaces. Settings will not work as expected until changed."; } $toolkit: map-merge($toolkit, ($setting: $value)) !global; @return true; } @mixin toolkit-change($setting, $value) { $toolkit-change: toolkit-set($setting, $value); } @mixin toolkit-set($setting, $value) { $toolkit-change: toolkit-set($setting, $value); } ////////////////////////////// // Remove Setting ////////////////////////////// @function toolkit-reset($setting) { $Return: (); @each $Key, $Value in $toolkit { $Return: if($setting == $Key, $Return, map-merge($Return, ($Key: $Value))); } $toolkit: $Return !global; @return true; } @mixin toolkit-reset($setting) { $toolkit-reset: toolkit-reset($setting); }