Add bypass for saturate(5%) filter function. Helps issue #1299

This commit is contained in:
Luke Page
2013-04-30 18:58:35 +01:00
parent 446e164444
commit de27a6fd88
3 changed files with 7 additions and 0 deletions

View File

@@ -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;

View File

@@ -26,6 +26,7 @@
luma-cyan: 79%;
luma-white-alpha: 50%;
contrast-filter: contrast(30%);
saturate-filter: saturate(5%);
contrast-white: #000000;
contrast-black: #ffffff;
contrast-red: #ffffff;

View File

@@ -30,6 +30,7 @@
luma-cyan: luma(#00ffff);
luma-white-alpha: luma(rgba(255,255,255,0.5));
contrast-filter: contrast(30%);
saturate-filter: saturate(5%);
contrast-white: contrast(#fff);
contrast-black: contrast(#000);
contrast-red: contrast(#ff0000);