Jump to content

AverageCtrlC_CtrlVer

Member
  • Posts

    1
  • Joined

  • Last visited

Posts posted by AverageCtrlC_CtrlVer

  1. On 12/8/2021 at 10:18 PM, creedon said:

    Add the following to Design > Custom CSS.

    /*
    
      begin accordion block partial reveal
      
      Version     : 0.1d0
      
      SS Version  : 7.1
      
      By          : Thomas Creedon < http://www.tomsWeb.consulting/ >
      
      */
      
      .sqs-block-accordion {
      
        --height : 9rem;
        
        }
        
      /* do not change anything below, there be the borg here */
      
      @media screen and ( max-width : 799px ) {
      
        .sqs-block-accordion .accordion-item__dropdown {
        
          display : block;
          
          }
          
        .sqs-block-accordion .accordion-item__description::after {
        
          content : '\002026'; /* elipses */
          display : block;
          font-size : larger;
          margin-top : -0.75em;
          
          }
          
        .sqs-block-accordion .accordion-item__description p {
        
          height : var( --height );
          margin-bottom : 1rem;
          overflow-y: hidden;
          
          }
          
        .sqs-block-accordion .accordion-item__dropdown.accordion-item__dropdown--open {
        
          display : unset;
          
          }
          
        .sqs-block-accordion .accordion-item__dropdown--open .accordion-item__description::after {
        
          content : unset;
          display : unset;
          font-size : unset;
          margin-top : unset;
          
          }
          
        .sqs-block-accordion .accordion-item__dropdown--open .accordion-item__description p {
        
          height : unset;
          margin-bottom : unset;
          overflow-y: unset;
          
          }
          
        }
        
      /* end accordion block partial reveal */

    This is a site-wide effect. If you want to apply to only certain accordion block the code would need to be modified.

    Let us know how it goes.

    I attempted this as is and it did not work while in web view , it did somewhat work in mobile view

    however the text had not shrunk,

    https://chinchilla-tiger-3ht8.squarespace.com
    PW:
    CtrlV
     

    Help.png

×
×
  • 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.