SassyCast 2.0.0 → 2.0.1

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: 0c1556381a6b01b0f805f92e2d09cc42a1ae1fe7
4
- data.tar.gz: 415763f8aaf4c3f34c41ea65508a4461be8630f5
3
+ metadata.gz: cf29e38d55bc377ec8edb915d5f3ddb314a292f0
4
+ data.tar.gz: 86efb51a9980fd5ee9d512127f59b9934ab04e5f
5
5
  SHA512:
6
- metadata.gz: 56999187e7973b5c2b447db8ecf5819d8c1c155db67a03e78c8664a67bb9344b93efbc8d62836d081e13d0c354842310558d771cac291bb0d37d13766c25fdde
7
- data.tar.gz: 56117204566f9c156200f644d72a54b5dd0fb52ff4231c564175b3e28021ed3c701175d02b1a7880edb6450185ab553d434d39ecb6d23aa0567961eccdd28906
6
+ metadata.gz: 9da60d152af4563b7bcf3d0d9285febf9a36bf9c76fd16a0b0b231387258df624486d7d9f6abf1c32fa831153ec17376421dc2883ca489946d136677a99e4515
7
+ data.tar.gz: cd66fe0df4a129a299900acad6864ac4d4acbceae389444cac2cd79a6abc5d4e6b5f13ac978a5c202c790a4ff2d955616d9c10053b4cb0689572f95205984410
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
 
3
- * `2.0.0`:
3
+ * `2.0.1`:
4
+ * Fix incorrect calculation of power 0
5
+ * Fix incorrect hexadecimal to base 10 conversion
6
+
7
+ * `2.0.0`:
4
8
  * No more distinction between public and private APIs. The public API (`to-*` functions) remains unchanged, but the private one (`_sc-to-*` functions) has been removed.
5
9
  * A strict mode toggle has been added (`$sc-strict-mode`): SassyCast will throw when not able to convert to color / number, or return a default value with a warning in non-strict mode.
6
10
  * Default value for color casting in non-strict mode is now `transparent`, not `null`, to make conversion always return the expected type.
@@ -15,6 +15,6 @@ end
15
15
  # Version is a number. If a version contains alphas, it will be created as a prerelease version
16
16
  # Date is in the form of YYYY-MM-DD
17
17
  module SassyCast
18
- VERSION = "2.0.0"
19
- DATE = "2016-06-03"
18
+ VERSION = "2.0.1"
19
+ DATE = "2017-07-06"
20
20
  end
@@ -10,9 +10,9 @@
10
10
  $decimal: 0;
11
11
 
12
12
  @for $i from 1 through $length {
13
- $factor: 1 + (length($hex) * ($length - $i));
14
- $index: index($hex, str-slice($string, $i, $i));
15
- $decimal: $decimal + $factor * ($index - 1);
13
+ $factor: _sc-pow(length($hex), ($length - $i));
14
+ $index: index($hex, str-slice($string, $i, $i)) - 1;
15
+ $decimal: $decimal + ($factor * $index);
16
16
  }
17
17
 
18
18
  @return $decimal;
@@ -6,7 +6,7 @@
6
6
  @function _sc-pow($x, $n) {
7
7
  $ret: 1;
8
8
 
9
- @if $n >= 0 {
9
+ @if $n > 0 {
10
10
  @for $i from 1 through $n {
11
11
  $ret: ($ret * $x);
12
12
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SassyCast
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hugo Giraudel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-03 00:00:00.000000000 Z
11
+ date: 2017-07-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Sass API for type conversion.
14
14
  email:
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  version: 1.3.6
57
57
  requirements: []
58
58
  rubyforge_project: SassyCast
59
- rubygems_version: 2.4.6
59
+ rubygems_version: 2.6.7
60
60
  signing_key:
61
61
  specification_version: 4
62
62
  summary: SassyCast is a Sass-powered API for type conversion.