jekyll-stretcher 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-stretcher.rb +5 -5
- data/lib/jekyll-stretcher/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 553e1f47230538490d03f5fb2726afad51e3ce56eba679dbb05d4277db9bee42
|
4
|
+
data.tar.gz: afaaf01d72b478713a98c7507e8f3cfd2a8bbed5208ea1d320957dfd9632b3fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a7a663e43b1980aef6bc54fa40d7cc5e1b1e366bbb204102c2371c5dfb9f6402e96094dba941bb59ffd9105c8d321a2c225269735c10eaa00203c4590e17c93
|
7
|
+
data.tar.gz: 808d3c50424173282f8636c990bb83dc55d42ba14560fb1da355dd0c0e6eb079ca635e5f28963b8839931837fd4f4849edeff6ad4582b72db2cca1932eacf252
|
data/lib/jekyll-stretcher.rb
CHANGED
@@ -8,18 +8,18 @@ module Jekyll
|
|
8
8
|
$stretcher-min: 375px !default;
|
9
9
|
$stretcher-max: 1440px !default;
|
10
10
|
|
11
|
-
@mixin jekyll-stretcher-double-scale($properties, $min-value, $max-value) {
|
11
|
+
@mixin jekyll-stretcher-double-scale($properties, $min-value, $max-value, $smin, $smax) {
|
12
12
|
@each $property in $properties {
|
13
13
|
\#{$property}: $min-value;
|
14
14
|
}
|
15
15
|
|
16
|
-
@media (min-width: $
|
16
|
+
@media (min-width: $smin) {
|
17
17
|
@each $property in $properties {
|
18
|
-
\#{$property}: calc(\#{$min-value} + \#{strip-unit($max-value - $min-value)} * (100vw - \#{$
|
18
|
+
\#{$property}: calc(\#{$min-value} + \#{strip-unit($max-value - $min-value)} * (100vw - \#{$smin}) / \#{strip-unit($smax - $smin)});
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
22
|
-
@media (min-width: $
|
22
|
+
@media (min-width: $smax) {
|
23
23
|
@each $property in $properties {
|
24
24
|
\#{$property}: $max-value;
|
25
25
|
}
|
@@ -55,7 +55,7 @@ GOOSE
|
|
55
55
|
warning += "#{indentation}@warn \"Relative units may not work with the scaling mixin (#{minUnit})\";\n";
|
56
56
|
end
|
57
57
|
|
58
|
-
lines[i] = "#{warning}#{indentation}@include jekyll-stretcher-double-scale(#{declaration}, #{minVal}#{minUnit}, #{maxVal}#{maxUnit});";
|
58
|
+
lines[i] = "#{warning}#{indentation}@include jekyll-stretcher-double-scale(#{declaration}, #{minVal}#{minUnit}, #{maxVal}#{maxUnit}, $stretcher-min, $stretcher-max);";
|
59
59
|
matched = true
|
60
60
|
end
|
61
61
|
lines.unshift(sretcher_mixin) if matched
|