Skip to content

Commit 6ecd8c9

Browse files
committed
fix media query
1 parent dfa505a commit 6ecd8c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const toggle = document.querySelector("#observablehq-sidebar-toggle");
22
if (toggle) {
33
let indeterminate = toggle.indeterminate;
44
toggle.onclick = () => {
5-
const matches = matchMedia("(min-width: calc(640px + 4rem + 0.5rem + 240px + 2rem))").matches;
5+
const matches = matchMedia("(min-width: calc(640px + 17px * 4 + 240px + 17px * 2))").matches;
66
if (indeterminate) (toggle.checked = !matches), (indeterminate = false);
77
else if (toggle.checked === matches) indeterminate = true;
88
toggle.indeterminate = indeterminate;

0 commit comments

Comments
 (0)