@@ -14,10 +14,6 @@ function toString(value) {
14
14
return String ( value ) ;
15
15
}
16
16
17
- function filterDistinct ( value , index , self ) {
18
- return self . indexOf ( value ) === index ;
19
- }
20
-
21
17
// Pass in a value string to parse/resolve and a map of available values
22
18
// and we can figure out the final value
23
19
//
@@ -32,7 +28,7 @@ var resolveValue = function(decl, map, /*optional*/ignorePseudoScope, /*internal
32
28
var matchingVarDecl = undefined ;
33
29
var resultantValue = toString ( decl . value ) ;
34
30
var warnings = [ ] ;
35
-
31
+
36
32
// Match all variables first so we can later on if there are circular dependencies
37
33
var variablesUsedInValueMap = { }
38
34
// Create a temporary variable, storing resultantValue variable value
@@ -61,7 +57,7 @@ var resolveValue = function(decl, map, /*optional*/ignorePseudoScope, /*internal
61
57
62
58
// Resolve any var(...) substitutons
63
59
var isResultantValueUndefined = false ;
64
-
60
+
65
61
// var() = var( <custom-property-name> [, <any-value> ]? )
66
62
// matches `name[, fallback]`, captures "name" and "fallback"
67
63
// See: http://dev.w3.org/csswg/css-variables/#funcdef-var
@@ -75,7 +71,7 @@ var resolveValue = function(decl, map, /*optional*/ignorePseudoScope, /*internal
75
71
// Get variable name and fallback, filtering empty items
76
72
var variableName = variableFallbackSplitPieces [ 0 ] . trim ( ) ;
77
73
var fallback = variableFallbackSplitPieces . length > 1 ? variableFallbackSplitPieces . slice ( 1 ) . join ( ',' ) . trim ( ) : undefined ;
78
-
74
+
79
75
( map [ variableName ] || [ ] ) . forEach ( function ( varDeclMapItem ) {
80
76
// Make sure the variable declaration came from the right spot
81
77
// And if the current matching variable is already important, a new one to replace it has to be important
0 commit comments