mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 06:42:35 +00:00
Use light theme when javascript is disabled
mdBook is setting theme (by adding a class attribute to body tag) with javascript. Page is not using any theme by default and page is not using any styling unless javascript is enabled. This patch is adding class attribute to body tag and making mdBook to use `light` theme when javascript is disabled. Fixes: #144
This commit is contained in:
parent
ab29e92071
commit
b9e22bb8f2
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="light">
|
||||||
<!-- Set the theme before any content is loaded, prevents flash -->
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var theme = localStorage.getItem('theme');
|
var theme = localStorage.getItem('theme');
|
||||||
|
|
Loading…
Reference in a new issue