Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rfs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Cuppens <martijn.cuppens@gmail.com>2018-12-06 23:36:15 +0300
committerGitHub <noreply@github.com>2018-12-06 23:36:15 +0300
commit58facdc9adfdb75c392dacc53ab84960a9a1e5df (patch)
treea7340b8559daa7197ef7e5def70547a93c2e42cb
parentc8f7cd39f9d2de77bb4c96d230e87b6c1948ab60 (diff)
Support $rfs-breakpoint config without unit (#49)
-rw-r--r--sass/_rfs.sass3
-rw-r--r--scss/_rfs.scss4
2 files changed, 7 insertions, 0 deletions
diff --git a/sass/_rfs.sass b/sass/_rfs.sass
index b9ed78a..faa283f 100644
--- a/sass/_rfs.sass
+++ b/sass/_rfs.sass
@@ -52,6 +52,9 @@ $rfs-breakpoint-unit: unit($rfs-breakpoint)
// Remove unit from $rfs-breakpoint for calculations
@if $rfs-breakpoint-unit == "px"
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1)
+@else if $rfs-breakpoint-unit == ""
+ // Use `px` as default
+ $rfs-breakpoint-unit: "px"
@else if $rfs-breakpoint-unit == "rem" or $rfs-breakpoint-unit == "em"
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1 / $rfs-rem-value)
diff --git a/scss/_rfs.scss b/scss/_rfs.scss
index 83c8b3e..8aa9710 100644
--- a/scss/_rfs.scss
+++ b/scss/_rfs.scss
@@ -56,6 +56,10 @@ $rfs-breakpoint-unit: unit($rfs-breakpoint);
@if $rfs-breakpoint-unit == "px" {
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1);
}
+@else if $rfs-breakpoint-unit == "" {
+ // Use `px` as default
+ $rfs-breakpoint-unit: "px";
+}
@else if $rfs-breakpoint-unit == "rem" or $rfs-breakpoint-unit == "em" {
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1 / $rfs-rem-value);
}