Skip to content

Commit

Permalink
Fix dark mode flicker with Furo (#437)
Browse files Browse the repository at this point in the history
Closes #436.
  • Loading branch information
Eric-Arellano authored Jun 30, 2023
1 parent 76ae1e8 commit 8ead22e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@
<body>
{% block body %}
<script>
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
{#- QISKIT CHANGE: start. Set default theme to light mode. -#}
document.body.dataset.theme = localStorage.getItem("theme") || "light";
{#- QISKIT CHANGE: end. -#}
</script>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
-#}
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap" rel="stylesheet">
<script src="{{ pathto('_static/js/web-components/top-nav-bar.js', 1) }}"></script>
<script>
{#- Force light mode. -#}
document.addEventListener("DOMContentLoaded", function () {
document.body.setAttribute("data-theme", "light");
});
</script>

{%- if analytics_enabled %}
<script>
Expand Down

0 comments on commit 8ead22e

Please sign in to comment.