Automattic / themes

Free WordPress themes made by Automattic for WordPress.org and WordPress.com.
https://themeshaper.com
GNU General Public License v2.0
844 stars 342 forks source link

Hybrid themes with Global Styles: custom border images not displayed on the front end #7896

Closed jartes closed 9 hours ago

jartes commented 1 week ago

Quick summary

This issue comes from this one, which is similar to #7873.

When adding a custom border to an image with the block editor, it is displayed in the editor but not on the site's front end.

This is happening with Hybrid themes with Global Styles support.

Steps to reproduce

  1. Make sure the site is using a hybrid theme.
  2. Create a new post or page.
  3. Add an image
  4. Add a border to it.

What you expected to happen

Seeing the image on the live site with the border set displayed in the editor.

What actually happened

The border from the image is not being displayed

Markup on 2024-06-25 at 15:57:26

Markup on 2024-06-25 at 15:57:50

Browser

Google Chrome/Chromium

Context

Related issue and customer report

Platform (Simple, Atomic, or both?)

Simple, Atomic

Other notes

No response

Reproducibility

Consistent

Severity

Most (> 50%)

Available workarounds?

Yes, easy to implement

Workaround details

This can be fixed with some custom CSS code, but as this is affecting the border-style property, it will depend which type of border has been set.

For example, if the border is the default one, the following CSS should work for images in post content:

.entry-content .img {
    border-style: solid;
}
jartes commented 1 week ago

8326462-zd-a8c 8377644-zd-a8c

github-actions[bot] commented 1 week ago

Support References

This comment is automatically generated. Please do not edit it.

miksansegundo commented 6 days ago

I'll look into this later.

It seems that Varia theme is removing the border from images in https://github.com/Automattic/themes/blob/fea811917b84a1b40b67f8a1ff149cd3ad43403f/varia/style.css#L371

miksansegundo commented 9 hours ago

Hi, I have just deployed a fix and confirmed it's fixed.

EDITOR FRONT SITE
Screenshot 2567-07-03 at 19 10 35 Screenshot 2567-07-03 at 19 10 23