-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post Featured Image: Fix height/scale overwriting img inline styles #44213
Post Featured Image: Fix height/scale overwriting img inline styles #44213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR Aaron! LGTM
Manually cherry-picking this to the |
|
Reverting on the wp/6.1 branch per this discussion. |
|
Fixes #44194
What?
Refactors application of inline styles to the featured image to avoid multiple
style
attributes causing loss of inline styles.Why?
Without this fix, you cannot set post featured image heights as well as borders.
How?
Refactors the block's render callback to conditionally generate the height/scale related styles earlier and pass them through to the function generating the img element.
Testing Instructions
Screenshots or screencast
Screen.Recording.2022-09-16.at.12.12.55.pm.mp4
Screen.Recording.2022-09-16.at.12.09.43.pm.mp4