title: Less - Dynamic width of element on :hover and another element that depends on it
body: <p>Simple html example:</p>
  
  <pre><code> &lt;div class="parent"&gt;
      &lt;div class="left"&gt;&lt;/div&gt;
      &lt;div class="right"&gt;&lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>It's css:</p>
  
  <pre><code>@left: 10%;
  @right: 100% - @left;
  
  div.parent {
      div {
          float: left;
          height: 20px;
      }
      div.left {
          background-color: red;
          width: @left;
      }
      div.right {
          background-color: blue;
          width: @right;
      }
  }
  </code></pre>
  
  <p>Right now left side is 10% width, and right side accordingly is 90% width.</p>
  
  <p><a href="http://jsfiddle.net/EmAY9/1/" rel="nofollow"><strong>Demo</strong></a></p>
  
  <p><strong>Now the question:</strong> I need the left side on css :hover event to get width: 30%, and right side accordingly: width: 70%.</p>
  
  <p>If I change my css to next one, I success to get left side dynamic.</p>
  
  <pre><code>.setLeftSide(){
      width: @left;
  }
  
  div.parent {
      div {
          float: left;
          height: 20px;
      }
      div.left {
          background-color: red;
          @left: 30%;
          .setLeftSide();
  
          &amp;:hover {
              @left: 50%;
              .setLeftSide();
          }
      }
      div.right {
          background-color: blue;
          /*width: @right;*/
      }
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/m7jsx/3/" rel="nofollow"><strong>Demo</strong></a></p>
  
  <p>But I don't get, how I get the right side to be dependent on the width of the left side...</p>
  
  <p><strong>Note:</strong> This is only the simple example of what I actually have in code (not my code, but the one, I have to support). Originally, right and left elements aren't going one after another, so CSS operators, like + or ~ won't help me. And I need to rely on LESS, as it was implemented, and I can't change the structure of the code.</p>
  
  <p>Thanx for help!</p>