title: How to style the #navigator-toolbox and children when typing a URL?
body: <p>I've made myself a simple CSS for FF's <em>Stylish</em> add-on that hides the <code>#navigator-toolbox</code> whenever I'm hovering the main window and shows it whenever I'm not. </p>
  
  <p>This results in a neat, instant auto-hide effect because I can touch the screen's upper edge and the toolbox shows as long as the pointer hovers over it. I've got one small problem, though: <strong>I'd like the toolbox to be shown when I'm typing a URL</strong>, because when quickly aiming for the URL bar, my pointer often jumps back into the main window and I can't see what I'm typing any more.</p>
  
  <p>With the lack of parent selectors in CSS, is this possible to achieve? Do you have any suggestions how to make it work?</p>
  
  <p>This is the CSS, works (maybe) only in FF30 with classic theme and without suggestions:</p>
  
  <pre><code>/* overall box containing tab bar and nav bar */
      #navigator-toolbox {
      position:fixed !important;
      width:100% !important;
      min-height: 42px !important;
      height: 42px !important;
      }
  
  /* box containing tab bar */
      #TabsToolbar {
         position:absolute !important;
         top:0px !important;
         left:0px !important;
         width:100% !important;
         height:20px !important;
      }
  
  /* elements of tab bar */
      #tabbrowser-tabs {
      width:100% !important;
      position:relative !important;
      left:0px !important;
      height:21px !important;
      margin-left:-14px !important;
      }
  
      .tab-stack {
      min-height:1px !important;
      }
  
      .tab-text {
      padding-top:1px !important;
      padding-left:2px !important;
      }
  
      .tab-icon-image {
      width:13px !important;
      height:13px !important;
      }
  
      .tab-background {
      display:none !important;
      }
  
      #tabbrowser-tabs .tabbrowser-arrowscrollbox .scrollbutton-up,
      #tabbrowser-tabs .tabbrowser-arrowscrollbox .scrollbutton-down {
      display:none !important;
      }
  
  /* box containing nav bar */
      #nav-bar {
      position:static !important;
      top:20px !important;
      width:100% !important;
      padding:0px !important;
      height:24px !important;
      border-width: 1px 0px !important;
      border-style:solid !important;
      border-color:#bbb !important;
       }
  
  /* contents of nav bar */
      #urlbar-container, #urlbar {
      padding:0px !important;
      margin-left:-6px !important;
      }
  
      #urlbar {
      border-color:#bbb !important;
      height:20px !important;
      }
  
     #back-button, #forward-button, #ctr_back-forward-button, #alltabs-button, #nav-bar-overflow-button {
        display:none !important;
      }
  
      #urlbar-go-button, #urlbar-reload-button, #urlbar-stop-button {
      display:none !important;
      }
  
  /* hide all elements in normal state */
  /* display each element if pointer is outside window or hovering navigator toolbox */
      #navigator-toolbox {
         opacity: 0.0 !important;
         pointer-events:none !important;
      }
  
      #TabsToolbar {
         opacity: 0.0 !important;
      }
  
      tab * {
      pointer-events:none !important;
      }
  
      #nav-bar {
         opacity: 0.0 !important;
      }
  
      #urlbar {
         pointer-events:none !important;
      }
  
      #main-window:not(:hover) #navigator-toolbox, #navigator-toolbox:hover {
      opacity: 1.0 !important;
      pointer-events:all !important;
      }
  
      #main-window:not(:hover) #TabsToolbar, #navigator-toolbox:hover #TabsToolbar {
      opacity:1.0 !important;
      }
  
      #main-window:not(:hover) tab *, #navigator-toolbox:hover tab * {
      pointer-events:all !important;
      }
  
      #main-window:not(:hover) #nav-bar, #navigator-toolbox:hover #nav-bar {
      opacity:1.0 !important;
      }
  
      #main-window:not(:hover) #urlbar, #navigator-toolbox:hover #urlbar {
      pointer-events:all !important;
      }
  </code></pre>
  
  <p>I'm sorry it's that ugly, but I don't really <em>understand</em> CSS; I look up characteristics when I need them and this is the result of a lot of experiments. If you have a hint how to completely revamp it, I'd be glad to hear it as well.</p>
  
  <p>How do I keep the toolbox visible when the URL input has focus?</p>
  
  <p>PS: The sheet also makes the bar very slim, removes decorations etc, but I think it's quite obvious what does what.</p>