Compare commits
No commits in common. "5553e89b1b49a76ef8448cf2b6761d5ae64a0cb6" and "964b3b1cddad2e4f9900029f92b03a215ce3c969" have entirely different histories.
5553e89b1b
...
964b3b1cdd
3 changed files with 4 additions and 19 deletions
|
|
@ -59,8 +59,7 @@
|
||||||
--success: #2f9e5c;
|
--success: #2f9e5c;
|
||||||
--warn: #d9901b;
|
--warn: #d9901b;
|
||||||
--shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.08);
|
--shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.08);
|
||||||
--page-line: rgba(0, 0, 0, 0.18);
|
--page-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
|
||||||
--grid-line: rgba(0, 0, 0, 0.05);
|
|
||||||
--ghost: rgba(0, 0, 0, 0.045);
|
--ghost: rgba(0, 0, 0, 0.045);
|
||||||
--ghost-border: rgba(0, 0, 0, 0.12);
|
--ghost-border: rgba(0, 0, 0, 0.12);
|
||||||
--radius: 6px;
|
--radius: 6px;
|
||||||
|
|
@ -86,8 +85,7 @@
|
||||||
--success: #44cf6e;
|
--success: #44cf6e;
|
||||||
--warn: #e9973f;
|
--warn: #e9973f;
|
||||||
--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.35);
|
--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.35);
|
||||||
--page-line: rgba(255, 255, 255, 0.16);
|
--page-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.5);
|
||||||
--grid-line: rgba(255, 255, 255, 0.04);
|
|
||||||
--ghost: rgba(255, 255, 255, 0.04);
|
--ghost: rgba(255, 255, 255, 0.04);
|
||||||
--ghost-border: rgba(255, 255, 255, 0.14);
|
--ghost-border: rgba(255, 255, 255, 0.14);
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,6 @@
|
||||||
let stage: HTMLDivElement;
|
let stage: HTMLDivElement;
|
||||||
const cssVars = pageCssVars();
|
const cssVars = pageCssVars();
|
||||||
|
|
||||||
// Background grid: world-anchored, stepping up ×4 when zoomed out so lines never get denser than ~12px.
|
|
||||||
const gridStep = $derived.by(() => {
|
|
||||||
let step = 24 * viewport.scale;
|
|
||||||
while (step < 12) step *= 4;
|
|
||||||
return step;
|
|
||||||
});
|
|
||||||
|
|
||||||
// ---- autosave --------------------------------------------------------
|
// ---- autosave --------------------------------------------------------
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (doc.version > 0) untrack(() => workspace.scheduleSave());
|
if (doc.version > 0) untrack(() => workspace.scheduleSave());
|
||||||
|
|
@ -529,7 +522,6 @@
|
||||||
class:panning
|
class:panning
|
||||||
class:erasing={tools.tool === 'eraser'}
|
class:erasing={tools.tool === 'eraser'}
|
||||||
bind:this={stage}
|
bind:this={stage}
|
||||||
style="--grid: {gridStep}px; background-position: {viewport.x}px {viewport.y}px"
|
|
||||||
onpointerdown={onPointerDown}
|
onpointerdown={onPointerDown}
|
||||||
onpointermove={onPointerMove}
|
onpointermove={onPointerMove}
|
||||||
onpointerup={onPointerUp}
|
onpointerup={onPointerUp}
|
||||||
|
|
@ -668,11 +660,7 @@
|
||||||
touch-action: none;
|
touch-action: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
background-color: var(--bg-canvas);
|
background: var(--bg-canvas);
|
||||||
background-image:
|
|
||||||
linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
|
|
||||||
linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
|
|
||||||
background-size: var(--grid) var(--grid);
|
|
||||||
}
|
}
|
||||||
.stage :global(.cm-content) {
|
.stage :global(.cm-content) {
|
||||||
user-select: text;
|
user-select: text;
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,7 @@
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
/* Crisp 1 screen-px outline, no blur. */
|
box-shadow: var(--page-shadow);
|
||||||
box-shadow: 0 0 0 calc(1px / var(--s)) var(--page-line);
|
|
||||||
}
|
}
|
||||||
.paper.invert {
|
.paper.invert {
|
||||||
filter: invert(0.88) hue-rotate(180deg);
|
filter: invert(0.88) hue-rotate(180deg);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue