From 104fc91a81695c920140fd836011d27f2ac5809f Mon Sep 17 00:00:00 2001 From: Miles Date: Sun, 24 Apr 2011 12:43:17 -0700 Subject: [PATCH] Support for IE's ARGB syntax (#aarrggbb) --- lib/less/tree/color.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/less/tree/color.js b/lib/less/tree/color.js index d4c6f3eb..38d34f85 100644 --- a/lib/less/tree/color.js +++ b/lib/less/tree/color.js @@ -15,6 +15,11 @@ tree.Color = function (rgb, a) { this.rgb = rgb.match(/.{2}/g).map(function (c) { return parseInt(c, 16); }); + } else if (rgb.length == 8) { + this.alpha = parseInt(rgb.substring(0,2), 16) / 255.0; + this.rgb = rgb.substr(2).match(/.{2}/g).map(function (c) { + return parseInt(c, 16); + }); } else { this.rgb = rgb.split('').map(function (c) { return parseInt(c + c, 16);