Permalink
Browse files

Rename retrieve-bourbon-setting

Renames the `_retrieve-bourbon-setting` function to
`_fetch-bourbon-setting` which is shorter and easier to type.
  • Loading branch information...
1 parent 68087e5 commit b2fd4cd2cf598e69db75f7752016cd7ebb511b91 @tysongach tysongach committed Nov 7, 2016
View
@@ -19,11 +19,11 @@
@import "bourbon/utilities/assign-inputs";
@import "bourbon/utilities/compact-shorthand";
@import "bourbon/utilities/directional-property";
+@import "bourbon/utilities/fetch-bourbon-setting";
@import "bourbon/utilities/font-source-declaration";
@import "bourbon/utilities/gamma";
@import "bourbon/utilities/lightness";
@import "bourbon/utilities/contrast-ratio";
-@import "bourbon/utilities/retrieve-bourbon-setting";
@import "bourbon/utilities/unpack-shorthand";
@import "bourbon/library/border-color";
@@ -49,7 +49,7 @@
/// color: #eee;
/// }
///
-/// @require {function} _retrieve-bourbon-setting
+/// @require {function} _fetch-bourbon-setting
///
/// @require {function} _is-color
///
@@ -59,8 +59,8 @@
@function contrast-switch(
$base-color,
- $dark-color: _retrieve-bourbon-setting("contrast-switch-dark-color"),
- $light-color: _retrieve-bourbon-setting("contrast-switch-light-color")
+ $dark-color: _fetch-bourbon-setting("contrast-switch-dark-color"),
+ $light-color: _fetch-bourbon-setting("contrast-switch-light-color")
) {
@if not _is-color($base-color) {
@@ -44,13 +44,13 @@
///
/// @require {function} _font-source-declaration
///
-/// @require {function} _retrieve-bourbon-setting
+/// @require {function} _fetch-bourbon-setting
@mixin font-face(
$font-family,
$file-path,
- $file-formats: _retrieve-bourbon-setting("global-font-file-formats"),
- $asset-pipeline: _retrieve-bourbon-setting("rails-asset-pipeline")
+ $file-formats: _fetch-bourbon-setting("global-font-file-formats"),
+ $asset-pipeline: _fetch-bourbon-setting("rails-asset-pipeline")
) {
@font-face {
@@ -65,12 +65,12 @@
/// font-size: 1.728em;
/// }
///
-/// @require {function} _retrieve-bourbon-setting
+/// @require {function} _fetch-bourbon-setting
@function modular-scale(
$increment,
- $value: _retrieve-bourbon-setting("modular-scale-base"),
- $ratio: _retrieve-bourbon-setting("modular-scale-ratio")
+ $value: _fetch-bourbon-setting("modular-scale-base"),
+ $ratio: _fetch-bourbon-setting("modular-scale-ratio")
) {
$v1: nth($value, 1);
@@ -7,10 +7,10 @@
/// @return {boolean | color | list | number | string}
///
/// @example scss
-/// _retrieve-bourbon-setting(rails-asset-pipeline)
+/// _fetch-bourbon-setting(rails-asset-pipeline)
///
/// @access private
-@function _retrieve-bourbon-setting($setting) {
+@function _fetch-bourbon-setting($setting) {
@return map-get(map-merge($_bourbon-defaults, $bourbon), $setting);
}
@@ -1,17 +1,17 @@
require "spec_helper"
-describe "_retrieve-bourbon-setting" do
+describe "fetch-bourbon-setting" do
before(:all) do
- ParserSupport.parse_file("utilities/retrieve-bourbon-setting")
+ ParserSupport.parse_file("utilities/fetch-bourbon-setting")
end
- context "gets the modular-scale-base setting" do
+ context "fetches the modular-scale-base setting" do
it "and returns the default value" do
expect(".test-1").to have_rule("content: 1em")
end
end
- context "gets the rails-asset-pipeline setting" do
+ context "fetches the rails-asset-pipeline setting" do
it "and returns the user-overridden value" do
expect(".test-2").to have_rule("content: true")
end
@@ -6,11 +6,11 @@ $bourbon: (
);
.test-1 {
- content: _retrieve-bourbon-setting("modular-scale-base");
+ content: _fetch-bourbon-setting("modular-scale-base");
}
.test-2 {
- content: _retrieve-bourbon-setting("rails-asset-pipeline");
+ content: _fetch-bourbon-setting("rails-asset-pipeline");
}
@include font-face("source-sans-pro", "source-sans-pro-regular");

0 comments on commit b2fd4cd

Please sign in to comment.