diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md
index e5b524c6850860..a2923ee4981439 100644
--- a/docs/reference-guides/core-blocks.md
+++ b/docs/reference-guides/core-blocks.md
@@ -590,7 +590,7 @@ Show minutes required to finish reading the post. ([Source](https://github.com/W
- **Name:** core/post-time-to-read
- **Category:** theme
-- **Supports:** spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
+- **Supports:** color (background, gradients, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** textAlign
## Post Title
diff --git a/packages/block-library/src/post-time-to-read/block.json b/packages/block-library/src/post-time-to-read/block.json
index 20313744c343ed..2b7d7936094f7c 100644
--- a/packages/block-library/src/post-time-to-read/block.json
+++ b/packages/block-library/src/post-time-to-read/block.json
@@ -14,6 +14,13 @@
}
},
"supports": {
+ "color": {
+ "gradients": true,
+ "__experimentalDefaultControls": {
+ "background": true,
+ "text": true
+ }
+ },
"html": false,
"spacing": {
"margin": true,
diff --git a/packages/block-library/src/post-time-to-read/edit.js b/packages/block-library/src/post-time-to-read/edit.js
index b9092c69952b7b..1689a6da71a5a1 100644
--- a/packages/block-library/src/post-time-to-read/edit.js
+++ b/packages/block-library/src/post-time-to-read/edit.js
@@ -93,7 +93,7 @@ function PostTimeToReadEdit( { attributes, setAttributes, context } ) {
} }
/>
-
{ minutesToReadString }
+ { minutesToReadString }
>
);
}
diff --git a/packages/block-library/src/post-time-to-read/index.php b/packages/block-library/src/post-time-to-read/index.php
index 07761e5e759045..03a745d20e6427 100644
--- a/packages/block-library/src/post-time-to-read/index.php
+++ b/packages/block-library/src/post-time-to-read/index.php
@@ -42,7 +42,7 @@ function render_block_core_post_time_to_read( $attributes, $content, $block ) {
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
return sprintf(
- '%2$s
',
+ '%2$s
',
$wrapper_attributes,
$minutes_to_read_string
);
diff --git a/phpunit/blocks/render-post-time-to-read-test.php b/phpunit/blocks/render-post-time-to-read-test.php
index abca2daeeeaeba..344b3fe0c71c9f 100644
--- a/phpunit/blocks/render-post-time-to-read-test.php
+++ b/phpunit/blocks/render-post-time-to-read-test.php
@@ -114,7 +114,7 @@ public function test_no_content_post() {
$block = new WP_Block( $parsed_block, $context );
$actual = gutenberg_render_block_core_post_time_to_read( $attributes, '', $block );
- $expected = '1 minute
';
+ $expected = '1 minute
';
$this->assertSame( $expected, $actual );
}
@@ -136,7 +136,7 @@ public function test_less_than_one_minute_post() {
$block = new WP_Block( $parsed_block, $context );
$actual = gutenberg_render_block_core_post_time_to_read( $attributes, '', $block );
- $expected = '1 minute
';
+ $expected = '1 minute
';
$this->assertSame( $expected, $actual );
}
@@ -158,7 +158,7 @@ public function test_one_minute_post() {
$block = new WP_Block( $parsed_block, $context );
$actual = gutenberg_render_block_core_post_time_to_read( $attributes, '', $block );
- $expected = '1 minute
';
+ $expected = '1 minute
';
$this->assertSame( $expected, $actual );
}
@@ -180,7 +180,7 @@ public function test_two_minutes_post() {
$block = new WP_Block( $parsed_block, $context );
$actual = gutenberg_render_block_core_post_time_to_read( $attributes, '', $block );
- $expected = '2 minutes
';
+ $expected = '2 minutes
';
$this->assertSame( $expected, $actual );
}