Skip to content

Commit

Permalink
Fix preview window resize transition
Browse files Browse the repository at this point in the history
We had a mixture of width and max-width. By using
just width fixes the resize transition of the preview window
when the elements window gets hidden.

(cherry picked from commit 3873a5e)
  • Loading branch information
tvdeyen committed May 10, 2024
1 parent 7b2307c commit e2d140b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/assets/stylesheets/alchemy/preview_window.scss
Expand Up @@ -7,18 +7,22 @@
border: 0 none;
background: #fff;
border-right: $default-border;
transition: $transition-duration ease-in-out;
transition: width $transition-duration ease-in-out;

.collapsed-menu & {
left: $collapsed-main-menu-width;
width: calc(100vw - #{$collapsed-main-menu-width - $default-border-width});
}

.collapsed-menu.elements-window-visible & {
width: calc(100vw - #{$collapsed-main-menu-width - $default-border-width} - #{$elements-window-width});
width: calc(
100vw - #{$collapsed-main-menu-width - $default-border-width} - #{$elements-window-width}
);

@media screen and (min-width: $large-screen-break-point) {
max-width: calc(100vw - #{$collapsed-main-menu-width - $default-border-width} - #{$elements-window-min-width});
width: calc(
100vw - #{$collapsed-main-menu-width - $default-border-width} - #{$elements-window-min-width}
);
}
}
}

0 comments on commit e2d140b

Please sign in to comment.