Jump to content

How to style Product Blocks

Recommended Posts

Posted

On our home page we have a summary of three products from the shop, with the header 'New In. The Sunrise Collection'. https://www.ottonehardware.com

We would like to change the colour of the 'SOLD OUT' text from white to match the rest of the site. Also, we would like to adjust the font size of the product title and price below the image.

I appreciate any help!

Thanks

Posted (edited)
12 hours ago, elmeto said:

On our home page we have a summary of three products from the shop. We would like to change the colour of the 'SOLD OUT' text from white to match the rest of the site.

@elmeto You can style the product marks (including 'sold out') on Product Blocks with the following CSS:

.product-block .image-container .product-mark {
  color: var(--headingSmallColor);
}

For future reference, you may find it easier to use a Summary Block to show new products instead of individual Product Blocks as it would be less labour intensive to update. You could simply tag the newer products and then the Summary Block would automatically show those products tagged as 'new' 🙂.

12 hours ago, elmeto said:

we would like to adjust the font size of the product title and price below the image

You can style the Product Title as follows, adjusting the font-size from the default shown:

.product-block .productDetails .product-title {
  font-size: 1.3em;
}

You can style the Product Price with this:

.product-block .productDetails .product-price {
  font-size: 1.1em;
}

Did this help? Please give feedback by clicking an icon below  ⬇️

Edited by paul2009

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

  • 2 weeks later...
Posted

Thanks very much for this!

I've created a test page: www.ottonehardware.com/test1 

I've added a Summary Block (as well as the individual products for comparison) and you're right, it's a neater way of doing it. However, both types still have the issue of 'SOLD OUT' being in white rather than the text colour.

Many thanks

Posted
18 hours ago, elmeto said:

I've added a Summary Block (as well as the individual products for comparison) and you're right, it's a neater way of doing it. However, both types still have the issue of 'SOLD OUT' being in white rather than the text colour.

No problem.

CSS is very specific, which means that the examples provided above (for Product Blocks) won't apply to Summary Blocks. If you'd like to change the colour of the "Sold Out" Product Marks on Summary Blocks, you can use the following:

/* Product mark styling on Summary Blocks */
.sqs-block-summary-v2 .summary-product-status .product-mark {
  color: var(--headingSmallColor);
}

Does this help?

Did this help? Please give feedback by clicking an icon below  ⬇️

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.