Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

127
Views
Dynamically change less variable for dark theme in Angular

I hope it is possible. Need to dynamically change less variable for using dark theme. The code is below:

@theme: dark;

@colors: {
  primary-violet-light: #608cef;
  primary-violet-dark: #031d58;
}

@primary-violet: @colors[primary-violet-@{theme}]; // have to be #031d58

But even it doesn't work. The error is in the last row.

"primary-violet-@{theme}" have to be primary-violet-dark but it doesnt.

Didnt find solution in another topics, so if somebody have a solution for this I would be grateful for help! Next step is to change @theme variable from app. I use Angular 12.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!