Skip to content

Commit 93a8023

Browse files
committed
fix(PictureThumbnail): Scope image CSS to direct children
The [loading] opacity rule used a descendant selector which also matched the cloned img that CropperJS moves into its own canvas inside the thumbnail. If the clone's load event fired before the original's, the cropper UI was built while the loading attribute was still set, leaving the image inside the cropper invisible until the original fired its own load event. Scoping the rule to direct children keeps the hide/reveal behavior for our own placeholder while leaving nested imgs untouched.
1 parent ffc575c commit 93a8023

2 files changed

Lines changed: 3 additions & 3 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/stylesheets/alchemy/admin/images.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
alchemy-picture-thumbnail {
22
&[loading] {
3-
img {
3+
> img {
44
opacity: 0;
55
}
66
}
77

8-
img {
8+
> img {
99
opacity: 1;
1010
transition: opacity var(--transition-duration);
1111
}

0 commit comments

Comments
 (0)