2 import { browser } from '$app/environment';
3 import { canvas } from '$lib/stores/canvas';
9 document.documentElement.style.setProperty('--dot-size', kDotSize + 'px');
10 document.documentElement.style.setProperty('--dot-x', kDotSize - $canvas.x % kDotSize + 'px');
11 document.documentElement.style.setProperty('--dot-y', kDotSize - $canvas.y % kDotSize + 'px');
16 <div class="background"></div>
25 background: radial-gradient(#aaa, #aaa 1px, #fff 1px, #fff var(--dot-size));
26 background-size: var(--dot-size) var(--dot-size);
27 background-position: var(--dot-x) var(--dot-y);