Skip to content

Commit

Permalink
Merge tag '0.3.5' into develop
Browse files Browse the repository at this point in the history
- Update JS for Collapsible Control Block to account for .is-closed class being present on pageload.
- Move border styles in Collapsible block to inner child elements instead of block container element.
  • Loading branch information
acketon committed Mar 11, 2021
2 parents 930fc65 + 88d4132 commit be9ee86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/bu-blocks-frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ const bu_blocks = {};
var allCollapsibleBlocks = [];
var allBlocksOpen = false;
var collapsibleOpenClass = 'is-open';
var collapsibleCloseClass = 'is-closed';

/**
* Open or close a group of collapsible blocks
Expand All @@ -569,10 +570,12 @@ const bu_blocks = {};

if ( open ) {
container.classList.add( collapsibleOpenClass );
container.classList.remove( collapsibleCloseClass );
toggle.setAttribute( 'aria-expanded', true );
panel.setAttribute( 'aria-hidden', false );
} else {
container.classList.remove( collapsibleOpenClass );
container.classList.add( collapsibleCloseClass );
toggle.setAttribute( 'aria-expanded', false );
panel.setAttribute( 'aria-hidden', true );
}
Expand Down
3 changes: 3 additions & 0 deletions docs/bu-blocks-frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ const bu_blocks = {};
var allCollapsibleBlocks = [];
var allBlocksOpen = false;
var collapsibleOpenClass = 'is-open';
var collapsibleCloseClass = 'is-closed';

/**
* Open or close a group of collapsible blocks
Expand All @@ -569,10 +570,12 @@ const bu_blocks = {};

if ( open ) {
container.classList.add( collapsibleOpenClass );
container.classList.remove( collapsibleCloseClass );
toggle.setAttribute( 'aria-expanded', true );
panel.setAttribute( 'aria-hidden', false );
} else {
container.classList.remove( collapsibleOpenClass );
container.classList.add( collapsibleCloseClass );
toggle.setAttribute( 'aria-expanded', false );
panel.setAttribute( 'aria-hidden', true );
}
Expand Down

0 comments on commit be9ee86

Please sign in to comment.