By Stephen Walker

Share

This is a CSS snippet for creating an Avada toggle with the icon next to the title but maintaining full-width clickability. Simply assign the class to the accordion, set bordered to off, and the dividing line to off.

:root{
 --spacing-xxs:2px;
  --spacing-xs:.25rem; /* 4px */
  --spacing-sm:.5rem; /* 8px */
  --spacing-md:1rem; /* 16px */
  --spacing-lg:1.5rem; /* 24px */
  --spacing-xl:2rem; /* 32px */
  --spacing-2xl:3rem; /* 48px */
  --spacing-3xl:4rem; /* 64px */
  --spacing-4xl:5rem; /* 80px */
}
.vac-additional-info .fusion-toggle-icon-wrapper{
  display:none;
}
.vac-additional-info .panel-title a > span.fusion-toggle-heading{
  display: inline-block;
  border-bottom:1px dotted var(--awb-custom_color_3);
  width:max-content!important;
  margin-left:0;
  transition-duration: 0.3s;
  transition-timing-function: ease-in-out;
}
.vac-additional-info a .fusion-toggle-heading::after{
  display: inline-block;
  position: absolute;
  border-bottom:0!important;
  font-family:"Font Awesome 6 Pro";
  color:var(--awb-custom_color_3);
  margin-left:var(--spacing-sm);
  font-size:.8rem;
  font-weight:900;
}
.vac-additional-info a[aria-expanded="false"] .fusion-toggle-heading::after{
  content:"\f078";
}
.vac-additional-info a[aria-expanded="true"] .fusion-toggle-heading::after{
  content:"\f077";
}

Originally published on Feb. 12, 2023

Accordion Radius
Skew Column Background

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

RELATED Snippets

  • Avada, CSS, JavaScript

    This creates a floating container. More to come.

  • Avada, CSS

    This is a style I recently used on my blog post title bar to have the feature image fill the column without having to use a background image.

  • Avada, CSS

    I have seen some tables of contents around the web that use what appears as a left border, and the border color changes when highlighted. This feature is missing from the current version of Avada, so I created CSS styling to do this. It works best with a single-level list. […]

  • Avada

    The social sharing element has some styles that prevent stacking them in a column. This CSS will resolve this. Just assign the class to each instance.

  • Avada, CSS

    This gives the default RSS feed widget a more polished appearance.

  • Avada

    The Toggle Element styling leaves a bit to be desired as it applies hover effects to the entire block and not just the header and the panel. This should override that behavior but still takes advantage of the settings, thanks to the use of CSS variables. Example