Toolbar briefly flashes unstyled with huge theme icons after upgrading to 8.0

Author: kakulukiaCreated Sep 25, 2026Updated Sep 29, 2026
LabelsBugFrontend

I first noticed this after upgrading to 8.0.0. When I load a page in Firefox, the toolbar briefly appears without its styling: the menu text is visible in the page, and huge blue theme icons fill the screen. A fraction of a second later everything looks normal. It's very brief, but hard to miss and quite distracting, even with the toolbar collapsed.

We've narrowed it down to a plain HTML page with its content initially hidden. This test page is representative for an app built with VueJs which is also hidden on start. I can reproduce the flash with the template below, served through Django with the Debug Toolbar enabled and its default Shadow DOM setting. The page content becomes visible on window.load; the toolbar is inserted outside the hidden element. No toolbar assets are blocked or artificially delayed.

xml
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Hidden HTML toolbar reproduction</title>
  <style>
    [hidden] { display: none; }
    body { margin: 0; }
    main { min-height: 100vh; padding: 24px; box-sizing: border-box; background: #edf5ff; }
  </style>
</head>
<body>
  <main id="content" hidden>
    <h1>Hidden HTML toolbar reproduction</h1>
    <p>Content is hidden until the window load event.</p>
  </main>
  <script>
    addEventListener('load', () => document.querySelector('#content').removeAttribute('hidden'));
  </script>
</body>
</html>

In our local comparison, the version with its content visible from the start didn't show the same flash. I also haven't noticed it in Django admin.

Although I first noticed this in 8.0, we checked older releases too. These are the results from loading the same project with each version and sampling the toolbar layout during loading:

Version Configuration Unstyled state detected
6.3.0 Default No
7.0.0 Default Yes
8.0.0 Default Yes
8.0.0 USE_SHADOW_DOM=False No

So it appears to affect 7.0 as well. Disabling Shadow DOM stops the flash on my page, and I'm using that as a workaround for now. The Shadow DOM change in #2266 looks relevant: could the toolbar be painted before its stylesheet is ready? Ideally its content would stay hidden until then.

Environment: Firefox 156.0 on macOS, Django 6.1.1, Python 3.14.7, WhiteNoise 6.12.0.

The flash is too short to screenshot by hand. For the image below, we deliberately blocked the toolbar stylesheet to hold the unstyled state on screen. The image illustrates the appearance; it was captured in a different browser, not during the normal Firefox load. During normal use, the stylesheet loads and the flash disappears by itself.

Image

Source: django-commons/django-debug-toolbar