From 261dc553bb67e11ad23dac347d3e87281954ad38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Wed, 14 Feb 2024 16:59:14 +0100 Subject: [PATCH] :bug: Fix collapsed toolbar position --- .../app/main/ui/workspace/top_toolbar.cljs | 2 +- .../app/main/ui/workspace/top_toolbar.scss | 25 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/top_toolbar.cljs b/frontend/src/app/main/ui/workspace/top_toolbar.cljs index 86f3484df..2c20e9c25 100644 --- a/frontend/src/app/main/ui/workspace/top_toolbar.cljs +++ b/frontend/src/app/main/ui/workspace/top_toolbar.cljs @@ -108,7 +108,7 @@ (when-not ^boolean read-only? [:aside {:class (stl/css-case :main-toolbar true :not-rulers-present (not rulers?) - :hidden-toolbar hide-toolbar?)} + :main-toolbar-hidden hide-toolbar?)} [:ul {:class (stl/css :main-toolbar-options)} [:li [:button diff --git a/frontend/src/app/main/ui/workspace/top_toolbar.scss b/frontend/src/app/main/ui/workspace/top_toolbar.scss index 993953c89..aec2d2f6b 100644 --- a/frontend/src/app/main/ui/workspace/top_toolbar.scss +++ b/frontend/src/app/main/ui/workspace/top_toolbar.scss @@ -9,7 +9,6 @@ .main-toolbar { cursor: initial; position: absolute; - top: $s-28; left: calc(50% - $s-160); display: flex; align-items: center; @@ -24,6 +23,20 @@ top 0.3s, height 0.3s, opacity 0.3s; + &:not(.main-toolbar-hidden) { + top: $s-28; + } +} + +.main-toolbar-hidden { + top: $s-24; + height: $s-16; + z-index: $z-index-1; + border-radius: 0 0 $s-8 $s-8; + border-block-start: 0; + .main-toolbar-options { + opacity: $op-0; + } } .main-toolbar-options { @@ -76,16 +89,6 @@ } } -.main-toolbar.hidden-toolbar { - top: $s-20; - height: $s-16; - z-index: $z-index-1; - border-radius: 0 0 $s-8 $s-8; - .main-toolbar-options { - opacity: $op-0; - } -} - .main-toolbar.not-rulers-present { top: $s-8; &.hidden-toolbar {