mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
Tests and fix for #1689
This commit is contained in:
@@ -5,7 +5,7 @@ tree.functions = {
|
||||
return this.rgba(r, g, b, 1.0);
|
||||
},
|
||||
rgba: function (r, g, b, a) {
|
||||
var rgb = [r, g, b].map(function (c) { return scaled(c, 256); });
|
||||
var rgb = [r, g, b].map(function (c) { return scaled(c, 255); });
|
||||
a = number(a);
|
||||
return new(tree.Color)(rgb, a);
|
||||
},
|
||||
|
||||
@@ -78,3 +78,7 @@
|
||||
#alpha #hsl {
|
||||
opacity: 1;
|
||||
}
|
||||
#percentage {
|
||||
color: 255;
|
||||
border-color: rgba(255, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
@@ -90,3 +90,8 @@
|
||||
opacity: alpha(hsl(120, 100%, 50%));
|
||||
}
|
||||
}
|
||||
|
||||
#percentage {
|
||||
color: red(rgb(100%, 0, 0));
|
||||
border-color: rgba(100%, 0, 0, 50%);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user