title: Less: how to write :hover and :focus
body: <p>I just started learning Less and would like to have an outcome like this:</p>
  
  <pre><code>.navbar .nav &gt; li &gt; a {
     /* some rules */
  } 
  
  .navbar .nav &gt; li &gt; a:hover {
     /* some rules */
  } 
  
  .navbar .nav &gt; li &gt; a:focus {
     /* some rules */
  }
  </code></pre>
  
  <p>I can't figure out how to write that in Less. I tried</p>
  
  <pre><code>.navbar .nav &gt; li &gt; a {
      /* some rules */
      &amp;:hover {
  
      }
      &amp;:focus {
  
      }
  }
  </code></pre>
  
  <p>but that doesn't work. Please help. Thank you.</p>