Skip to content

Commit

Permalink
Hash -> HexColor
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Feb 7, 2017
1 parent 773c377 commit 0af7c31
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/compressor/compress/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ function compressFunction(node, item, list) {
}

item.data = {
type: 'Hash',
type: 'HexColor',
loc: node.loc,
value: toHex(args[0]) + toHex(args[1]) + toHex(args[2])
};
Expand All @@ -444,7 +444,7 @@ function compressIdent(node, item) {
if (hex.length + 1 <= color.length) {
// replace for shorter hex value
item.data = {
type: 'Hash',
type: 'HexColor',
loc: node.loc,
value: hex
};
Expand Down
2 changes: 1 addition & 1 deletion lib/compressor/compress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var handlers = {
Number: require('./Number'),
String: require('./String'),
Url: require('./Url'),
Hash: require('./color').compressHex,
HexColor: require('./color').compressHex,
Identifier: require('./color').compressIdent,
Function: require('./color').compressFunction
};
Expand Down
2 changes: 1 addition & 1 deletion lib/compressor/restructure/4-restructShorthand.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TRBL.prototype.getValueSequence = function(declaration, count) {
}
break;

case 'Hash': // color
case 'HexColor': // color
case 'Number':
case 'Percentage':
break;
Expand Down

0 comments on commit 0af7c31

Please sign in to comment.