Skip to content

Commit 3e44d1c

Browse files
authored
Apply default_mode to the html data-theme attribute (#1663)
1 parent 6919a8a commit 3e44d1c

File tree

1 file changed

+1
-1
lines changed
  • src/pydata_sphinx_theme/theme/pydata_sphinx_theme

1 file changed

+1
-1
lines changed

src/pydata_sphinx_theme/theme/pydata_sphinx_theme/layout.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{# https://github.com/pydata/pydata-sphinx-theme/pull/1045 #}
1515
<script data-cfasync="false">
1616
document.documentElement.dataset.mode = localStorage.getItem("mode") || "{{ default_mode }}";
17-
document.documentElement.dataset.theme = localStorage.getItem("theme") || "light";
17+
document.documentElement.dataset.theme = localStorage.getItem("theme") || "{{ default_mode }}";
1818
</script>
1919
{{ _webpack.head_pre_assets() }}
2020
{{ _webpack.head_pre_icons() }}

0 commit comments

Comments
 (0)