Skip to content

Commit

Permalink
Add color support to the quote block
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Apr 1, 2022
1 parent 88689f0 commit dfc93b7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Ju

- **Name:** core/quote
- **Category:** text
- **Supports:** anchor, typography (fontSize, lineHeight)
- **Supports:** anchor, color (background, gradients, link, text), typography (fontSize, lineHeight)
- **Attributes:** align, citation, value

## Read More
Expand Down
8 changes: 8 additions & 0 deletions packages/block-library/src/quote/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
"fontSize": true,
"fontAppearance": true
}
},
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true
}
}
},
"styles": [
Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/quote/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.wp-block-quote {
box-sizing: border-box;
overflow-wrap: break-word; // Break long strings of text without spaces so they don't overflow the block.
// .is-style-large and .is-large are kept for backwards compatibility. The :not pseudo-class is used to enable switching styles. See PR #37580.
&.is-style-large:not(.is-style-plain),
Expand All @@ -18,4 +19,8 @@
text-align: right;
}
}

&.has-background {
padding: $block-bg-padding--v $block-bg-padding--h;
}
}

0 comments on commit dfc93b7

Please sign in to comment.