Вопрос

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?

Это было полезно?

Решение 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%")";

Другие советы

You do it kind of like this:

-webkit-filter: ~"saturate(" 50% ~")";  

Cheers!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top