There was no simple way to add a margin between accordion sections, so a wrapper element would be nice. Something like the following:

<div class="accordion-row-wrapper">
  <h3{{ title_attributes }}><a id="{{ id }}" href="#{{ id }}">{{ title }}</a></h3>
  <div{{ content_attributes }}>{{ content }}</div>
</div>

Comments

webdrips created an issue. See original summary.

mshdevx’s picture

Hi webdrips, I see no problem to override paragraphs-jquery-ui-accordion-formatter.html.twig in your custom theme and add markup that matches your design.

mshdevx’s picture

Status: Active » Closed (works as designed)
webdrips’s picture

Hi @maxdev I did try that, and it blew the design up

mshdevx’s picture

Hi webdrips, could you add more details? What exactly broke after you overridden paragraphs-jquery-ui-accordion-formatter.html.twig?

webdrips’s picture

Hi @maxdev the accordion breaks as follows:

  1. I can't open/close the sections properly (closing makes an item disappear).
  2. All items are open on page load
mshdevx’s picture

Status: Closed (works as designed) » Active

Well, now I see. This seems like a good old Jquery UI accordion issue https://api.jqueryui.com/accordion/#option-header
We need to add the ability to explicitly set the header tag, then we can use custom markup for accordion slides