-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
[Block] Post Featured ImageAffects the Post Featured Image BlockAffects the Post Featured Image Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The default aspectRatio set in theme.json doesn't work
Step-by-step reproduction instructions
- Add the following code to the default settings of the block in theme.json.
"core/post-featured-image": {
"dimensions": {
"aspectRatio": "1"
}
},-
Go to post or page and place the Featured image block.
-
You will see that the CSS for the default aspect ratio does not work.
gutenberg/packages/block-library/src/post-featured-image/index.php
Lines 44 to 46 in 951879a
| if ( ! empty( $attributes['aspectRatio'] ) ) { | |
| $extra_styles .= 'width:100%;height:100%;'; | |
| } elseif ( ! empty( $attributes['height'] ) ) { |
Related:#47271
Screenshots, screen recording, code snippet
f.mp4
Environment info
WordPress version: 6.7.2
Twenty Twenty-Five
Gutenberg: version: 20.6.0-rc.1
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Sourav61 and yogeshbhutkar
Metadata
Metadata
Assignees
Labels
[Block] Post Featured ImageAffects the Post Featured Image BlockAffects the Post Featured Image Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended