Skip to content

Commit 2682992

Browse files
authored
Split SassNumber into separate subclasses based on units (#1221)
This allows us to use more efficient implementations in the common case where numbers don't have complex units. See #113
1 parent e664ea8 commit 2682992

File tree

7 files changed

+429
-136
lines changed

7 files changed

+429
-136
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.32.7
2+
3+
* Improve the performance of unitless and single-unit numbers.
4+
15
## 1.32.6
26

37
### Node JS API

lib/src/value/external/number.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ abstract class SassNumber extends Value {
6161

6262
/// Creates a number with full [numeratorUnits] and [denominatorUnits].
6363
factory SassNumber.withUnits(num value,
64-
{Iterable<String> numeratorUnits,
65-
Iterable<String> denominatorUnits}) = internal.SassNumber.withUnits;
64+
{List<String> numeratorUnits,
65+
List<String> denominatorUnits}) = internal.SassNumber.withUnits;
6666

6767
/// Returns [value] as an [int], if it's an integer value according to
6868
/// [isInt].

0 commit comments

Comments
 (0)