Taste Theme - Blog Images Ratio to Square

Topic summary

Goal: adjust blog and blog post images in the Taste theme to a 1:1 (square) appearance.

What was done:

  • A helper provided CSS to add in the theme’s CSS file (base.css/style.css/theme.css) to size blog cards and the article hero image.
  • Initial code changed .card__inner and .article-template__hero-medium, producing the desired look on desktop.

Issues found:

  • The first CSS also affected product images.
  • Mobile styling needed refinement.

Fix provided:

  • Revised CSS scoped only to blog elements using the selector .blog-articles__article … .card__inner to avoid impacting product images.
  • Media queries (CSS rules for different screen sizes) added:
    • ≥750px: blog cards set to width ~80% and height ~55vh (viewport height).
    • <750px: blog cards set to width ~70% and centered.
    • ≥990px: article hero image sized to height ~55rem, width ~60%, centered.

Outcome/status:

  • The updated, blog-only CSS resolved the product image issue and addressed mobile/desktop behavior.
  • OP acknowledged the quick fix; no further questions were raised, suggesting the issue is resolved.

Notes:

  • CSS (Cascading Style Sheets) controls styling; media queries tailor styles by screen size.
  • Screenshots were shared to show before/after results.
Summarized with AI on December 31. AI used: gpt-5.

Dear community,

Is there a way to adjust these photos to a 1x1 ratio (square) both on the blog and blog post?

Theme: Taste

Looking forward to hearing from you, and thank you in advance!

1 Like

Hi @Velvety92

Can i take a look, would you mind to share your store URL? Thanks!

Hi!

Of course :slightly_smiling_face: Here it is: https://www.wildricelondon.com/blogs/news So it is both the images in the blog, and in the blog posts as this one: https://www.wildricelondon.com/blogs/news/ed-pramits-massaman-short-rib

Thanks for the info, check this one.

From your Shopify admin dashboard, click on “Online Store” and then “Themes”.

Find the theme that you want to edit and click on “Actions” and then “Edit code”.

In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

.card__inner.color-scheme-1.gradient.ratio {
    width: 80%;
    height: 500px;
    margin: auto;
}

@media screen and (min-width: 990px){
.article-template__hero-medium {
    height: 55rem;
    width: 60%;
    margin: auto;
}
}

And Save.

Result:

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

You are an absolute magician, thank you so much - I very much appreciate it!

Lastly, would you have any recommendations so it works on mobile too?

Lastly, it did destroy the product images too ;(

1 Like

Ops sorry, I forgot that is for blogs only.

@media only screen and (min-width: 750px){
.blog-articles__article.article.scroll-trigger.animate--slide-in .card__inner {
    width: 80%;
    height: 55vh;
    margin: auto;
}
}
@media only screen and (max-width: 749px){
.blog-articles__article.article.scroll-trigger.animate--slide-in .card__inner {
    width: 70%;
    margin: auto;
}
}
@media screen and (min-width: 990px){
.article-template__hero-medium {
    height: 55rem;
    width: 60%;
    margin: auto;
}
}

And Save.

Note: please check it first before marked solution. :blush: Not just here but the next time you post.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

Check this one again.

Of course, first time here. Sorry about that - thank you for your quick fix.