0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

🐛 Fix main toolbar positioning when rulers are hidden

This commit is contained in:
Belén Albeza 2024-03-15 11:19:37 +01:00
parent a3ca905f37
commit 1e9c6f3ebe
2 changed files with 13 additions and 13 deletions

View file

@ -119,7 +119,7 @@
(when-not ^boolean read-only?
[:aside {:class (stl/css-case :main-toolbar true
:not-rulers-present (not rulers?)
:main-toolbar-no-rulers (not rulers?)
:main-toolbar-hidden hide-toolbar?)}
[:ul {:class (stl/css :main-toolbar-options)}
[:li

View file

@ -9,7 +9,8 @@
.main-toolbar {
cursor: initial;
position: absolute;
left: calc(50% - $s-160);
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
flex-direction: column;
@ -23,13 +24,19 @@
top 0.3s,
height 0.3s,
opacity 0.3s;
&:not(.main-toolbar-hidden) {
top: $s-28;
}
--toolbar-position-y: #{$s-28};
--toolbar-offset-y: 0px;
top: calc(var(--toolbar-position-y) + var(--toolbar-offset-y));
}
.main-toolbar-no-rulers {
--toolbar-position-y: 0px;
--toolbar-offset-y: #{$s-8};
}
.main-toolbar-hidden {
top: $s-24;
--toolbar-offset-y: -#{$s-4};
height: $s-16;
z-index: $z-index-1;
border-radius: 0 0 $s-8 $s-8;
@ -88,13 +95,6 @@
}
}
.main-toolbar.not-rulers-present {
top: $s-8;
&.hidden-toolbar {
top: $s-0;
}
}
ul.main-toolbar-panels {
display: none;
}