Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix video controls on the feat product section #1940

Merged
merged 3 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2850,6 +2850,7 @@ details-disclosure > details {
border-radius: var(--media-radius);
box-shadow: var(--media-shadow-horizontal-offset) var(--media-shadow-vertical-offset) var(--media-shadow-blur-radius) rgba(var(--color-shadow), var(--media-shadow-opacity));
z-index: -1;
pointer-events: none;
Comment on lines 2852 to +2853
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this z-index: -1 after we added pointer-events: none;?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah so it can come up below other elements 🤔 👍

Copy link
Contributor

@kmeleta kmeleta Sep 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context Eugene, the negative z-index is a necessary evil we implemented to allow various configurations of cards, media, etc to have shadows that don't overlap the adjacent siblings up and to the left of them, which is the natural outcome in CSS. There are also a number of other related considerations and tricks that we need to maintain to enable this behavior.

}

.global-media-settings--no-shadow {
Expand Down
4 changes: 0 additions & 4 deletions assets/section-featured-product.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
padding-bottom: 0;
}

.featured-product .global-media-settings:after {
z-index: 0;
}

.featured-product .product__modal-opener {
margin-bottom: var(--media-shadow-vertical-offset);
}
Expand Down