Skip to content

Conversation

@jffng
Copy link
Contributor

@jffng jffng commented Feb 28, 2020

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.

Copy link
Member

@WunderBart WunderBart left a 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:

image

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 🙌

@WunderBart WunderBart added [Block] Media & Text Affects the Media & Text Block [Type] Bug An existing feature does not function as intended labels Mar 2, 2020
Copy link
Member

@WunderBart WunderBart left a 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! 🚢

@WunderBart WunderBart changed the title [Media & Text Block] Fix frontend styles when "Crop image to fill" is selected Media & Text Block: Fix frontend styles when "Crop image to fill" is selected Mar 3, 2020
@WunderBart WunderBart merged commit d63b737 into WordPress:master Mar 3, 2020
@github-actions github-actions bot added this to the Gutenberg 7.7 milestone Mar 3, 2020
@jorgefilipecosta jorgefilipecosta added the Backport to WP 6.9 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Mar 3, 2020
jorgefilipecosta pushed a commit that referenced this pull request Mar 9, 2020
…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
jorgefilipecosta pushed a commit that referenced this pull request Mar 10, 2020
…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
@jorgefilipecosta jorgefilipecosta removed the Backport to WP 6.9 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Media & Text Affects the Media & Text Block [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants