title: Why li:focus is not working on display or visibility?
body: <p>I can not get <code>li:focus</code> to show <code>ul</code> that is inside it. </p>
  
  <p>Here is <a href="https://jsfiddle.net/cgxwzdy0/10/" rel="nofollow noreferrer">https://jsfiddle.net/cgxwzdy0/10/</a> with css <code>display</code> property </p>
  
  <p>and the other one with <code>visibility</code> property <a href="https://jsfiddle.net/cgxwzdy0/12/" rel="nofollow noreferrer">https://jsfiddle.net/cgxwzdy0/12/</a>.</p>
  
  <pre><code>&lt;div id="menu"&gt;
    &lt;ul&gt;
      &lt;li&gt;
        &lt;a href="javascript: void(0)"&gt;
        Lalalalal
        &lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;
            &lt;a href="javascript: void(0)"&gt;&lt;span&gt;Link 1&lt;/span&gt;&lt;/a&gt;
            &lt;a href="javascript: void(0)"&gt;&lt;span&gt;Link 2&lt;/span&gt;&lt;/a&gt;
            &lt;a href="javascript: void(0)"&gt;&lt;span&gt;Link 3&lt;/span&gt;&lt;/a&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Css:</p>
  
  <pre><code>#menu ul li &gt; ul {
    display: none;
  }
  #menu ul li li:focus &gt; ul {
    display: block !important;
  }
  </code></pre>
  
  <p>Or with visibility:</p>
  
  <p>Css</p>
  
  <pre><code>#menu ul li &gt; ul {
    visibility: hidden;
  }
  #menu ul li li:focus &gt; ul {
    visibility: visible !important;
  }
  </code></pre>
  
  <p>Please no javascript solutions. And if this not possible with css, please can you explain why?</p>
  
  <p>When i turn on Developer tools and choose :focus menu is shown. Take a look at image.</p>
  
  <p><a href="https://i.stack.imgur.com/dJZFS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dJZFS.png" alt="enter image description here"></a></p>