Skip to content

Commit ca5e3f0

Browse files
committed
fix(elements-window): Use fixed position
`position: absolute` can lead to weird scrolling offsets in some situations. With `display: fixed` we make sure it stays on the same fixed position on the screen, regardless of the scroll position. While fixing that I fugred that the transition animation from preview window and elements window were not the same. (cherry picked from commit b06b75b) # Conflicts: # app/assets/builds/alchemy/admin.css # app/assets/builds/alchemy/dark-theme.css # app/assets/builds/alchemy/light-theme.css # app/assets/builds/alchemy/theme.css
1 parent e8d1f67 commit ca5e3f0

10 files changed

Lines changed: 13 additions & 10 deletions

File tree

app/assets/builds/alchemy/admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/builds/alchemy/dark-theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/builds/alchemy/light-theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/builds/alchemy/theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/builds/alchemy/welcome.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/builds/tinymce/skins/content/alchemy-dark/content.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/builds/tinymce/skins/content/alchemy/content.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/stylesheets/alchemy/_custom-properties.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
/* Elements */
109109
--elements-window-width: 0px;
110110
--elements-window-min-width: 400px;
111+
--elements-window-transition-easing: ease-in-out;
111112

112113
/* Form */
113114
--form-left-column-width: 35%;

app/stylesheets/alchemy/admin/elements.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#alchemy_elements_window {
77
--width: var(--elements-window-width, 100vw);
8-
position: absolute;
8+
position: fixed;
99
right: 0;
1010
top: var(--top-menu-height);
1111
z-index: 20;
@@ -21,7 +21,8 @@
2121
--elements-window-background-color,
2222
var(--dialog-background-color)
2323
);
24-
transition: var(--transition-duration) ease-in-out;
24+
transition: var(--transition-duration)
25+
var(--elements-window-transition-easing);
2526
transform: translate3d(100%, 0, 0);
2627

2728
.elements-window-visible & {
@@ -97,6 +98,7 @@ alchemy-elements-window {
9798
--scrollable-elements-offset: calc(
9899
var(--top-menu-height) + var(--toolbar-height)
99100
);
101+
display: block;
100102
}
101103

102104
#main-content-elements {

app/stylesheets/alchemy/admin/preview_window.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
border-right: var(--border-default);
3030
transition-duration: var(--transition-duration);
31-
transition-timing-function: var(--transition-duration);
31+
transition-timing-function: var(--elements-window-transition-easing);
3232
transition-property: width, max-width;
3333

3434
.elements-window-visible & {

0 commit comments

Comments
 (0)