Jump to content

Why does the spacer have a minimum size?

Go to solution Solved by brandon,

Recommended Posts

  • Solution

Update 10/24/2019:

Add this via the CSS Editor, save and refresh:

/* Add this first bit to get more flexibility in height. */
.sqs-layout.sqs-editing .sqs-block, .sqs-block-spacer-content {
    min-height: 0px !important;
}
.sqs-block-spacer .sqs-block-content {
  height: 0;
}

/* Add this second bit too if you want to be able to go to zero. */
.sqs-block-spacer {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

If a response helped you out, show some love by 'Like' like.jpg.6f2856e82374ca8b5041fff9ee27eef4.jpg (bottom-right) and/or 'Upvote' vote.jpg.c260784ece77aec852b0e3049c77a607.jpg (top-left).

 

Note that the minimum width of a spacer block isn't dictated by the block, but by Squarespace's grid system. It's not an issue with the spacer block, but it's the minimum width of any block on Squarespace (technically, it's the minimum width of columns). Messing with grid column width requires a case-by-case evaluation and code-writing.

 


Original Answer:

Hi @joshuar87.

I've run into this in the past as well. The minimum height of the spacer block can seem too high for some instances.

The minimum height seems to be based on a combination of your templates default 'line-height' property, the default top/bottom gutter height (17px), and an arbitrary minimum padding set by the SS system. Finally, a min-height rule limits the spacer block when dragging it up and down in LayoutEngine.

It is possible to override these values by inserting the following CSS into the CSS Editor. Save, then refresh the page.

/*Remove minimum spacer-block height*/
.spacer-block {
   padding-top: 0;
   padding-bottom: 0 !important;
}

.spacer-block .sqs-block-content {
   line-height: 0.0em;
}

.sqs-layout.sqs-editing .spacer-block {
   min-height: 0;
}
/*End remove spacer-block height*/

 

Keep in mind that if Squarespace changes their code, this kind of CSS can stop working at any time.

Let me know how this works for you.

-Brandon

Edited by brandon
Initial Revision

If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' vote.jpg.c260784ece77aec852b0e3049c77a607.jpg (top-left)

Link to comment
  • 4 weeks later...
  • 1 month later...

Works brilliantly thanks!

To others who try this, once you have inserted the code, don't expect your site to respond by automatically reducing the Spacer Blocks to 0 - you have to go and click on each one and then you'll see the grey circle, and can drag the Spacer to as small as you like.

Thanks @BrandonW

Link to comment

Works brilliantly thanks!

To others who try this, once you have inserted the code, don't expect your site to respond by automatically reducing the Spacer Blocks to 0 - you have to go and click on each one and then you'll see the grey circle, and can drag the Spacer to as small as you like.

Thanks @BrandonW

Link to comment
  • 3 weeks later...
  • 2 months later...
  • 2 months later...
  • 11 months later...
  • 2 weeks later...
  • 1 month later...
  • 1 month later...
  • 4 months later...
  • 1 year later...
  • 1 year later...
  • 3 months later...
  • 3 weeks later...

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.