Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,15 @@ Add a link to a downloadable file. ([Source](https://github.com/WordPress/gutenb
- **Supports:** align, anchor, color (background, gradients, link, ~~text~~), interactivity, spacing (margin, padding)
- **Attributes:** blob, displayPreview, downloadButtonText, fileId, fileName, href, id, previewHeight, showDownloadButton, textLinkHref, textLinkTarget

## Fit Text

Add text that automatically scales to fit its container. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/fit-text))

- **Name:** core/fit-text
- **Category:** text
- **Supports:** __unstablePasteTextInline, align (full, wide), anchor, className, color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (lineHeight)
- **Attributes:** content, level, levelOptions

## Footnotes

Display footnotes added to the page. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/footnotes))
Expand Down Expand Up @@ -410,7 +419,7 @@ Introduce new sections and organize content to help visitors (and search engines

- **Name:** core/heading
- **Category:** text
- **Supports:** __unstablePasteTextInline, align (full, wide), anchor, className, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fitText, fontSize, lineHeight)
- **Supports:** __unstablePasteTextInline, align (full, wide), anchor, className, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fontSize, lineHeight)
- **Attributes:** content, level, levelOptions, placeholder, textAlign

## Home Link
Expand Down Expand Up @@ -590,7 +599,7 @@ Start with the basic building block of all narrative. ([Source](https://github.c

- **Name:** core/paragraph
- **Category:** text
- **Supports:** __unstablePasteTextInline, anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fitText, fontSize, lineHeight), ~~className~~
- **Supports:** __unstablePasteTextInline, anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fontSize, lineHeight), ~~className~~
- **Attributes:** align, content, direction, dropCap, placeholder

## Pattern Placeholder
Expand Down
18 changes: 0 additions & 18 deletions lib/block-supports/typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,24 +244,6 @@ function gutenberg_typography_get_preset_inline_style_value( $style_value, $css_
* @return string Filtered block content.
*/
function gutenberg_render_typography_support( $block_content, $block ) {
if ( ! empty( $block['attrs']['fitText'] ) && ! is_admin() ) {
wp_enqueue_script_module( '@wordpress/block-editor/utils/fit-text-frontend' );

// Add Interactivity API directives for fit text to work with client-side navigation.
if ( ! empty( $block_content ) ) {
$processor = new WP_HTML_Tag_Processor( $block_content );
if ( $processor->next_tag() ) {
if ( ! $processor->get_attribute( 'data-wp-interactive' ) ) {
$processor->set_attribute( 'data-wp-interactive', true );
}
$processor->set_attribute( 'data-wp-context---core-fit-text', 'core/fit-text::{"fontSize":""}' );
$processor->set_attribute( 'data-wp-init---core-fit-text', 'core/fit-text::callbacks.init' );
$processor->set_attribute( 'data-wp-style--font-size', 'core/fit-text::context.fontSize' );
$block_content = $processor->get_updated_html();
}
}
}

if ( ! isset( $block['attrs']['style']['typography']['fontSize'] ) ) {
return $block_content;
}
Expand Down
3 changes: 0 additions & 3 deletions packages/block-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
},
"react-native": "src/index",
"wpScript": true,
"wpScriptModuleExports": {
"./utils/fit-text-frontend": "./build-module/utils/fit-text-frontend.js"
},
"sideEffects": [
"build-style/**",
"src/**/*.scss",
Expand Down
329 changes: 0 additions & 329 deletions packages/block-editor/src/hooks/fit-text.js

This file was deleted.

Loading
Loading