title: Prevent :hover bubbling
body: <p>How could hover be prevented for parent element if we hover over it's children?</p>
  
  <p>Here is the code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const parent = document.getElementById('parent')
  parent.onmouseover = function testAlert(e) {
    /* alert('parent') */
  }
  const childRight = document.getElementById('child-right')
  childRight.onmouseover = function f(e) {
    e.stopPropagation()
    /* alert('child-right') */
  }
  const childLeft = document.getElementById('child-left')
  childLeft.onmouseenter = function f(e) {
    e.stopPropagation()
    /* alert('child-right') */
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#parent {
    background: green;
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto;
  }
  
  #parent:hover {
    background: rgba(0, 0, 0, 0.8);
  }
  
  #child-left {
    background: red;
    width: 50px;
    height: 50px;
    position: absolute;
    top: 0;
    left: -50px;
  }
  
  #child-right {
    background: red;
    width: 50px;
    height: 50px;
    position: absolute;
    top: 50px;
    left: 100px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="parent"&gt;
    &lt;div id="child-left"&gt;&lt;/div&gt;
    &lt;div id="child-right"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://jsfiddle.net/3tjcsyov/48/" rel="noreferrer">https://jsfiddle.net/3tjcsyov/48/</a></p>
  
  <p>You can see that if you hover over red rects the green one is also hovered if CSS behavior considered. Yes, we can use <code>stopPropagation</code> but it only prevents js handlers execution for parent element while CSS behavior remains unchanged.</p>