# 4.2.11 Admin dark theme flash/flicker

**URL:** <https://forum.djangoproject.com/t/4-2-11-admin-dark-theme-flash-flicker/29880>\
**Category:** The Admin\
**Created:** [April 5, 2024, 4:50pm UTC](https://forum.djangoproject.com/t/4-2-11-admin-dark-theme-flash-flicker/29880 "2024-04-05T16:50:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![briang1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/briang1/32/20416_2.png) [@briang1](https://forum.djangoproject.com/u/briang1)\
**Post date:** [April 5, 2024, 4:50pm UTC](https://forum.djangoproject.com/t/4-2-11-admin-dark-theme-flash-flicker/29880/1 "2024-04-05T16:50:34Z")

</div>

With MacOS set to dark mode, but the Django theme preference set to light, there is a flash of the dark theme on every page load in the admin.

I found discussion of this issue here:

> <https://github.com/django/django/pull/17625>
>
> \[ticket 34670\](https://code.djangoproject.com/ticket/34670)
> 
> Currently, the th…eme is switched after the load event and, by that point, the light theme as already being loaded (and rendered).
> 
> By removing \[\`defer\`\](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#defer) from the script tag and moving the \`initTheme()\` call outside the load event, the theme is applied as soon as the script is loaded.
> 
> The theme script will still wait that the DOM is loaded before adding the listener to the toggle button.

A closed ticket here:  
[https://code.djangoproject.com/ticket/34670](https://code.djangoproject.com/ticket/34670)

Per the discussion there it appears the fix is only being applied to 5.1.

Shouldn’t this fix be applied to 4.2 LTS?
