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

Minor product media style selector fix #2050

Merged
merged 1 commit into from
Oct 25, 2022
Merged
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
4 changes: 2 additions & 2 deletions assets/section-main-product.css
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,8 @@ a.product__text {
}

@media screen and (max-width: 749px) {
.product--thumbnail .is-active > .product__modal-opener:not(.product__modal-opener--image),
.product--thumbnail_slider .is-active > .product__modal-opener:not(.product__modal-opener--image) {
.product--thumbnail .is-active .product__modal-opener:not(.product__modal-opener--image),
.product--thumbnail_slider .is-active .product__modal-opener:not(.product__modal-opener--image) {
display: none;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

The modal opener is still a descendant of is-active

https://screenshot.click/24-22-7aepp-g3r0n.png

The issue here seems to be of specificity:

https://screenshot.click/24-16-zdgsv-wac5e.png

By adding the .product-media-container class, it also works:

https://screenshot.click/24-20-b1m2o-oyqyn.png

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding .product-media-container as in your last screenshot is indeed an option but works because it recreates a valid direct descendant. The structure is li.is-active > .product-media-container > .product__modal-opener now which makes modal-opener a direct descendant (direct being a key word) of product-media-container, not the li.is-active. I'm not sure why your second screenshot shows the greyed out selector. Likely it was visible but was edited in the inspector.

Expand Down