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 7741379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:00:47+00:00 2026-06-01T09:00:47+00:00

Since LESS is a pre-compile stylesheet language, this may not achieve what I’m after,

  • 0

Since LESS is a pre-compile stylesheet language, this may not achieve what I’m after, but the idea is:

#sidebar {
     width: 40%;
 }

@sidebar_width : @('#sidebar:width');

.some_other_elements {
      width: @sidebar_width;
 }

So there are three questions I have:

  1. Is something like the above possible? I just discovered LESS and the documentation is making me carsick.

  2. If the above is possible, will it produce CSS with the .some_other_elements set to 40% or the actual width of the sidebar? Is it possible to get the actual width using LESS?

  3. If you can give me your opinion of the library in general along with the answer or comment, I’d like to hear it. It seems a bit much but maybe it’s the next jquery and I need to adopt it sooner than later (or conversely, maybe it’s the next YUI and I should forget I ever saw it).

  • 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-06-01T09:00:48+00:00Added an answer on June 1, 2026 at 9:00 am

    That won’t work. You can’t cherry pick out values from a selector and turn it into a variable: You would have to do something like:

    @sidebar_width: 40%;
    .some_other_elements {
      width: @sidebar_width;
    } 
    

    the width of the sidebar will be set to 40% of the width of the parent container.

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

Sidebar

Related Questions

since IE won't render XHTML as XHTML, but treat it as HTML instead, when
Since this function is implemented in IE8, I wanted to see exactly what I
Twitter Bootstrap is a cool stylesheet toolkit by Twitter based on LESS. I don't
is it possible? I tried haml and a less one since they are similar,
Since a branch is more or less only a tag, that moves automatically to
Since Strings are immutable in Java, why would I want to use the argument-less
Defined this way, we can do neither ++x++ nor ++x-- . But on the
I want to use <p> instead of <br><br> since it takes less space and
Since NSSstring is not defined in length like integer or double, do I run
Not being a database administrator (even less of a MS database admin :), I

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.