Jump to content

Applying animation CSS I already have to new plugin

Recommended Posts

Site URL: https://gregorylassale.com

I just switched to a new accordion-tabs plugin. The one that I used before that has this animation on hover I really like:

 

 I think the CSS for that animation is 

.box-sizing (@type: border-box) {
  -webkit-box-sizing: @type;
  -moz-box-sizing:    @type;
  box-sizing:         @type;
}

.transition (@transition) {
  -webkit-transition: @transition;
  -moz-transition:    @transition;
  -ms-transition:     @transition;
  -o-transition:      @transition;
  transition:         @transition;
}

// Overrides (modify at your own risk)
// No support provided past this point
// -----------------------------------
.accordion-2 {
  list-style: none;
  padding: 0;

  &__item {
    margin-bottom: 10px;
  }
  
  &__title {
    .background-checker(@accordion-2__primary-color);
    .box-sizing;
    .transition(all .3s ease);
    border-left: 3px solid @accordion-2__primary-color;

I'd like to apply it to my plugin but would need help with that.

The new plugin's customization CSS is

/* Plugin Accotabs - Custom Styles */
html .c-tabs__accordion-tab {
  margin: 0 0 10px;
  background: #f3f5f7;
  border: .5px solid #ddd;
  border-radius: 3px 3px 3px 3px;
}

html .c-tabs.has-hover .c-tabs__accordion-tab:hover,html .c-tabs__accordion-tab[aria-expanded=true] {
  background: #e8ecf0;
  border: .5px solid #ddd;
}
/* end Plugin Accotabs - Custom Styles */

 

Thanks in advance. 

Link to comment
5 hours ago, GregLassale said:

Site URL: https://gregorylassale.com

I just switched to a new accordion-tabs plugin. The one that I used before that has this animation on hover I really like:

 

 I think the CSS for that animation is 


.box-sizing (@type: border-box) {
  -webkit-box-sizing: @type;
  -moz-box-sizing:    @type;
  box-sizing:         @type;
}

.transition (@transition) {
  -webkit-transition: @transition;
  -moz-transition:    @transition;
  -ms-transition:     @transition;
  -o-transition:      @transition;
  transition:         @transition;
}

// Overrides (modify at your own risk)
// No support provided past this point
// -----------------------------------
.accordion-2 {
  list-style: none;
  padding: 0;

  &__item {
    margin-bottom: 10px;
  }
  
  &__title {
    .background-checker(@accordion-2__primary-color);
    .box-sizing;
    .transition(all .3s ease);
    border-left: 3px solid @accordion-2__primary-color;

I'd like to apply it to my plugin but would need help with that.

The new plugin's customization CSS is


/* Plugin Accotabs - Custom Styles */
html .c-tabs__accordion-tab {
  margin: 0 0 10px;
  background: #f3f5f7;
  border: .5px solid #ddd;
  border-radius: 3px 3px 3px 3px;
}

html .c-tabs.has-hover .c-tabs__accordion-tab:hover,html .c-tabs__accordion-tab[aria-expanded=true] {
  background: #e8ecf0;
  border: .5px solid #ddd;
}
/* end Plugin Accotabs - Custom Styles */

 

Thanks in advance. 

try if this helps

html .c-tabs__accordion-tab:hover {
  border-left: 2px solid #000 !important;
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

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.