title: Media query for devices supporting hover
body: <p>I'd like to provide separate behaviour for browsers supporting hover (e.g. desktop browsers) and ones which don't (e.g. touchscreen devices). Specifically I want to declare a hover state on browsers that support it, but not for browsers that don't, so as to avoid having mobile browsers emulate it with extra taps, as this breaks other interactions on the page - by not defining a hover state for those browsers this is avoided.</p>
  
  <p>I've read up on the <a href="https://drafts.csswg.org/mediaqueries-4/#hover" rel="noreferrer">Interaction Media Queries</a> feature and it looks like it should do the trick. I'd be able to do something like:</p>
  
  <pre><code>@media (hover: none) {
    /* behaviour for touch browsers */
  }
  </code></pre>
  
  <p>According to <a href="http://caniuse.com/#feat=css-media-interaction" rel="noreferrer">CanIUse</a> it is available on all the browsers I need to support except IE11 and Firefox.</p>
  
  <p>So I wondered if I could do it the other way around - since the main touch devices all support it, then negate it:</p>
  
  <pre><code>@media not (hover: none) {
    /* behaviour for desktop browsers */
  }
  </code></pre>
  
  <p>However, this doesn't seem to work at all.</p>
  
  <p>Pseudocode example of what I'm trying to do:</p>
  
  <pre><code>.myelement {
    /* some styling */
    /* note: no hover state here */
  }
  @media(this device supports hover) {
    .myelement:hover {
      /* more styling */
    }
  }
  </code></pre>
  
  <p>So, is there a way to make this work in the way intended, or am I down the wrong track?</p>