Skip to content

Commit

Permalink
Merge pull request #352 from bu-ist/bug/5.7-fix-tweet-highlight-styli…
Browse files Browse the repository at this point in the history
…ng-paragraph-blocks

Bug/5.7 fix tweet highlight styling paragraph blocks
  • Loading branch information
acketon authored Aug 22, 2023
2 parents 1f0f085 + 4c1748d commit 0210fce
Show file tree
Hide file tree
Showing 6 changed files with 128,425 additions and 70 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- Click to Tweet style fixes. Closes #320. Updates the styles to restore the styling for the Click to Tweet feature on Paragraph blocks.
- Stats Block:
- Update to block api 2 and fix alignment issues for WP 5.7
- Change default fill / stroke color of the stats block svg donut chart so it isn't white on white background.
Expand Down
955 changes: 954 additions & 1 deletion dist/blocks.build.js

Large diffs are not rendered by default.

41,677 changes: 41,656 additions & 21 deletions dist/blocks.editor.build.css

Large diffs are not rendered by default.

42,916 changes: 42,896 additions & 20 deletions dist/blocks.style.build.css

Large diffs are not rendered by default.

42,916 changes: 42,896 additions & 20 deletions docs/blocks.style.build.css

Large diffs are not rendered by default.

30 changes: 22 additions & 8 deletions src/blocks/clicktotweet/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,43 @@
*/


.wp-block-bu-clicktotweet.has-format-highlight .wp-block-bu-clicktotweet-highlight {
/**
* Define CSS variables to allow child themes
* to alter these values easily if needed.
**/
:root {
--bu_blocks-block-click-tweet-color-highlight: #def0f6;
--bu_blocks-block-click-tweet-color-icon: #0587B8;
--bu_blocks-block-click-tweet-color-button: #0587B8;
}

[data-type="core/paragraph"].wp-block-bu-clicktotweet.has-format-highlight .wp-block-bu-clicktotweet-highlight {
background: var(--bu_blocks-block-click-tweet-color-highlight);

&::after {
color: #0587B8;
color: var(--bu_blocks-block-click-tweet-color-icon);
content: "\f301";
font-family: "dashicons";
}
}

[data-type="core/paragraph"]:not(.is-selected) {
.wp-block-paragraph.wp-block-bu-clicktotweet:not(.has-format-highlight) {
[data-type="core/paragraph"]:not(.is-selected).wp-block-bu-clicktotweet:not(.has-format-highlight) {

.wp-block-bu-clicktotweet-content::before {
.wp-block-bu-clicktotweet-content {
&::before {
content: '';
border: 1px dashed gray;
border-color: var(--bu_blocks-block-click-tweet-color-button);
display: block;
position: absolute;
left: -15px;
top: -15px;
bottom: -15px;
right: -15px;

}

&::after {
background: gray;
background: var(--bu_blocks-block-click-tweet-color-button);
bottom: -15px;
color: #fff;
content: "tweet this";
Expand All @@ -41,4 +54,5 @@
right: -15px;
}
}
}

}

0 comments on commit 0210fce

Please sign in to comment.