Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>temporary workaround</h2> <p>After learning a TON about how chrome renders elements (especially fixed elements) I came across this temporary solution:</p> <pre><code>-webkit-transform: translateZ(0); </code></pre> <p>I added this to my nav bar's style. This is basically a quirky little hack that does nothing to the page and turns on GPU acceleration. This will have to do for now either until chrome is updated or until I rewrite the entire menu bar functionality. The only downside is that resizing the window suffers a performance hit.</p> <h2>a more elegant solution</h2> <p>After all this research and troubleshooting I figured out that the only real problem is that chrome needs to redraw the element all the way rather than stop at an arbitrary point and leave artifacts. Since the pure CSS solution creates some performance issues I <a href="https://coderwall.com/p/ahazha" rel="noreferrer">I found</a> an excellent method of forcing the browser to redraw an element via jQuery!</p> <pre><code>$.fn.redraw = function(){ $(this).each(function(){ var redraw = this.offsetHeight; }); }; </code></pre> <p>I'm using this on the deployed page and it seems to be working great with no performance hits. I'll keep it around as long as chrome 27 is still floating around.</p> <h2>I also found weird behavior and possibly the root of the problem:</h2> <p>The issue does not occur when I have <strong>Compositing for fixed position elements</strong> enabled in the chrome about:flags section (chrome://flags/). I am running Chrome Version 27.0.1453.93.</p> <p><img src="https://i.stack.imgur.com/k04V6.png" alt="about:flags setup"></p> <p>My issue is somehow connected with how chrome handles <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Understanding_z_index/The_stacking_context?redirectlocale=en-US&amp;redirectslug=CSS/Understanding_z-index/The_stacking_context" rel="noreferrer">the stacking context</a> of fixed elements and animating fixed elements as the browser scrolls. <a href="http://updates.html5rocks.com/2012/09/Stacking-Changes-Coming-to-position-fixed-elements" rel="noreferrer">This article</a> expands a bit on the changes.</p> <p><a href="http://www.chromium.org/developers/design-documents/compositor-thread-architecture" rel="noreferrer">How Chrome handles compositing</a></p> <p><a href="http://dev.chromium.org/developers/design-documents/gpu-accelerated-compositing-in-chrome" rel="noreferrer">GPU acceleration as it related to compositing</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload