Skip to content
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

Merged
merged 2 commits into from Mar 3, 2020

Conversation

@jffng
Copy link
Contributor

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.

…to fill" option active
@getdave getdave requested a review from WunderBart Mar 2, 2020
Copy link
Member

WunderBart left a comment

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 🙌

Copy link
Member

WunderBart left a comment

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
2 checks passed
2 checks passed
build
Details
Travis CI - Pull Request Build Passed
Details
@github-actions github-actions bot added this to the Gutenberg 7.7 milestone Mar 3, 2020
jorgefilipecosta added 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 added 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.