Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6883965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:26:56+00:00 2026-05-27T05:26:56+00:00

While testing my web app, I’d like to be able to set the value

  • 0

While testing my web app, I’d like to be able to set the value of one of my LESS @variables using a simple dropdown. (To change the color scheme altogether).

I guess after setting the value, LESS has to reload/recompile the .less files with the new value?

Is there any simple way of accomplishing this? (I’m not running node.js)

The basic example would be something like:

styles.less
@base-color = `window.baseColor()`
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:26:57+00:00Added an answer on May 27, 2026 at 5:26 am

    I think you’re doing it in a bit too complicated way 😉

    Here’s what I propose:

    1. Set a class on your body tag:

      <body class='theme_default'></body>
      
    2. In your .less file define your themes:

      body.theme_default { base_color: #fff; }
      body.theme_gray    { base_color: #ccc; }
      etc..
      
    3. Using jQuery (or just plain JS) change the class of the body tag upon dropdown state change.

    That’s how I’d do it (and replace the dropdown with some nice widget 😉
    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While testing a console app, I set the properties of the console window to
I have been using Selenium a lot lately (testing an ExtJs app) and while
I've been using System.Web.Cache for a while for testing purpose. It's quite a nice
While testing my web app for iOS, I noticed that CSS3 animations were hardware-accelerated
I am testing a web app where i delete an item from a list.
In our web-app we are using Launcher to call some command line functions (not
I am co-developing a simple web app in Rails 3.0.9 and I have realized
I am writing a testing framework for my web app. The case is to
I'm having trouble with logout() while testing my project with the Django web server.
I am trying to write a simple JavaScript page timer for a web app.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.