diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html
index 8593fac6113..699c8ee9f36 100644
--- a/doc/_templates/layout.html
+++ b/doc/_templates/layout.html
@@ -28,7 +28,14 @@
{% endblock %}
{% block extrahead %}
- {# Light/Dark stylesheets added here due to https://github.com/readthedocs/sphinx_rtd_theme/issues/1100 #}
-
-
+ {# Use dark mode loader script to prevent "flashing" of the page on load.
+ As we need a