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 +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/SassyCast.rb +2 -2
- data/stylesheets/color/helpers/_hex-to-dec.scss +3 -3
- data/stylesheets/number/helpers/_pow.scss +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf29e38d55bc377ec8edb915d5f3ddb314a292f0
|
4
|
+
data.tar.gz: 86efb51a9980fd5ee9d512127f59b9934ab04e5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9da60d152af4563b7bcf3d0d9285febf9a36bf9c76fd16a0b0b231387258df624486d7d9f6abf1c32fa831153ec17376421dc2883ca489946d136677a99e4515
|
7
|
+
data.tar.gz: cd66fe0df4a129a299900acad6864ac4d4acbceae389444cac2cd79a6abc5d4e6b5f13ac978a5c202c790a4ff2d955616d9c10053b4cb0689572f95205984410
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
* `2.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.
|
data/lib/SassyCast.rb
CHANGED
@@ -10,9 +10,9 @@
|
|
10
10
|
$decimal: 0;
|
11
11
|
|
12
12
|
@for $i from 1 through $length {
|
13
|
-
$factor:
|
14
|
-
$index: index($hex, str-slice($string, $i, $i));
|
15
|
-
$decimal: $decimal + $factor *
|
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;
|
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.
|
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:
|
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.
|
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.
|