less / less.js

Less. The dynamic stylesheet language.
http://lesscss.org
Apache License 2.0
16.99k stars 3.41k forks source link

[Compiler Error]CSS variable can not be used in CSS trigonometry functions #4224

Open JLdiesel opened 10 months ago

JLdiesel commented 10 months ago

It works in css,not less

image image
matthew-dean commented 10 months ago

This looks like another variant of "CSS adding functions that are already in Less" problem. This will probably be solved in the future, but in the meantime, you can utilize string escaping, like:

--basic-deg-tan: ~"tan(var(--basic-deg))";
jiang-zhong-xi commented 5 months ago

This looks like another variant of "CSS adding functions that are already in Less" problem. This will probably be solved in the future, but in the meantime, you can utilize string escaping, like:

--basic-deg-tan: ~"tan(var(--basic-deg))";

how to do if "var(--basic-deg)" needs to pass to third part lib, third part lib can not be modified.

G1King commented 3 months ago

+1
I have same a issue