[wp-trac] [WordPress Trac] #40967: Transparent images loose transparency in WP 4.8 image widger
WordPress Trac
noreply at wordpress.org
Fri Jun 9 09:29:41 UTC 2017
#40967: Transparent images loose transparency in WP 4.8 image widger
--------------------------+------------------------------
Reporter: jpnl | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.8
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by jpnl):
Replying to [ticket:40967 jpnl]:
> At first this was caused by the image having a caption, but after
removing that, the image still isn't transparent.
Had a closer look and it's caused by CSS class .wp-caption which is also
applied when the image does not have a caption. It does that in the image
widget, it doesn't do it in a normal post.
Normally, when you add an image to a post, it gets a different markup
depending on whether it does or does not have a caption:
Without caption
<img class="alignnone wp-image-117868 size-medium"
src="http://mydomain.nl/wordpress/wp-content/uploads/image.png" alt=""
width="300" height="180" />
With caption
[caption id="attachment_117868" align="alignnone" width="300"]<img class
="wp-image-117868 size-medium" src="http://mydomain.nl/wordpress/wp-
content/uploads/image.png" alt="" width="300" height="180" /> with
caption[/caption]
And that triggers this css
.wp-caption {
max-width: 96%;
margin-bottom: 10px;
padding: 8px;
padding-top: 4px;
border: 1px solid #ddd;
background-color: #f3f3f3;
text-align: center;
}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40967#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list