Skip to content

Commit

Permalink
Merge branch 'release/0.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
acketon committed Oct 28, 2020
2 parents b8ae9b1 + ebff6c8 commit 4528302
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 40 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.3.1
- Photo Essay Block Improvements:
- Puts captions blocks closer to photo essay blocks. fixes: bu-ist/r-editorial#984
- Adds hover effect to photo essay images to denote click-ability. fixes:bu-ist/r-editorial#896



## 0.3.0
- Official support for WordPress 5.4, including:
- Compatibility for the the listicle block https://github.com/bu-ist/bu-blocks/pull/271
Expand Down
38 changes: 19 additions & 19 deletions dist/blocks.editor.build.css

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions 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.

62 changes: 60 additions & 2 deletions src/blocks/photoessay/_bu-blocks-block-photoessay-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $photo-padding-xl: $padding/2 !default;
position: relative;
float: left;
// background: #f66;
margin-bottom: $photo-padding*2;
margin-bottom: $photo-padding * 2;
.wp-block-photoessay-media {
position: absolute;
top: 0;
Expand All @@ -32,16 +32,67 @@ $photo-padding-xl: $padding/2 !default;
content: "";
display: inline-block;
}

&:first-child {
figure {
@media (hover: none) and (pointer: coarse) {
position: relative;

&::before {
opacity: 1;
}
}
}
}
}
}

+ .is-style-caption {
float: left;
margin-bottom: $photo-padding * 2;
margin-top: $photo-padding * -1.5;
}

figure {
height: 100%;
margin: 0; // needed for editor side in cases where Normalize.scss isn't included.
overflow: hidden;

img {
transition: transform 1000ms ease-out;

&:hover,
&:focus {
transform: scale( 1.125 );
}
}

&:hover {
cursor: pointer;
}

@media (hover: none) and (pointer: coarse) {
position: relative;

&::before {
content: "\2922";
display: block;
font-family: "BU-Default-Icons";
position: absolute;
right: 3px;
top: 3px;
color: $color-grayscale-f;
font-size: 14px;
line-height: 14px;
width: 14px;
background: rgba( $color-grayscale-0, 0.5 );
padding: 5px;
box-sizing: content-box;
border-radius: 4px;
opacity: 0.5;
}
}

figcaption {
display: none;
}
Expand Down Expand Up @@ -344,12 +395,19 @@ $photo-padding-xl: $padding/2 !default;
margin: 0 -#{$photo-padding-xl};
// @extend %clearfix;
[class*="photo-"] {
margin-bottom: $photo-padding-xl*2;
margin-bottom: $photo-padding-xl * 2;
.wp-block-photoessay-media {
padding: 0 $photo-padding-xl;
}
}
}

+ .is-style-caption {
float: left;
margin-bottom: $photo-padding-xl * 2;
margin-top: $photo-padding-xl * -1.5;
}

[class*="photo-row-square-1"] {
@include breakpoint( $xs ) {
.photo-1 {
Expand Down

0 comments on commit 4528302

Please sign in to comment.