From 0c5b660fb0fd708e24761f0b5ec6068c4334af47 Mon Sep 17 00:00:00 2001 From: ramon Date: Wed, 12 Jun 2024 14:40:35 +1000 Subject: [PATCH] Add support for background images for pullquote and quote blocks. For flexibility to display varying image heights, also opt in to minimum height for these blocks, but not as default controls --- docs/reference-guides/core-blocks.md | 4 ++-- packages/block-library/src/pullquote/block.json | 13 +++++++++++++ packages/block-library/src/quote/block.json | 13 +++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 7b7dbe92915678..30a73707d06cf8 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -706,7 +706,7 @@ Give special visual emphasis to a quote from your text. ([Source](https://github - **Name:** core/pullquote - **Category:** text -- **Supports:** align (full, left, right, wide), anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight) +- **Supports:** align (full, left, right, wide), anchor, background (backgroundImage, backgroundSize), color (background, gradients, link, text), dimensions (minHeight), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight) - **Attributes:** citation, textAlign, value ## Query Loop @@ -783,7 +783,7 @@ Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Ju - **Name:** core/quote - **Category:** text -- **Supports:** anchor, color (background, gradients, heading, link, text), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** anchor, background (backgroundImage, backgroundSize), color (background, gradients, heading, link, text), dimensions (minHeight), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** citation, textAlign, value ## Read More diff --git a/packages/block-library/src/pullquote/block.json b/packages/block-library/src/pullquote/block.json index 410b477dd9939e..0935f9759668d5 100644 --- a/packages/block-library/src/pullquote/block.json +++ b/packages/block-library/src/pullquote/block.json @@ -26,6 +26,13 @@ "supports": { "anchor": true, "align": [ "left", "right", "wide", "full" ], + "background": { + "backgroundImage": true, + "backgroundSize": true, + "__experimentalDefaultControls": { + "backgroundImage": true + } + }, "color": { "gradients": true, "background": true, @@ -35,6 +42,12 @@ "text": true } }, + "dimensions": { + "minHeight": true, + "__experimentalDefaultControls": { + "minHeight": false + } + }, "spacing": { "margin": true, "padding": true diff --git a/packages/block-library/src/quote/block.json b/packages/block-library/src/quote/block.json index 7ad713a13373a1..7ca81b364b3eff 100644 --- a/packages/block-library/src/quote/block.json +++ b/packages/block-library/src/quote/block.json @@ -29,6 +29,19 @@ "supports": { "anchor": true, "html": false, + "background": { + "backgroundImage": true, + "backgroundSize": true, + "__experimentalDefaultControls": { + "backgroundImage": true + } + }, + "dimensions": { + "minHeight": true, + "__experimentalDefaultControls": { + "minHeight": false + } + }, "__experimentalOnEnter": true, "__experimentalOnMerge": true, "typography": {