Skip to content

Commit

Permalink
Remove white space mobile view for product page (Shopify#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
sofiamatulis authored Sep 24, 2021
1 parent 4221471 commit f13aaec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assets/component-product-model.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.button.product__xr-button {
.product__xr-button {
background: rgba(var(--color-foreground), 0.08);
color: rgb(var(--color-foreground));
margin: 1rem auto;
box-shadow: none;
display: flex;
}

.button.product__xr-button:hover {
Expand All @@ -14,7 +15,7 @@
}

@media screen and (max-width: 749px) {
slider-component .product__xr-button:not([data-shopify-xr-hidden]) {
slider-component .product__xr-button {
display: none;
}

Expand Down
3 changes: 3 additions & 0 deletions assets/product-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,8 @@ window.ProductModel = {
};

window.addEventListener('DOMContentLoaded', () => {
if (Shopify.designMode) {
document.querySelectorAll("[data-shopify-xr-hidden]").forEach(element => element.classList.add('hidden'));
}
if (window.ProductModel) window.ProductModel.loadShopifyXR();
});

0 comments on commit f13aaec

Please sign in to comment.