I discovered the solution, I needed to escape both the outer property value as well as the inner expression inside the parentheses.
-webkit-filter: ~"saturate(~"50%")";
Question
I'm using LESS for a project and I'm trying to use the saturate()
method of the CSS filter
property (which takes a decimal or percent as an argument), however I can't get it working because LESS is trying to compile it using its own saturate()
method, which takes a color as the argument.
Is there a way I can instruct the LESS compiler to treat the saturate()
method as the vanilla CSS version, instead of the LESS version?
La solution 2
I discovered the solution, I needed to escape both the outer property value as well as the inner expression inside the parentheses.
-webkit-filter: ~"saturate(~"50%")";
Autres conseils
You do it kind of like this:
-webkit-filter: ~"saturate(" 50% ~")";
Cheers!