aboutsummaryrefslogtreecommitdiff
path: root/styles
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2021-06-30 14:20:29 +0200
committerlonkaars <loek@pipeframe.xyz>2021-06-30 14:20:29 +0200
commitaf555649162270e7795f3b84874794267d2480a1 (patch)
tree297a15ad6000fae7c4e2cb7ba9890573fdd78436 /styles
parent3d8003c89015017f34cabba8b43619b97b45a0df (diff)
regular keyframe snapping
Diffstat (limited to 'styles')
-rw-r--r--styles/keyframes.css5
1 files changed, 4 insertions, 1 deletions
diff --git a/styles/keyframes.css b/styles/keyframes.css
index 935642f..3672421 100644
--- a/styles/keyframes.css
+++ b/styles/keyframes.css
@@ -57,7 +57,10 @@
.keyframe.ghost .outline { opacity: .7; }
#ghost {
- transform: translate(-16px, -16px);
+ --negative-offset-weight: calc(1 - var(--offset-weight));
+ --offset-x: calc(0.5 * var(--zoom) * var(--negative-offset-weight) * 1px - 12px * var(--negative-offset-weight) + -16px * var(--offset-weight));
+ transform: translateX(var(--offset-x)) translateY(-16px);
+
top: calc(var(--y) * 1px);
left: calc(var(--zoom) * var(--frame) * 1px);