diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 939cc6748ec91..a4e307c94df87 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -98,7 +98,7 @@ A single column within a columns block. ([Source](https://github.com/WordPress/g - **Name:** core/column - **Category:** design - **Parent:** core/columns -- **Supports:** anchor, color (background, gradients, link, text), layout, spacing (blockGap, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ +- **Supports:** anchor, color (background, gradients, heading, link, text), layout, spacing (blockGap, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ - **Attributes:** allowedBlocks, templateLock, verticalAlignment, width ## Columns @@ -181,7 +181,7 @@ An advanced block that allows displaying post comments using different visual co - **Name:** core/comments - **Category:** theme -- **Supports:** align (full, wide), color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, wide), color (background, gradients, heading, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** legacy, tagName ## Comments Pagination @@ -239,7 +239,7 @@ Add an image or video with a text overlay. ([Source](https://github.com/WordPres - **Name:** core/cover - **Category:** media -- **Supports:** align, anchor, color (text, ~~background~~), layout (~~allowJustification~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align, anchor, color (heading, text, ~~background~~), layout (~~allowJustification~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** allowedBlocks, alt, backgroundType, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, gradient, hasParallax, id, isDark, isRepeated, minHeight, minHeightUnit, overlayColor, tagName, templateLock, url, useFeaturedImage ## Details @@ -302,7 +302,7 @@ Gather blocks in a layout container. ([Source](https://github.com/WordPress/gute - **Name:** core/group - **Category:** design -- **Supports:** align (full, wide), anchor, ariaLabel, color (background, gradients, link, text), dimensions (minHeight), layout (allowSizingOnChildren), position (sticky), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, wide), anchor, ariaLabel, color (background, gradients, heading, link, text), dimensions (minHeight), layout (allowSizingOnChildren), position (sticky), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** allowedBlocks, tagName, templateLock ## Heading @@ -394,7 +394,7 @@ Set media and words side-by-side for a richer layout. ([Source](https://github.c - **Name:** core/media-text - **Category:** media -- **Supports:** align (full, wide), anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, wide), anchor, color (background, gradients, heading, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** align, allowedBlocks, focalPoint, href, imageFill, isStackedOnMobile, linkClass, linkDestination, linkTarget, mediaAlt, mediaId, mediaLink, mediaPosition, mediaSizeSlug, mediaType, mediaUrl, mediaWidth, rel, verticalAlignment ## Unsupported @@ -544,7 +544,7 @@ Display a post's comments form. ([Source](https://github.com/WordPress/gutenberg - **Name:** core/post-comments-form - **Category:** theme -- **Supports:** color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** color (background, gradients, heading, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** textAlign ## Post Comments Link @@ -732,7 +732,7 @@ Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Ju - **Name:** core/quote - **Category:** text -- **Supports:** anchor, color (background, gradients, link, text), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** anchor, color (background, gradients, heading, link, text), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** align, citation, value ## Read More diff --git a/packages/block-editor/src/components/global-styles/color-panel.js b/packages/block-editor/src/components/global-styles/color-panel.js index 3e38ea02ac3da..83c80f679c115 100644 --- a/packages/block-editor/src/components/global-styles/color-panel.js +++ b/packages/block-editor/src/components/global-styles/color-panel.js @@ -35,7 +35,7 @@ export function useHasColorPanel( settings ) { const hasBackgroundPanel = useHasBackgroundPanel( settings ); const hasLinkPanel = useHasLinkPanel( settings ); const hasHeadingPanel = useHasHeadingPanel( settings ); - const hasButtonPanel = useHasHeadingPanel( settings ); + const hasButtonPanel = useHasButtonPanel( settings ); const hasCaptionPanel = useHasCaptionPanel( settings ); return ( diff --git a/packages/block-library/src/column/block.json b/packages/block-library/src/column/block.json index 31ad66cb6b191..3dda622357763 100644 --- a/packages/block-library/src/column/block.json +++ b/packages/block-library/src/column/block.json @@ -28,6 +28,7 @@ "html": false, "color": { "gradients": true, + "heading": true, "link": true, "__experimentalDefaultControls": { "background": true, diff --git a/packages/block-library/src/comments/block.json b/packages/block-library/src/comments/block.json index 4bfe4bb901786..b35ea3505c816 100644 --- a/packages/block-library/src/comments/block.json +++ b/packages/block-library/src/comments/block.json @@ -21,6 +21,7 @@ "html": false, "color": { "gradients": true, + "heading": true, "link": true, "__experimentalDefaultControls": { "background": true, diff --git a/packages/block-library/src/cover/block.json b/packages/block-library/src/cover/block.json index 39ee697802548..4858923748369 100644 --- a/packages/block-library/src/cover/block.json +++ b/packages/block-library/src/cover/block.json @@ -108,6 +108,7 @@ }, "color": { "__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background", + "heading": true, "text": true, "background": false, "__experimentalSkipSerialization": [ "gradients" ] diff --git a/packages/block-library/src/group/block.json b/packages/block-library/src/group/block.json index 6eaf78586285e..135aedf03589d 100644 --- a/packages/block-library/src/group/block.json +++ b/packages/block-library/src/group/block.json @@ -29,6 +29,7 @@ "html": false, "color": { "gradients": true, + "heading": true, "link": true, "__experimentalDefaultControls": { "background": true, diff --git a/packages/block-library/src/media-text/block.json b/packages/block-library/src/media-text/block.json index 8ffc653d68414..cdeb4ce13e8f5 100644 --- a/packages/block-library/src/media-text/block.json +++ b/packages/block-library/src/media-text/block.json @@ -100,6 +100,7 @@ "html": false, "color": { "gradients": true, + "heading": true, "link": true, "__experimentalDefaultControls": { "background": true, diff --git a/packages/block-library/src/post-comments-form/block.json b/packages/block-library/src/post-comments-form/block.json index 62f92b7581c9e..a74583cc1f6d9 100644 --- a/packages/block-library/src/post-comments-form/block.json +++ b/packages/block-library/src/post-comments-form/block.json @@ -16,6 +16,7 @@ "html": false, "color": { "gradients": true, + "heading": true, "link": true, "__experimentalDefaultControls": { "background": true, diff --git a/packages/block-library/src/quote/block.json b/packages/block-library/src/quote/block.json index 49ee925794ce2..b39f473763500 100644 --- a/packages/block-library/src/quote/block.json +++ b/packages/block-library/src/quote/block.json @@ -47,6 +47,7 @@ }, "color": { "gradients": true, + "heading": true, "link": true, "__experimentalDefaultControls": { "background": true, diff --git a/packages/blocks/src/api/constants.js b/packages/blocks/src/api/constants.js index fb4e4efa4e083..2afdee93278ce 100644 --- a/packages/blocks/src/api/constants.js +++ b/packages/blocks/src/api/constants.js @@ -148,6 +148,14 @@ export const __EXPERIMENTAL_STYLE_PROPERTY = { value: [ 'elements', 'button', 'color', 'background' ], support: [ 'color', 'button' ], }, + headingColor: { + value: [ 'elements', 'heading', 'color', 'text' ], + support: [ 'color', 'heading' ], + }, + headingBackgroundColor: { + value: [ 'elements', 'heading', 'color', 'background' ], + support: [ 'color', 'heading' ], + }, fontFamily: { value: [ 'typography', 'fontFamily' ], support: [ 'typography', '__experimentalFontFamily' ],