Expected Behavior
The Image Comparisons containerHeight and containerWidth values should avoid being set to numeric values unless specifically set by a user, this will allow for the block to scale with the themes settings.layout.contentSize value in theme.json when changed.
Actual Behavior
When an Image Comparison block is added the containerWidth attribute is set to the value of settings.layout.contentSize from the themes theme.json, if you then change theme or edit the value of settings.layout.contentSize in theme.json the Image Comparison block won't scale to the new width in the editor or on the frontend.
Step-by-step reproduction instructions
- Add an Image Comparison block
- Add both images
- Save
- Increase the
settings.layout.contentSize value in theme.json
- Refresh page
- See that the Image Comparison block is now displaying incorrectly in the editor and on the frontend
Screenshots, screen recordings, code snippets
N/A
System Information
- Browser: Firefox Developer Edition 131.0b2 (aarch64)
- WordPress version: 6.6.1
- PHP version: 8.2