🐛 Fix workspace context menu in small screens

This commit is contained in:
Eva Marco 2024-03-13 17:36:40 +01:00
parent 04a69c2a2c
commit fbe09e6b5a
5 changed files with 8 additions and 91 deletions

View file

@ -652,11 +652,10 @@
[:& dropdown {:show (boolean mdata)
:on-close #(st/emit! dw/hide-context-menu)}
[:ul
{:class (stl/css :workspace-context-menu)
:ref dropdown-ref
:style {:top top :left left}
:on-context-menu prevent-default}
[:ul {:class (stl/css :workspace-context-menu)
:ref dropdown-ref
:style {:top top :left left}
:on-context-menu prevent-default}
(case (:kind mdata)
:shape [:& shape-context-menu {:mdata mdata}]

View file

@ -20,6 +20,8 @@
border: $s-2 solid var(--panel-border-color);
background-color: var(--menu-background-color);
z-index: $z-index-4;
max-height: 100vh;
overflow-y: auto;
}
.separator {

View file

@ -21,7 +21,7 @@
shared-libs (mf/deref refs/workspace-libraries)]
[:& dropdown {:show show-menu?
:on-close close-menu}
[:ul {:class (stl/css :workspace-context-menu)}
[:ul {:class (stl/css :text-context-menu)}
(for [[idx cur-library] (map-indexed vector (vals shared-libs))]
(let [typographies (-> cur-library (get-in [:data :typographies]) vals)]
[:li

View file

@ -6,7 +6,7 @@
@import "refactor/common-refactor.scss";
.workspace-context-menu {
.text-context-menu {
position: absolute;
left: auto;
bottom: var(--height);