0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-12 07:41:43 -05:00

🐛 Fix subactions toolbar positioning

This commit is contained in:
Belén Albeza 2024-03-15 12:21:51 +01:00
parent 1e9c6f3ebe
commit 51c2269c84
3 changed files with 12 additions and 3 deletions

View file

@ -11,7 +11,8 @@
pointer-events: initial;
position: absolute;
top: $s-12;
left: calc(50% - 240px);
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
height: $s-56;

View file

@ -41,6 +41,7 @@
(let [edition (mf/deref refs/selected-edition)
selected (mf/deref refs/selected-objects)
drawing (mf/deref refs/workspace-drawing)
rulers? (mf/deref refs/rulers?)
drawing-obj (:object drawing)
shape (or drawing-obj (-> selected first))
@ -69,7 +70,7 @@
[:& view-only-actions]
path-edition?
[:div {:class (stl/css :viewport-actions)}
[:div {:class (stl/css-case :viewport-actions true :viewport-actions-no-rulers (not rulers?))}
[:& path-actions {:shape shape}]]
grid-edition?

View file

@ -9,7 +9,10 @@
.viewport-actions {
pointer-events: none;
position: absolute;
top: $s-44;
--actions-toolbar-position-y: #{$s-28};
--actions-toolbar-offset-y: #{$s-6};
top: calc(var(--actions-toolbar-position-y) + var(--actions-toolbar-offset-y));
left: 50%;
z-index: $z-index-20;
@ -47,3 +50,7 @@
}
}
}
.viewport-actions-no-rulers {
--actions-toolbar-position-y: 0px;
}