mirror of
https://github.com/less/less.js.git
synced 2026-02-01 10:34:59 -05:00
Add bypass for saturate(5%) filter function. Helps issue #1299
This commit is contained in:
@@ -96,6 +96,11 @@ tree.functions = {
|
||||
return new(tree.Dimension)(Math.round(color.luma() * color.alpha * 100), '%');
|
||||
},
|
||||
saturate: function (color, amount) {
|
||||
// filter: saturate(3.2);
|
||||
// should be kept as is, so check for color
|
||||
if (!color.rgb) {
|
||||
return null;
|
||||
}
|
||||
var hsl = color.toHSL();
|
||||
|
||||
hsl.s += amount.value / 100;
|
||||
|
||||
Reference in New Issue
Block a user