modular-scale 2.0.0.alpha1 → 2.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11a5c866b76f13e5501ae74c55ab575528a56f86
4
- data.tar.gz: e706db9fa0902a6595831c0ac4c4a7592b26bfd7
3
+ metadata.gz: d9d19e3ba952241eb84c685a2ec590ada850b49e
4
+ data.tar.gz: ebd81cb6ee870e5fd4d65c7f62df7e5d1aa1acdf
5
5
  SHA512:
6
- metadata.gz: ee2c1d671e279b41c69858efd3d1e5db9514502ea2c1cfe618d4a60cb0f3fbbb6a456ffed5c3f14d666f76f22838fed872b35f7a16d9d1f38b9e6e0f9d262cc5
7
- data.tar.gz: 447e0e020b7df1af562d6402bb5ba07bbb2b5bc8ad075915f42a5976182a38acb73f4279bd5d51dcc3079d59f5f928dc3adcaaeae5f4979d141e7640bc9e6804
6
+ metadata.gz: 7284ed53897d94d33ec8f737622ddf3e3e685efc4de6dd39db44492f123be01c020ab0b1e2693386df5481566a7154d6edc9aba9a1229ecc255c1aae3624045e
7
+ data.tar.gz: 8480a4a2de44c058719bfbace86fac80178aa7133e6a7b6c847f4a202f079a044bbd2f6d3f581c4d51ec8e3dc029f229015da382cfb18db9d3af03421d47d8e1
data/lib/modular-scale.rb CHANGED
@@ -16,7 +16,7 @@ Compass::Frameworks.register('modular-scale', :path => extension_path)
16
16
  # a prerelease version
17
17
  # Date is in the form of YYYY-MM-DD
18
18
  module ModularScale
19
- VERSION = "2.0.0.alpha1"
19
+ VERSION = "2.0.0.alpha2"
20
20
  DATE = "2013-12-20"
21
21
  end
22
22
 
@@ -5,7 +5,6 @@ $ms-ratio: $golden !default;
5
5
 
6
6
  @import "modular-scale/tests";
7
7
 
8
- @import "modular-scale/cache";
9
8
  @import "modular-scale/pow";
10
9
  @import "modular-scale/calc";
11
10
  @import "modular-scale/generate-list";
@@ -7,38 +7,12 @@
7
7
  @return ms-calc($Value, $Bases, $Ratios);
8
8
  }
9
9
 
10
- // Use cached values if they exist
11
- @if $MS-maps-exist {
12
- // Find the map
13
- // it's labeld with the base and ratio values
14
- @if map-get($MS-cache, "#{$Bases} #{$Ratios}") {
15
- // Positive list
16
- $MS-pos: map-get(map-get($MS-cache, "#{$Bases} #{$Ratios}"), pos);
17
- // See if the map matches the range
18
- @if $Value >= 0 and length($MS-pos) > $Value {
19
- @return nth($MS-pos, $Value + 1);
20
- }
21
- // And again for negitive values
22
- $MS-neg: map-get(map-get($MS-cache, "#{$Bases} #{$Ratios}"), neg);
23
- @if $Value < 0 and length($MS-neg) > abs($Value - 1) {
24
- @return nth($MS-neg, $Value - 1);
25
- }
26
- }
27
- // If nothing matched criteria in map
28
- // then just carry on with calculaitons.
29
- }
30
-
31
10
  // Generate a list of all possible values
32
11
  $Return: ms-generate-list($Value, $Bases, $Ratios);
33
12
 
34
13
  // Sort the generated lists
35
14
  $Return: ms-sort-list($Return);
36
15
 
37
- // Cache
38
- @if $MS-maps-exist {
39
- $MS-cache: ms-cache($Value, $Bases, $Ratios, $Return) !global;
40
- }
41
-
42
16
  // Normalize value for counting from 1
43
17
  // Because CSS counts things from 1
44
18
  // So Sass does as well
@@ -10,19 +10,4 @@
10
10
  @return false;
11
11
  }
12
12
 
13
- $MS-pow-exists: ms-pow-exists();
14
-
15
-
16
- // Test if map capability exists
17
- // maps are used to cache calculations
18
-
19
- @function ms-maps-exist() {
20
- @if function-exists(map-get) == true {
21
- @return true;
22
- }
23
- @else {
24
- @return false;
25
- }
26
- }
27
-
28
- $MS-maps-exist: ms-maps-exist();
13
+ $MS-pow-exists: ms-pow-exists();
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modular-scale
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.alpha1
4
+ version: 2.0.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - First Last
@@ -34,7 +34,6 @@ files:
34
34
  - license.md
35
35
  - lib/modular-scale.rb
36
36
  - stylesheets/_modular-scale.scss
37
- - stylesheets/modular-scale/_cache.scss
38
37
  - stylesheets/modular-scale/_calc.scss
39
38
  - stylesheets/modular-scale/_function-list.scss
40
39
  - stylesheets/modular-scale/_function.scss
@@ -1,25 +0,0 @@
1
- // An empty cache map
2
- $MS-cache: ();
3
-
4
- @function ms-cache($Value, $Bases, $Ratios, $Return) {
5
-
6
- $MS-new-map: ();
7
-
8
- @if $Value >= 0 {
9
- $MS-new-map: (
10
- "#{$Bases} #{$Ratios}": (
11
- pos: $Return,
12
- ),
13
- );
14
- }
15
-
16
- @if $Value < 0 {
17
- $MS-new-map: (
18
- "#{$Bases} #{$Ratios}": (
19
- neg: $Return,
20
- ),
21
- );
22
- }
23
-
24
- @return map-merge($MS-cache, $MS-new-map);
25
- }