diff --git a/index.html b/index.html index ab8d931..b7808cd 100644 --- a/index.html +++ b/index.html @@ -1,277 +1,304 @@ + + + + + + - - - - - - - - const light = "./out/light.css"; - const dark = "./out/dark.css" - - let active; - - function applyStyleSheet(d = false) { - let n = createStyle(d ? dark : light); - if (n === active) - return; - - if (active) - active.remove(); - - document.head.appendChild(n); - active = n; - } - - applyStyleSheet(false); - let isLight = true; - - function switchStyle() { - applyStyleSheet(isLight); - isLight = !isLight; - } - - window.$ = document.querySelector.bind(document); - - let match = window.matchMedia("prefers-color-scheme: dark"); - match.addListener((ev) => { - applyStyleSheet(ev.matches) - }) - - - + .scroll-test { + height: 100px; + overflow-y: scroll; + } + + - - -
- - - - -