Jump to content

coen

Circle Member
  • Posts

    10
  • Joined

  • Last visited

Reputation Activity

  1. Like
    coen reacted to Arna in swap block order in mobile view   
    Lots of folks have asked a similar question in different ways and there don't seem to be answers posted, so I figured I'd try again. This community is such an amazing resource!
    I am wondering if there is a way to use CSS to swap the order of blocks in mobile view so that you can specify some blocks to stack right to left rather than the standard left to right. So something like:
    @media only screen and (max-width: 640px) { //identify blocks you want to swap and change their order }
    My site is fh-partners.squarespace.com. Here's what I want to do specifically (on the team page):
    I really like my desktop arrangement, which is:
    <1 picture> <2 text> <3 text> <4 picture>
    Ideally I would like my mobile view to be arranged:
    <1 picture> <2 text> <4 picture> <3 text>
    But squarespace goes left to right so it ends up as:
    <1 picture> <2 text> <3 text> <4 picture>
    Is there css to swap blocks 3 and 4 in the mobile view?
    Thank you in advance!
  2. Love
    coen reacted to brandon in Why does the spacer have a minimum size?   
    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'  (bottom-right) and/or 'Upvote'  (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
×
×
  • 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.