Jump to content

Summary Masonry: how to change media query?

Go to solution Solved by creedon,

Recommended Posts

Hi together,

I can't make it with my CSS attempts and hope to get your help:
On my homepage under "Projects" you can see the masonry of my blog summary:

Bildschirmfoto 2023-11-07 um 22.38.41.jpg

Here the three-column display becomes two-column for screens <1450 px and even one-column for pages <980.

I would like to change two things:

  1. i would like them like on my blog site summary (link): they should stay three-columned until <750px (when the page switches to mobile mode anyway).
  2. i would like to reduce the vertical spacing between the three image/text blocks. These seem too large, especially on mobile. 

Bildschirmfoto 2023-11-07 um 22.48.31.jpg

How could I achieve this?

Thank you in advance!!

Edited by Matt-W-Urst
for better reading
Link to comment
  • Solution
Quote

On my homepage under "Projects" you can see the masonry of my blog summary:

i would like to reduce the vertical spacing between the three image/text blocks. These seem too large, especially on mobile. 

As far as I can tell this element is totally handled by SS backend calculations. It doesn't surprise me as it's a masonry effect. As far as I can tell there is no media queries controlling the wrapping. The code seems to use 994px as a breakpoint.

Add the following to Page Settings > Advanced > Page Header Code Injection for the page. Please see per-page code injection.

<style>

  @media ( max-width : 994px ) {
  
   #block-57077bc162dcc036a685 .summary-item-list {
   
      display : flex;
      flex-direction : column;
      gap : 50px;
      height : unset !important;
      
      }
      
    #block-57077bc162dcc036a685 .sqs-gallery-design-autocolumns-slide {
   
      position : unset;
      
      }
      
    }
    
  </style>

This is for v7.1 and specific to the poster's need.

I don't have an immediate solution for issue #1.

Let us know how it goes.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
Quote

Now I realize that this solution has a disadvantage.
There is a long space under the element,

I don't have a solution. This is a fluid engine section and they don't adapt to the height of elements changing within them. A classic editor section would adapt.

Screen Shot 2023-11-14 at 12.57.39 PM.png

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

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.