From 5a028d1744e6f5d2a366649691547779adb42ce9 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Thu, 18 Aug 2022 15:02:03 +1000 Subject: [PATCH] Cover: Add typography supports (#43298) --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/cover/block.json | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index d33f841475ca1..d2eba95603bd7 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -230,7 +230,7 @@ Add an image or video with a text overlay — great for headers. ([Source](https - **Name:** core/cover - **Category:** media -- **Supports:** align, anchor, color (~~background~~, ~~text~~), spacing (margin, padding), ~~html~~ +- **Supports:** align, anchor, color (~~background~~, ~~text~~), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** allowedBlocks, alt, backgroundType, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, gradient, hasParallax, id, isDark, isRepeated, minHeight, minHeightUnit, overlayColor, templateLock, url, useFeaturedImage ## Embed diff --git a/packages/block-library/src/cover/block.json b/packages/block-library/src/cover/block.json index fc65183162884..12c717370c426 100644 --- a/packages/block-library/src/cover/block.json +++ b/packages/block-library/src/cover/block.json @@ -92,6 +92,19 @@ "__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background", "text": false, "background": false + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } } }, "editorStyle": "wp-block-cover-editor",