title: Dynamic CSS properties in LESS?
body: <p>I am writing a less stylesheet for a bi-directional website, and I need to write a single less file and produce two different stylesheets one for left-to-right layouts (ltr) and the other for right-to-lef layouts (rtl)</p>
  
  <p>so when i am styling for rtl layouts, i want to convert every left value to be right, wither it is a float, padding or margin,</p>
  
  <p>to do so, I have defined the required variables at the top of my less file as follows:</p>
  
  <pre><code>@left: right;
  @right: left;
  </code></pre>
  
  <p>simply, i can float elements dynamically like this</p>
  
  <pre><code>float: @left; // this will be floated to left in ltr layout while it will be right in rtl layout.
  </code></pre>
  
  <p>but my problem is that I want be able also to use these variables to produce dynamic properties, for example when positioning elements absolutely, or relatively, i want to be able to write the <code>left</code> or <code>right</code> property dynamically depending on the value of the <code>@left</code> variable as follows</p>
  
  <pre><code>position: relative;
  @left: 10px;
  </code></pre>
  
  <p>but this gives an error on compiling, any clue how to do that, Note that I have done this using SASS, but till now I couldn't get it to work with LESS ?</p>