-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
I'm adding a custom aspect ratio on ann image block within the theme.json of my child theme. It gets added in Gutenberg but breaks things in the editor (see video below).
In the console the following error is thrown after selecting a custom aspect ratio:
react-dom.js?ver=18:1 Warning: `NaN` is an invalid value for the `height` css style property.
Step-by-step reproduction instructions
theme.json (I'm adjusting the config of the theme.json in the child-theme)
"core/image": {
"dimensions": {
"aspectRatios": [
{
"name": "Extra Wide - 2:1",
"ratio": "2/1",
"slug": "2-1"
},
{
"name": "Cinema - 21:9",
"ratio": "21/9",
"slug": "21-9"
}
]
}
}
I am then trying to set the new aspect ratio in Gutenberg. The default can be set and the view is adjusted. The theme aspect ratio falls back to the full image and breaks further adjustments in the other options (can't set the focus area of the image for example).
Screenshots, screen recording, code snippet
CleanShot.2024-10-12.at.11.29.06.mp4
Environment info
- WordPress 6.6
- Using a child theme of Twenty Twenty-Four
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
Metadata
Metadata
Assignees
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended