-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Media & Text Block: Fix frontend styles when "Crop image to fill" is selected #20539
Conversation
…to fill" option active
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.
Nice catch, @jffng! Thanks for your quick reaction.
Tested it locally and noticed that it breaks the Editor part back:
Renaming the figure
element class in edit.js
to wp-block-media-text__media
should do the trick. I guess we could then remove those styles as they seem redundant 🙌
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.
Tested locally, both editor and view display the image properly when "Crop image to fill the column" option is set.
Nice work, thanks! 🚢
…selected (#20539) * Fix selectors for frontend styles of media text block w/ "Crop image to fill" option active * Rename editor container class and remove redundant block styles
…selected (#20539) * Fix selectors for frontend styles of media text block w/ "Crop image to fill" option active * Rename editor container class and remove redundant block styles
Description
#20439 introduced a bug that broke the "Crop image to fill entire column" styles on the front end.
This PR reverts the names of those selectors for the front-end styles, while leaving the fixes for the editor styles in place.