diff --git a/bower.json b/bower.json index bae344d..1b08ab1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "growcss-sass-config-manager", - "version": "2.0.10", + "version": "2.1.0", "homepage": "http://growcss.com/", "authors": [ "Daniel Bannert " diff --git a/dist/_config-manager.scss b/dist/_config-manager.scss index d0fe3b4..affb1e2 100644 --- a/dist/_config-manager.scss +++ b/dist/_config-manager.scss @@ -23,6 +23,18 @@ $config: config-set($key, $value, $default); } +// Gets a value to/from a configuration path +// +// @function config-get +// +// @param $key {string} The configuration path +// @param $default {bool} Whether the configuration is default +// +// @return {*} The value of the configuration path +@mixin config-get($key, $default: false) { + $config: config-get($key, $default); +} + // Remove settings // // @mixin config-reset diff --git a/package.json b/package.json index 25dc928..02e2f12 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "growcss-sass-config-manager", - "version": "2.0.10", + "version": "2.1.0", "description": "A dot-syntax configuration (Map) library for Sass (mixin / function).", "author": { "name": "Daniel Bannert", diff --git a/src/scss/utils/_mixins.scss b/src/scss/utils/_mixins.scss index a688a1b..858feab 100644 --- a/src/scss/utils/_mixins.scss +++ b/src/scss/utils/_mixins.scss @@ -14,6 +14,18 @@ $config: config-set($key, $value, $default); } +// Gets a value to/from a configuration path +// +// @function config-get +// +// @param $key {string} The configuration path +// @param $default {bool} Whether the configuration is default +// +// @return {*} The value of the configuration path +@mixin config-get($key, $default: false) { + $config: config-get($key, $default); +} + // Remove settings // // @mixin config-reset diff --git a/tests/specs/_config-manager.scss b/tests/specs/_config-manager.scss index d0fe3b4..affb1e2 100644 --- a/tests/specs/_config-manager.scss +++ b/tests/specs/_config-manager.scss @@ -23,6 +23,18 @@ $config: config-set($key, $value, $default); } +// Gets a value to/from a configuration path +// +// @function config-get +// +// @param $key {string} The configuration path +// @param $default {bool} Whether the configuration is default +// +// @return {*} The value of the configuration path +@mixin config-get($key, $default: false) { + $config: config-get($key, $default); +} + // Remove settings // // @mixin config-reset