Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JLdiesel opened this issue Aug 30, 2023 · 5 comments
Open
Labels

Comments

@JLdiesel
Copy link

It works in css,not less
image
image

@JLdiesel JLdiesel added the bug label Aug 30, 2023
@matthew-dean
Copy link
Member

matthew-dean commented Sep 1, 2023

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
Copy link

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
Copy link

G1King commented Mar 18, 2024

+1
I have same a issue

@puckowski
Copy link
Contributor

I will take a look at improving Less.js custom property support this weekend.

puckowski added a commit to puckowski/less.js that referenced this issue Dec 6, 2024
* Fixes issue less#4224 by improving CSS custom property handling.
puckowski added a commit to puckowski/less.js that referenced this issue Dec 7, 2024
* Fixes CSS custom property handling to address issue less#4224 and issue
  less#3777.
* Added new CSS custom property tests.
@puckowski
Copy link
Contributor

I believe PR #4297 should resolve this issue.

In the short term, you can use fork https://github.com/puckowski/less.js/releases/tag/4.2.1.4

Fork is Less.js 4.2.1 with fixes for:
#4252
#3737
#4258
#4264
#4268
#4267
#3777
#4224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants