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

Image border radius missing after Scale:Cover #44194

Closed
henriqueiamarino opened this issue Sep 15, 2022 · 3 comments · Fixed by #44213
Closed

Image border radius missing after Scale:Cover #44194

henriqueiamarino opened this issue Sep 15, 2022 · 3 comments · Fixed by #44213
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended

Comments

@henriqueiamarino
Copy link

Description

Every time I set my images to have a fixed height and Scale/Cover is activated the round corners determined by the radius value are gone. I believe this is related to Scale/Cover because if I toggle Cover off the round corners are back again, but the images are not adjusted the way I expect.

Step-by-step reproduction instructions

  1. On a page/post just create a 'Query Loop' with 'Post Featured Images'
  2. In Dimensions panel set any specific 'Height' value
  3. In Scale pick Cover
  4. In Border set border radius different from 0
  5. Publish the page and check round corners on your final results

Screenshots, screen recording, code snippet

#1 shows the Site Editor and #2 the frontend published

image-covermode-noradius

Environment info

  • Wordpress 6.0.2 with Gutenberg Nightly (Wordpress Latest)
  • Staging site loaded by Pressable
  • Desktop / macOS Monterey - Version 12.5.1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@jasmussen
Copy link
Contributor

Cc @ntsekouras @aaronrobertshaw do you know what might be up here? Thank you for looking!

@jasmussen jasmussen added [Type] Bug An existing feature does not function as intended [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Block] Post Featured Image Affects the Post Featured Image Block labels Sep 15, 2022
@aaronrobertshaw
Copy link
Contributor

It looks like when height is set on a post featured image the inner img element's style attribute gets overwritten so it loses the block support inline styles. In this case, that's the border-radius along with border width, style, and custom colors.

I'll put up a draft PR fix for this shortly.

@aaronrobertshaw
Copy link
Contributor

Potential fix is up in: #44213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants