Skip to content

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

Closed

Description

@JLdiesel

It works in css,not less
image
image

Activity

  1. matthew-dean commented on Sep 1, 2023

    @matthew-dean
    Member

    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))";
  2. jiang-zhong-xi commented on Jan 23, 2024

    @jiang-zhong-xi

    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.

  3. G1King commented on Mar 18, 2024

    @G1King

    +1
    I have same a issue

  4. puckowski commented on Dec 5, 2024

    @puckowski
    Contributor

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

  5. puckowski commented on Dec 7, 2024

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions