=== Accordion Blocks === Contributors: philbuchanan Author URI: https://philbuchanan.com/ Donate Link: https://philbuchanan.com/donate/ Tags: accordion, accordions, gutenberg, block, responsive Requires at least: 5.5 Tested up to: 5.7 Stable tag: 1.3.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Gutenberg block for creating responsive accordion drop-downs. == Description == Accordion Blocks is a simple plugin that adds a Gutenberg block for adding accordion drop-downs to your pages. The accordions should blend seamlessly with your theme. However, you may want to add custom styles to your theme. = Features = * Adds a Gutenberg block for adding accordions to your site. * Supports multiple accordions with individual settings for each accordion item. * Fully responsive. * Support for item IDs and direct links. * Supports nesting accordions. * Accessible (for users requiring tabbed keyboard navigation control). = Optional Features = * Open individual accordion items by default. * Disable auto closing of accordion items. * Manually close items by clicking the title again. * Scroll page to title when it's clicked open (including setting a scroll offset position). * Set the HTML heading tag for the title element (h1–h6, button). * Set defaults to be applied to all new accordion items or reset a specific accordion item to the defaults. * Supports adding custom block styles using `wp.blocks.registerBlockStyle`. = Output = The plugin will ultimately output following HTML (simplified for this example):
= Custom CSS = You can use the following CSS classes to customize the look of the accordion. .c-accordion__item {} /* The accordion item container */ .c-accordion__item.is-open {} /* is-open is added to open accordion items */ .c-accordion__item.is-read {} /* is-read is added to accordion items that have been opened at least once */ .c-accordion__title {} /* An accordion item title */ .c-accordion__title--button {} /* An accordion item title that is using a `