title: Access parent element
body: <p>I have the following html and less</p>
  
  <pre><code>&lt;div class="status"&gt;
      &lt;div&gt;
          &lt;div&gt;
              &lt;p class="status-1"&gt;Test&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  .status {
      div {
          div {
              p {
                  color: red;
  
                  .status-1 {
                      color: blue;
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>Where there is a <code>&lt;p&gt;</code> element nested in a couple of divs. Now I'm looking to add the <code>status-1</code> class to the base div, to create a html structure like this:</p>
  
  <pre><code>&lt;div class="status status-1"&gt;
      &lt;div&gt;
          &lt;div&gt;
              &lt;p&gt;Test&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But now I can't figure out how to access the <code>.status</code> element from inside the <code>p</code> element in less. I could just type</p>
  
  <pre><code>.status {
      &amp;.status-1 {
          div {
              div {
                  p {
                      color: blue;
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>But since there are multiple <code>.status</code> classes (e.g. <code>status-0</code>, <code>status-1</code>, <code>status-2</code>) that would suck to copy paste that same bit of code. Is there any way in less I would be able to access the parent <code>.status</code> element? I was hoping for something like</p>
  
  <pre><code>.status {
      div {
          div {
              p {
                  color: red;
  
                  -&gt;parent(.status.status-1) {
                      color: blue;
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>Thanks guys!</p>