Skip to content

Commit

Permalink
update pdp style to default (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
alandana authored Jan 26, 2024
1 parent e7d197f commit 90f6684
Show file tree
Hide file tree
Showing 17 changed files with 16 additions and 160 deletions.
130 changes: 3 additions & 127 deletions blocks/product-details/product-details.css
Original file line number Diff line number Diff line change
@@ -1,134 +1,10 @@
/* stylelint-disable selector-class-pattern */
main .section.product-details-container {
padding: 16px 24px !important;
}

.section > div.product-details-wrapper {
margin-bottom: 24px;
}

.pdp-product__description {
border-bottom: 1px solid #e0e0e0;
padding-bottom: 32px;
}

.product-details {
max-width: 1568px;
margin: 0 auto;
}

.pdp-product__buttons {
grid-template-columns: 1fr auto;
align-items: center;
}

/* Add to Cart Button */
.pdp-product__buttons>*:nth-child(1) {
grid-column: 1;
}

/* Add to Favorite Button */
.pdp-product__buttons>*:nth-child(2) {
grid-column: 2;
min-height: 100%;
display: grid;
min-width: 7.5rem;
}

.pdp-product__buttons .elsie-iconButton {
display: flex;
align-items: center;
justify-content: center;
}

/* Rest of the buttons */
.pdp-product__buttons>*:nth-child(n + 3) {
grid-column: 1 / -1;
}

.elsie-base-design .pdp-product__title {
margin-bottom: 16px;
}

.elsie-base-design .pdp-product__sku {
color: var(--color-neutral-700);
font-size: 12px;
line-height: 1.5;
}

.elsie-base-design .pdp-product__actions {
margin-bottom: var(--spacing-big);
margin-top: var(--spacing-medium);
}

.pdp-product__heading {
text-align: center;
padding-top: 24px !important;
border-top: 1px solid #e0e0e0;
.elsie-incrementer__decrease-button,
.elsie-incrementer__increase-button {
color: inherit;
}

.pdp-product__short_description,
.pdp-product__description {
font-size: 14px !important;
}

.elsie-base-design .pdp-product__prices {
margin-top: 0;
}

.elsie-base-design .elsie-incrementer__button-container button {
color: var(--text-color);
background: none;
justify-content: center;
}

.product-details .elsie-base-design h2 {
font: var(--type-body-1-default-font);
font-weight: 600;
letter-spacing: .2em;
line-height: 1.5;
}

.product-details .elsie-base-design button {
border-radius: 4px;
color: var(--color-neutral-50);
font-size: 12px;
line-height: 1.25;
margin: 0;
padding: var(--spacing-small) var(--spacing-medium);
text-transform: none;
}

.product-details .elsie-base-design .elsie-button-icon {
height: 16px;
}

.product-details .elsie-base-design hr {
border-color: var(--color-neutral-400);
margin: 16px 0;
}

@media (width >= 600px) {
main .section.product-details-container {
padding: 64px 0;
}

.section > div.product-details-wrapper {
margin-bottom: 64px;
}
}

@media only screen and (width >= 1024px) {
.pdp-product__gallery-column {
grid-column: 1 / span 7 !important;
}

.pdp-product__content-column {
grid-column: 8 / span 5 !important;
padding: 0 40px 24px !important
}

.elsie-base-design .pdp-product__title {
margin-bottom: 24px !important;
}
}
10 changes: 1 addition & 9 deletions blocks/product-details/product-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@ export default async function decorate(block) {
});
initializers.register(productApi.initialize);

const heading = document.createElement('h2');
heading.classList.add('pdp-product__heading');
heading.textContent = 'product description';

return productRenderer.render(ProductDetails, {
sku: getSkuFromUrl(),
hideQuantity: false,
slots: {
Actions: (ctx) => {
// Add to Cart Button
ctx.appendButton({
text: 'Add to Cart',
icon: 'cart',
icon: 'Cart',
variant: 'primary',
onClick: async () => {
const { cartApi } = await import('../../scripts/minicart/api.js');
Expand All @@ -49,9 +44,6 @@ export default async function decorate(block) {
variant: 'primary',
onClick: () => console.debug('Add to Wishlist', ctx.data),
});

// Add Product Details Description header
ctx.appendHTMLElement(heading);
},
},
})(block);
Expand Down
2 changes: 1 addition & 1 deletion scripts/dropins/storefront-checkout/223.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/dropins/storefront-checkout/270.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/dropins/storefront-checkout/358.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions scripts/dropins/storefront-checkout/467.js

This file was deleted.

2 changes: 2 additions & 0 deletions scripts/dropins/storefront-checkout/637.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/dropins/storefront-checkout/774.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion scripts/dropins/storefront-checkout/93.js

This file was deleted.

Loading

0 comments on commit 90f6684

Please sign in to comment.