Skip to content

Commit

Permalink
Merge branch 'release/0.3.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
acketon committed Mar 11, 2021
2 parents 80b97d5 + cc6536f commit b846ad7
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 9 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

## 0.3.5
- 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.

## 0.3.4
- Add icons for each block to improve UI and accessibility.
- Add Collapsible Block
Expand Down Expand Up @@ -153,4 +159,3 @@ stylesheet via the child theme. This fixes the block styling when BU-Blocks is a

Updates the master branch with the currently released codebase in production that had been developed on the #develop branch initially.

## Unreleased
4 changes: 2 additions & 2 deletions bu-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Author URI: http://www.bu.edu/interactive-design/
* Text Domain: bu-blocks
* Domain Path: /languages
* Version: 0.3.4
* Version: 0.3.5
*
* @package BU_Blocks
*/
Expand All @@ -20,7 +20,7 @@
}

// Defines the plugin version.
define( 'BU_BLOCKS_VERSION', '0.3.4' );
define( 'BU_BLOCKS_VERSION', '0.3.5' );

/**
* Displays admin notice and prevents activation.
Expand Down
2 changes: 1 addition & 1 deletion dist/blocks.style.build.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/blocks.style.build.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bu-blocks",
"version": "0.3.4",
"version": "0.3.5",
"private": true,
"main": "Gruntfile.js",
"author": "Boston University: Interactive Design",
Expand Down
3 changes: 3 additions & 0 deletions src/blocks/collapsible-control/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bu_blocks.collapsibleControl = ( function() {
var allCollapsibleBlocks = [];
var allBlocksOpen = false;
var collapsibleOpenClass = 'is-open';
var collapsibleCloseClass = 'is-closed';

/**
* Open or close a group of collapsible blocks
Expand All @@ -25,10 +26,12 @@ bu_blocks.collapsibleControl = ( function() {

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
17 changes: 14 additions & 3 deletions src/blocks/collapsible/_bu-blocks-block-collapsible-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
//

.wp-block-bu-collapsible {
border: 1px solid #ccc;
margin-top: -1px;

.bu-block-collapsible-content {
display: none;
padding: 20px;
border: 1px solid #ccc;
border-top: 0;
}

.bu-block-collapsible-toggle {
Expand All @@ -33,6 +34,7 @@
.bu-collapsible-heading {
padding: 0;
position: relative;
border: 1px solid #ccc;
@include icon( 'plus', 'after' );

&:after {
Expand Down Expand Up @@ -113,10 +115,17 @@

// Outline Style.
&.is-style-outline {
border: 3px solid #000;
.bu-collapsible-heading {
border: 3px solid #000;
}

// Remove top border when collapsible is adjacent.
& + .is-style-outline {
& + .is-style-outline .bu-collapsible-heading {
border-top: 0;
}

.bu-block-collapsible-content {
border: 3px solid #000;
border-top: 0;
}

Expand All @@ -142,12 +151,14 @@
}

.bu-collapsible-heading {
border: none;
position: static;
flex: 0 1 auto;
align-self: stretch;
}

.bu-block-collapsible-content {
border: none;
padding: 0;
flex: 0 1 auto;
align-self: stretch;
Expand Down

0 comments on commit b846ad7

Please sign in to comment.